summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/funcs_1
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/funcs_1')
-rw-r--r--mysql-test/suite/funcs_1/README.txt54
-rw-r--r--mysql-test/suite/funcs_1/bitdata/bitdata_master.test6
-rw-r--r--mysql-test/suite/funcs_1/cursors/cursors_master.test3
-rw-r--r--mysql-test/suite/funcs_1/datadict/basics_mixed1.inc49
-rw-r--r--mysql-test/suite/funcs_1/datadict/basics_mixed2.inc55
-rw-r--r--mysql-test/suite/funcs_1/datadict/basics_mixed3.inc42
-rw-r--r--mysql-test/suite/funcs_1/datadict/columns.inc90
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict.pre54
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc60
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict_load.inc107
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict_priv.inc112
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc354
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_routines.inc523
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_schemata.inc298
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_table_query.inc42
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_tables.inc473
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_triggers.inc272
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_views.inc310
-rw-r--r--mysql-test/suite/funcs_1/datadict/processlist_priv.inc498
-rw-r--r--mysql-test/suite/funcs_1/datadict/processlist_val.inc412
-rw-r--r--mysql-test/suite/funcs_1/datadict/statistics.inc52
-rw-r--r--mysql-test/suite/funcs_1/datadict/table_constraints.inc43
-rw-r--r--mysql-test/suite/funcs_1/datadict/tables.inc55
-rw-r--r--mysql-test/suite/funcs_1/datadict/tables1.inc36
-rw-r--r--mysql-test/suite/funcs_1/datadict/tables2.inc45
-rw-r--r--mysql-test/suite/funcs_1/disabled.def12
-rw-r--r--mysql-test/suite/funcs_1/include/bug28309_skip.inc13
-rw-r--r--mysql-test/suite/funcs_1/include/cleanup.inc21
-rw-r--r--mysql-test/suite/funcs_1/include/innodb_tb1.inc70
-rw-r--r--mysql-test/suite/funcs_1/include/innodb_tb2.inc65
-rw-r--r--mysql-test/suite/funcs_1/include/innodb_tb3.inc70
-rw-r--r--mysql-test/suite/funcs_1/include/innodb_tb4.inc72
-rw-r--r--mysql-test/suite/funcs_1/include/memory_tb1.inc62
-rw-r--r--mysql-test/suite/funcs_1/include/memory_tb2.inc68
-rw-r--r--mysql-test/suite/funcs_1/include/memory_tb3.inc64
-rw-r--r--mysql-test/suite/funcs_1/include/memory_tb4.inc71
-rw-r--r--mysql-test/suite/funcs_1/include/myisam_tb1.inc70
-rw-r--r--mysql-test/suite/funcs_1/include/myisam_tb2.inc82
-rw-r--r--mysql-test/suite/funcs_1/include/myisam_tb3.inc70
-rw-r--r--mysql-test/suite/funcs_1/include/myisam_tb4.inc90
-rw-r--r--mysql-test/suite/funcs_1/include/show_connection.inc14
-rw-r--r--mysql-test/suite/funcs_1/include/sp_tb.inc89
-rw-r--r--mysql-test/suite/funcs_1/include/tb3.inc66
-rwxr-xr-xmysql-test/suite/funcs_1/lib/DataGen_local.pl1247
-rwxr-xr-xmysql-test/suite/funcs_1/lib/DataGen_modify.pl3960
-rw-r--r--mysql-test/suite/funcs_1/r/charset_collation.result41
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_bitdata.result3
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_cursors.result3
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_func_view.result5264
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_02.result1402
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_03.result496
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_06.result436
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_07.result178
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_08.result848
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_10.result409
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_0102.result366
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03.result768
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03e.result1770
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_0407.result496
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_08.result542
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_09.result267
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result397
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_frkey.result73
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_views.result22919
-rw-r--r--mysql-test/suite/funcs_1/r/is_basics_mixed.result606
-rw-r--r--mysql-test/suite/funcs_1/r/is_character_sets.result78
-rw-r--r--mysql-test/suite/funcs_1/r/is_check_constraints.result189
-rw-r--r--mysql-test/suite/funcs_1/r/is_cml_innodb.result111
-rw-r--r--mysql-test/suite/funcs_1/r/is_cml_memory.result82
-rw-r--r--mysql-test/suite/funcs_1/r/is_cml_myisam.result98
-rw-r--r--mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result85
-rw-r--r--mysql-test/suite/funcs_1/r/is_collations.result90
-rw-r--r--mysql-test/suite/funcs_1/r/is_column_privileges.result377
-rw-r--r--mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result36
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns.result510
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_innodb.result1147
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is.result1044
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is_embedded.result1044
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_memory.result1087
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_myisam.result1216
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result1216
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql.result585
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result567
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines.result84
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_archive.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_blackhole.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_csv.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_federated.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_innodb.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_memory.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_merge.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_myisam.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_events.result148
-rw-r--r--mysql-test/suite/funcs_1/r/is_key_column_usage.result422
-rw-r--r--mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result424
-rw-r--r--mysql-test/suite/funcs_1/r/is_routines.result722
-rw-r--r--mysql-test/suite/funcs_1/r/is_routines_embedded.result758
-rw-r--r--mysql-test/suite/funcs_1/r/is_schema_privileges.result301
-rw-r--r--mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result36
-rw-r--r--mysql-test/suite/funcs_1/r/is_schemata.result194
-rw-r--r--mysql-test/suite/funcs_1/r/is_schemata_embedded.result200
-rw-r--r--mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result40
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics.result439
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_is.result18
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_mysql.result94
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result170
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints.result335
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints_is.result18
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result51
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result84
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_privileges.result345
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables.result432
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_embedded.result440
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_innodb.result174
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_is.result2234
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_is_embedded.result2234
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_memory.result175
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_myisam.result175
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result201
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_mysql.result805
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result1580
-rw-r--r--mysql-test/suite/funcs_1/r/is_triggers.result238
-rw-r--r--mysql-test/suite/funcs_1/r/is_triggers_embedded.result235
-rw-r--r--mysql-test/suite/funcs_1/r/is_user_privileges.result758
-rw-r--r--mysql-test/suite/funcs_1/r/is_views.result256
-rw-r--r--mysql-test/suite/funcs_1/r/is_views_embedded.result259
-rw-r--r--mysql-test/suite/funcs_1/r/memory_bitdata.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_cursors.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_func_view.result5265
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_02.result1403
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_03.result497
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_06.result436
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_07.result179
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_08.result848
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_10.result410
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_0102.result367
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03.result768
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03e.result1710
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_0407.result496
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_08.result542
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_09.result268
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_1011ext.result405
-rw-r--r--mysql-test/suite/funcs_1/r/memory_views.result22921
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_bitdata.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_cursors.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_func_view.result5265
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_02.result1403
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_03.result497
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_06.result436
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_07.result179
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_08.result848
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_10.result410
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_0102.result367
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03.result768
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03e.result1710
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_0407.result496
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_08.result542
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_09.result268
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result405
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_views-big.result24623
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result547
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_ps.result547
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_val_no_prot.result250
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_val_ps.result250
-rw-r--r--mysql-test/suite/funcs_1/r/row_count_func.result79
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result23311
-rw-r--r--mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc10
-rw-r--r--mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc104
-rw-r--r--mysql-test/suite/funcs_1/storedproc/param_check.inc50
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_02.inc1666
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_03.inc496
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_06.inc461
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_07.inc119
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_08.inc119
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc29
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_10.inc330
-rw-r--r--mysql-test/suite/funcs_1/t/charset_collation.test104
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_bitdata.test17
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_cursors.test19
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_func_view.test16
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_storedproc_02.test9
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_storedproc_03.test9
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_storedproc_06.test10
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_storedproc_07.test9
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_storedproc_08.test10
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_storedproc_10.test9
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_trig_0102.test10
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_trig_03.test11
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_trig_03e.test26
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_trig_0407.test11
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_trig_08.test11
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_trig_09.test10
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test10
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_trig_frkey.test10
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_views.test24
-rw-r--r--mysql-test/suite/funcs_1/t/is_basics_mixed.test506
-rw-r--r--mysql-test/suite/funcs_1/t/is_character_sets.test107
-rw-r--r--mysql-test/suite/funcs_1/t/is_check_constraints.test141
-rw-r--r--mysql-test/suite/funcs_1/t/is_cml_innodb.test41
-rw-r--r--mysql-test/suite/funcs_1/t/is_cml_memory.test37
-rw-r--r--mysql-test/suite/funcs_1/t/is_cml_myisam.test41
-rw-r--r--mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test108
-rw-r--r--mysql-test/suite/funcs_1/t/is_collations.test114
-rw-r--r--mysql-test/suite/funcs_1/t/is_column_privileges.test336
-rw-r--r--mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test59
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns.test445
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_innodb.test26
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_is.test23
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_is_embedded.test21
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_memory.test30
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_myisam.test30
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test24
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_mysql.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test16
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines.test124
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines_archive.test15
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines_blackhole.test15
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines_csv.test15
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines_federated.test15
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines_innodb.test16
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines_memory.test14
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines_merge.test14
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines_myisam.test14
-rw-r--r--mysql-test/suite/funcs_1/t/is_events.test168
-rw-r--r--mysql-test/suite/funcs_1/t/is_key_column_usage.test20
-rw-r--r--mysql-test/suite/funcs_1/t/is_key_column_usage_embedded.test21
-rw-r--r--mysql-test/suite/funcs_1/t/is_routines.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_routines_embedded.test20
-rw-r--r--mysql-test/suite/funcs_1/t/is_schema_privileges.test317
-rw-r--r--mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test58
-rw-r--r--mysql-test/suite/funcs_1/t/is_schemata.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_schemata_embedded.test20
-rw-r--r--mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test59
-rw-r--r--mysql-test/suite/funcs_1/t/is_statistics.test376
-rw-r--r--mysql-test/suite/funcs_1/t/is_statistics_is.test14
-rw-r--r--mysql-test/suite/funcs_1/t/is_statistics_mysql.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_statistics_mysql_embedded.test20
-rw-r--r--mysql-test/suite/funcs_1/t/is_table_constraints.test318
-rw-r--r--mysql-test/suite/funcs_1/t/is_table_constraints_is.test14
-rw-r--r--mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test18
-rw-r--r--mysql-test/suite/funcs_1/t/is_table_constraints_mysql_embedded.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_table_privileges.test347
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables_embedded.test20
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables_innodb.test22
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables_is.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables_is_embedded.test23
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables_memory.test22
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables_myisam.test21
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables_myisam_embedded.test22
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables_mysql.test18
-rw-r--r--mysql-test/suite/funcs_1/t/is_tables_mysql_embedded.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_triggers.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_triggers_embedded.test20
-rw-r--r--mysql-test/suite/funcs_1/t/is_user_privileges.test389
-rw-r--r--mysql-test/suite/funcs_1/t/is_views.test19
-rw-r--r--mysql-test/suite/funcs_1/t/is_views_embedded.test20
-rw-r--r--mysql-test/suite/funcs_1/t/memory_bitdata.test17
-rw-r--r--mysql-test/suite/funcs_1/t/memory_cursors.test18
-rw-r--r--mysql-test/suite/funcs_1/t/memory_func_view.test16
-rw-r--r--mysql-test/suite/funcs_1/t/memory_storedproc_02.test7
-rw-r--r--mysql-test/suite/funcs_1/t/memory_storedproc_03.test7
-rw-r--r--mysql-test/suite/funcs_1/t/memory_storedproc_06.test7
-rw-r--r--mysql-test/suite/funcs_1/t/memory_storedproc_07.test7
-rw-r--r--mysql-test/suite/funcs_1/t/memory_storedproc_08.test7
-rw-r--r--mysql-test/suite/funcs_1/t/memory_storedproc_10.test7
-rw-r--r--mysql-test/suite/funcs_1/t/memory_trig_0102.test10
-rw-r--r--mysql-test/suite/funcs_1/t/memory_trig_03.test9
-rw-r--r--mysql-test/suite/funcs_1/t/memory_trig_03e.test24
-rw-r--r--mysql-test/suite/funcs_1/t/memory_trig_0407.test10
-rw-r--r--mysql-test/suite/funcs_1/t/memory_trig_08.test9
-rw-r--r--mysql-test/suite/funcs_1/t/memory_trig_09.test9
-rw-r--r--mysql-test/suite/funcs_1/t/memory_trig_1011ext.test10
-rw-r--r--mysql-test/suite/funcs_1/t/memory_views.test24
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_bitdata.test17
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_cursors.test18
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_func_view.test16
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_storedproc_02.test7
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_storedproc_03.test7
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_storedproc_06.test7
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_storedproc_07.test7
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_storedproc_08.test7
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_storedproc_10.test7
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_trig_0102.test9
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_trig_03.test9
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_trig_03e.test24
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_trig_0407.test9
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_trig_08.test9
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_trig_09.test9
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test9
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_views-big.test38
-rw-r--r--mysql-test/suite/funcs_1/t/processlist_priv_no_prot.test30
-rw-r--r--mysql-test/suite/funcs_1/t/processlist_priv_ps.test33
-rw-r--r--mysql-test/suite/funcs_1/t/processlist_val_no_prot.test25
-rw-r--r--mysql-test/suite/funcs_1/t/processlist_val_ps.test28
-rw-r--r--mysql-test/suite/funcs_1/t/row_count_func-master.opt1
-rw-r--r--mysql-test/suite/funcs_1/t/row_count_func.test131
-rw-r--r--mysql-test/suite/funcs_1/t/storedproc.test29551
-rw-r--r--mysql-test/suite/funcs_1/triggers/trig_frkey.inc108
-rw-r--r--mysql-test/suite/funcs_1/triggers/trig_frkey2.inc244
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_0102.inc474
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03.inc655
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc252
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc222
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc203
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc120
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc216
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc181
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc224
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc80
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_0407.inc614
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_08.inc562
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_09.inc323
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc430
-rw-r--r--mysql-test/suite/funcs_1/views/func_view.inc1365
-rw-r--r--mysql-test/suite/funcs_1/views/fv1.inc5
-rw-r--r--mysql-test/suite/funcs_1/views/fv2.inc5
-rw-r--r--mysql-test/suite/funcs_1/views/fv_cast.inc4
-rw-r--r--mysql-test/suite/funcs_1/views/fv_if1.inc4
-rw-r--r--mysql-test/suite/funcs_1/views/fv_if2.inc4
-rw-r--r--mysql-test/suite/funcs_1/views/fv_ifnull.inc4
-rw-r--r--mysql-test/suite/funcs_1/views/views_master.inc4089
322 files changed, 221259 insertions, 0 deletions
diff --git a/mysql-test/suite/funcs_1/README.txt b/mysql-test/suite/funcs_1/README.txt
new file mode 100644
index 00000000..65f6226d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/README.txt
@@ -0,0 +1,54 @@
+2008-02-29 Matthias Leich
+=========================
+
+1. The testsuite "funcs_1" is mostly intended for additional (compared
+ to the common regression tests stored in mysql-test/t) checks
+ of features (VIEWS, INFORMATION_SCHEMA, STORED PROCEDURES,...)
+ introduced with MySQL 5.0.
+
+2. There were some extensions of this suite when new information_schema
+ views were introduced. But in most cases the tests for these views
+ were stored within the regression testsuite (mysql-test/t).
+
+ INFORMATION_SCHEMA views introduced with MySQL 5.1
+ ==================================================
+ ENGINES (partially tested here)
+ EVENTS (partially tested here)
+ FILES
+ GLOBAL_STATUS
+ GLOBAL_VARIABLES
+ PARTITIONS
+ PLUGINS
+ PROCESSLIST (full tested here)
+ PROFILING
+ REFERENTIAL_CONSTRAINTS
+ SESSION_STATUS
+ SESSION_VARIABLES
+
+3. Some hints for maintainers of this suite:
+ - SHOW TABLES ... LIKE '<pattern>'
+ does a case sensitive comparison between the tablename and
+ the pattern.
+ The names of the tables within the informationschema are in uppercase.
+ So please use something like
+ SHOW TABLES FOR information_schema LIKE 'TABLES'
+ when you intend to get the same non empty result set on OS with and
+ without case sensitive filesystems and default configuration.
+ - The name of the data dictionary is 'information_schema' (lowercase).
+ - Server on OS with filesystem with case sensitive filenames
+ (= The files 'abc' and 'Abc' can coexist.)
+ + default configuration
+ Example of behaviour:
+ DROP DATABASE information_schema;
+ ERROR 42000: Access denied for user ... to database 'information_schema'
+ DROP DATABASE INFORMATION_SCHEMA;
+ ERROR 42000: Access denied for user ... to database 'INFORMATION_SCHEMA'
+ - Try to unify results by
+ --replace_result $engine_type <engine_to_be_tested>
+ if we could expect that the results for storage engine variants of a
+ test differ only in the engine names.
+ This makes future maintenance easier.
+ - Avoid the use of include/show_msg*.inc.
+ They produce "SQL" noise which annoys during server debugging and can be
+ easy replaced by "--echo ...".
+
diff --git a/mysql-test/suite/funcs_1/bitdata/bitdata_master.test b/mysql-test/suite/funcs_1/bitdata/bitdata_master.test
new file mode 100644
index 00000000..c59fb3e0
--- /dev/null
+++ b/mysql-test/suite/funcs_1/bitdata/bitdata_master.test
@@ -0,0 +1,6 @@
+#### suite/funcs_1/bitdata/bitdata_master.test
+
+let $message= NOT YET IMPLEMENTED: bitdata tests;
+--source include/show_msg80.inc
+
+exit;
diff --git a/mysql-test/suite/funcs_1/cursors/cursors_master.test b/mysql-test/suite/funcs_1/cursors/cursors_master.test
new file mode 100644
index 00000000..cf4c9e56
--- /dev/null
+++ b/mysql-test/suite/funcs_1/cursors/cursors_master.test
@@ -0,0 +1,3 @@
+#### suite/funcs_1/cursors/cursors_master.test
+let $message= NOT YET IMPLEMENTED: cursor tests;
+--source include/show_msg80.inc
diff --git a/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc b/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc
new file mode 100644
index 00000000..ba51bfce
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc
@@ -0,0 +1,49 @@
+# suite/funcs_1/datadict/basics_mixed1.inc
+#
+# Auxiliary script to be sourced by suite/funcs_1/t/is_basics_mixed.test
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# 1 Attempt to create tables and views when residing in information_schema
+# 1.1 CREATE TABLE
+USE information_schema;
+let $message= root: create a table with a name of an IS table directly in IS;
+let $dd_part1= CREATE TABLE;
+let $dd_part2= ( c1 INT );
+--source suite/funcs_1/datadict/basics_mixed2.inc
+--error ER_DBACCESS_DENIED_ERROR
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
+#
+# 1.2 CREATE VIEW
+# 1.2.1 Hit on existing INFORMATION_SCHEMA table
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW tables AS SELECT 'garbage';
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW tables AS SELECT * FROM information_schema.tables;
+# 1.2.2 New view
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW v1 AS SELECT 'garbage';
+
+# 2 Attempt to create tables and views when residing in information_schema
+# 1.1 CREATE TABLE
+USE test;
+let $message= root: create a table with a name of an IS table from other db;
+let $dd_part1= CREATE TABLE information_schema.;
+let $dd_part2= ( c1 INT );
+--source suite/funcs_1/datadict/basics_mixed2.inc
+--error ER_DBACCESS_DENIED_ERROR
+CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
+#
+# Hit on existing INFORMATION_SCHEMA table
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW information_schema.tables AS SELECT 'garbage';
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW information_schema.tables AS
+SELECT * FROM information_schema.tables;
+# New table
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW information_schema.v1 AS SELECT 'garbage';
diff --git a/mysql-test/suite/funcs_1/datadict/basics_mixed2.inc b/mysql-test/suite/funcs_1/datadict/basics_mixed2.inc
new file mode 100644
index 00000000..6b1f0779
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/basics_mixed2.inc
@@ -0,0 +1,55 @@
+#### suite/funcs_1/datadict/basics_mixed2.inc
+#
+# Auxiliary script to be sourced by suite/funcs_1/datadict/is_basics_mixed1.inc
+#
+# contains all tables from INFORMATION_SCHEMA
+#
+# Usage example(snip of script):
+# let $dd_part1= CREATE TABLE information_schema.;
+# let $dd_part2= ( c1 INT );
+# --source suite/funcs_1/datadict/basics_mixed2.inc
+#
+# We expect to get
+# ERROR 42000: Access denied for user 'root'@'localhost'
+# to database 'information_schema'
+# for every statement.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 schemata $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 tables $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 columns $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 character_sets $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 collations $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 collation_character_set_applicability $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 routines $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 statistics $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 views $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 user_privileges $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 schema_privileges $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 table_privileges $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 column_privileges $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 table_constraints $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 key_column_usage $dd_part2;
+--error ER_DBACCESS_DENIED_ERROR
+eval $dd_part1 triggers $dd_part2;
+
diff --git a/mysql-test/suite/funcs_1/datadict/basics_mixed3.inc b/mysql-test/suite/funcs_1/datadict/basics_mixed3.inc
new file mode 100644
index 00000000..f6a29063
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/basics_mixed3.inc
@@ -0,0 +1,42 @@
+#### suite/funcs_1/datadict/basics_mixed3.inc
+#
+# Auxiliary routine to be sourced by suite/funcs_1/t/is_basics_mixed.test
+#
+# Check if INFORMATION_SCHEMA tables contain a schema_name like 'db_data%'.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# No column with the name of a database contained in:
+# character_sets collations collation_character_set_applicability
+# user_privileges
+SELECT DISTINCT table_schema FROM information_schema.columns
+WHERE table_schema LIKE 'db_data%';
+SELECT DISTINCT table_schema FROM information_schema.column_privileges
+WHERE table_schema LIKE 'db_data%';
+SELECT DISTINCT constraint_schema,table_schema
+FROM information_schema.key_column_usage
+WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
+SELECT DISTINCT routine_schema FROM information_schema.routines
+WHERE routine_schema LIKE 'db_data%';
+SELECT DISTINCT schema_name FROM information_schema.schemata
+WHERE schema_name LIKE 'db_data%';
+SELECT DISTINCT table_schema FROM information_schema.schema_privileges
+WHERE table_schema LIKE 'db_data%';
+SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics
+WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%';
+SELECT DISTINCT table_schema FROM information_schema.tables
+WHERE table_schema LIKE 'db_data%';
+SELECT DISTINCT constraint_schema,table_schema
+FROM information_schema.table_constraints
+WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
+SELECT DISTINCT table_schema FROM information_schema.table_privileges
+WHERE table_schema LIKE 'db_data%';
+SELECT DISTINCT trigger_schema,event_object_schema
+FROM information_schema.triggers
+WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%';
+SELECT DISTINCT table_schema FROM information_schema.views
+WHERE table_schema LIKE 'db_data%';
diff --git a/mysql-test/suite/funcs_1/datadict/columns.inc b/mysql-test/suite/funcs_1/datadict/columns.inc
new file mode 100644
index 00000000..a03fef9c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/columns.inc
@@ -0,0 +1,90 @@
+# suite/funcs_1/datadict/is_columns.inc
+#
+# Auxiliary script to be sourced by
+# is_columns_is
+# is_columns_mysql
+# is_columns_<engine>
+#
+# Purpose:
+# Check the content of information_schema.columns about tables within certain
+# database/s.
+#
+# Usage:
+# The variable $my_where has to
+# - be set before sourcing this script.
+# - contain the first part of the WHERE qualification
+# Example:
+# let $my_where = WHERE table_schema = 'information_schema'
+# AND table_name <> 'profiling';
+# --source suite/funcs_1/datadict/is_columns.inc
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+
+# The following is needed as embedded server can be compiled with and without
+# privlege tables
+
+eval
+SELECT * FROM information_schema.columns
+$my_where
+ORDER BY table_schema, table_name, column_name;
+
+--echo ##########################################################################
+--echo # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+--echo ##########################################################################
+eval
+SELECT DISTINCT
+ CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+ DATA_TYPE,
+ CHARACTER_SET_NAME,
+ COLLATION_NAME
+FROM information_schema.columns
+$my_where
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+
+#FIXME 3.2.6.2: check the value 2.0079 tinytext ucs2 ucs2_general_ci
+eval
+SELECT DISTINCT
+ CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+ DATA_TYPE,
+ CHARACTER_SET_NAME,
+ COLLATION_NAME
+FROM information_schema.columns
+$my_where
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+
+eval
+SELECT DISTINCT
+ CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+ DATA_TYPE,
+ CHARACTER_SET_NAME,
+ COLLATION_NAME
+FROM information_schema.columns
+$my_where
+ AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+
+echo --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values;
+echo --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval
+SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+ TABLE_SCHEMA,
+ TABLE_NAME,
+ COLUMN_NAME,
+ DATA_TYPE,
+ CHARACTER_MAXIMUM_LENGTH,
+ CHARACTER_OCTET_LENGTH,
+ CHARACTER_SET_NAME,
+ COLLATION_NAME,
+ COLUMN_TYPE
+FROM information_schema.columns
+$my_where
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
diff --git a/mysql-test/suite/funcs_1/datadict/datadict.pre b/mysql-test/suite/funcs_1/datadict/datadict.pre
new file mode 100644
index 00000000..cedc24aa
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/datadict.pre
@@ -0,0 +1,54 @@
+#### suite/funcs_1/datadict/datadict.pre
+#
+# Auxiliary script which loads prerequisites
+# (variables needed for --replace_result ...)
+# in datadictionary tests.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+--disable_query_log
+
+# Bug#12777 Different size shown for VARCHAR(n) columns (with n> 64)
+# in INFORMATION_SCHEMA
+# This bug was unfortunately (for testers) declared to be no bug.
+# So CHARACTER_MAXIMUM_LENGTH of several <whatever>_CATALOG columns within
+# the INFORMATION_SCHEMA depends on PATH_MAX of the operating system.
+# Workaround for this problem:
+# Get the size of ONE known colum and check the size against some values to
+# be able to use the correct --replace_result statement. Using this only the
+# one pair of 'wrong' values is replaced and not all occurrencies of all
+# possible pairs of values. See bug #12777 for details.
+SELECT character_maximum_length INTO @CML
+FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+ AND table_name = 'columns'
+ AND column_name = 'table_catalog';
+
+let $bug_12777_0512= `SELECT @CML = 512`;
+let $bug_12777_1023= `SELECT @CML = 1023`;
+let $bug_12777_1024= `SELECT @CML = 1024`;
+let $bug_12777_2048= `SELECT @CML = 2048`;
+# 4096 is the value used in the files with expected results.
+let $bug_12777_4095= `SELECT @CML = 4095`;
+if (0)
+{
+ # enable this for debugging only, but NOT in a pushed version, as then the
+ # result changes from OS to OS ...
+ eval SELECT @CML AS 'CML',
+ $bug_12777_0512 AS '512',
+ $bug_12777_1023 AS '1023',
+ $bug_12777_1024 AS '1024',
+ $bug_12777_2048 AS '2048',
+ $bug_12777_4095 AS '4095';
+}
+
+
+# Prepare a variable to be able to suppress machine dependant diffs
+# this can be used in: --replace_result $SERVER_NAME <SERVER_NAME>
+let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user
+ WHERE host NOT In ("localhost", "127.0.0.1", "%")`;
+--enable_query_log
+
diff --git a/mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc b/mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc
new file mode 100644
index 00000000..5ba969fe
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc
@@ -0,0 +1,60 @@
+#### --source suite/funcs_1/datadict/datadict_bug_12777.inc
+#
+
+# columns in INFORMATION_SCHEMA with VARCHAR(4096) on Linux and Intel or AMD
+# processor are shown as VARCHAR(512) on Windows, VARCHAR(1023) on AIX and HPUX,
+# VARCHAR(1024) on Solaris10, ... see below and in bug #12777 for details.
+# So we need to replace the output for these systems. There may be other still
+# not tested / detected systems.
+#
+# Setting the variables used below has been moved to the beginning of the datadict
+# tests to "suite/funcs_1/datadict/datadict_load.inc".
+#
+# SELECT character_maximum_length INTO @CML
+# FROM information_schema.columns
+# WHERE table_schema = 'information_schema'
+# AND table_name = 'columns'
+# AND column_name = 'table_catalog';
+
+# this enables the --replace_result only if needed, using this we never replace
+# results on 'simple Linux' and so we will see any changes that might be
+# suppressed by the - only on some systems used - replacements.
+
+
+# Windows XP 32bit
+if ($bug_12777_0512)
+{
+ # switch next 2 lines on for debugging the correct detection of the operating systems
+ # let $message= value 512 detected - 1st replace statement activated!;
+ # --source include/show_msg.inc
+ # nnnn 3*n
+ --replace_result 512 4096 1536 12288
+}
+
+# aix52, aix52-64bit, hp3750, hp3750-64bit, hpux11, hpux11-64bit,
+if ($bug_12777_1023)
+{
+ # nnnn 3*n
+ --replace_result 1023 4096 3069 12288
+}
+
+# Solaris10, 32bit
+if ($bug_12777_1024)
+{
+ # nnnn 3*n
+ --replace_result 1024 4096 3072 12288
+}
+
+# Linux Suse 9.3 32bit Intel/AMD
+if ($bug_12777_2048)
+{
+ # nnnn 3*n
+ --replace_result 2048 4096 6144 12288
+}
+
+# build-5.0-standard
+if ($bug_12777_4095)
+{
+ # nnnn 3*n
+ --replace_result 4095 4096 12285 12288
+}
diff --git a/mysql-test/suite/funcs_1/datadict/datadict_load.inc b/mysql-test/suite/funcs_1/datadict/datadict_load.inc
new file mode 100644
index 00000000..9e3b8766
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/datadict_load.inc
@@ -0,0 +1,107 @@
+#### suite/funcs_1/datadict/datadict_load.inc
+#
+# The sub testcases are nearly independend. That is the reason why we do not
+# want to abort after the first error.
+--disable_abort_on_error
+
+################################################################################
+#
+# prepare variables for --replace_result
+#
+################################################################################
+--disable_query_log
+
+# ------------------------------------------------------------------------------
+# Get the size of ONE known colum and check the size against some values to
+# be able to use the correct --replace_result statement. Using this only the
+# one pair of 'wrong' values is replaced and not all occurrencies of all
+# possible pairs of values. See bug #12777 for details.
+SELECT character_maximum_length INTO @CML
+ FROM information_schema.columns
+ WHERE table_schema = 'information_schema'
+ AND table_name = 'columns'
+ AND column_name = 'table_catalog';
+
+let $bug_12777_0512= `SELECT @CML = 512`;
+let $bug_12777_1023= `SELECT @CML = 1023`;
+let $bug_12777_1024= `SELECT @CML = 1024`;
+let $bug_12777_2048= `SELECT @CML = 2048`;
+# 4096 is the value used in the .results
+let $bug_12777_4095= `SELECT @CML = 4095`;
+
+if (0)
+{
+ # enable this for debugging only, but NOT in a pushed version, as then the
+ # result changes from OS to OS ...
+ eval SELECT @CML AS 'CML',
+ $bug_12777_0512 AS '512',
+ $bug_12777_1023 AS '1023',
+ $bug_12777_1024 AS '1024',
+ $bug_12777_2048 AS '2048',
+ $bug_12777_4095 AS '4095';
+}
+
+# ------------------------------------------------------------------------------
+# prepare a variable to be able to suppress machine dependant diffs
+# this can be used in: --replace_result $SERVER_NAME <SERVER_NAME>
+# let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host LIKE "%\%" AND host NOT In ("localhost", "127.0.0.1", "%")`;
+let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host NOT In ("localhost", "127.0.0.1", "%")`;
+
+
+################################################################################
+#
+# load tables
+# -----------
+#
+# this was part of the 4 files $<engine>_datadict.test, but it has been moved
+# here to have only one place where all preparation for the test is done.
+#
+################################################################################
+
+eval SET @ENGINE_INNODB = IF( '$engine_type' = 'innodb', 1, 0);
+eval SET @ENGINE_MEMORY = IF( '$engine_type' = 'memory', 1, 0);
+eval SET @ENGINE_MYISAM = IF( '$engine_type' = 'myisam', 1, 0);
+--enable_query_log
+
+let $engine_myisam= `SELECT @ENGINE_MYISAM = 1`;
+let $engine_innodb= `SELECT @ENGINE_INNODB = 1`;
+let $engine_memory= `SELECT @ENGINE_MEMORY = 1`;
+
+--disable_warnings
+DROP DATABASE IF EXISTS test1;
+--enable_warnings
+CREATE DATABASE test1;
+USE test;
+
+if ($engine_innodb)
+{
+ --source suite/funcs_1/include/innodb_tb1.inc
+ --source suite/funcs_1/include/innodb_tb2.inc
+ --source suite/funcs_1/include/innodb_tb3.inc
+ --source suite/funcs_1/include/innodb_tb4.inc
+ USE test1;
+ --source suite/funcs_1/include/innodb_tb2.inc
+}
+
+if ($engine_memory)
+{
+ --source suite/funcs_1/include/memory_tb1.inc
+ --source suite/funcs_1/include/memory_tb2.inc
+ --source suite/funcs_1/include/memory_tb3.inc
+ --source suite/funcs_1/include/memory_tb4.inc
+ USE test1;
+ --source suite/funcs_1/include/memory_tb2.inc
+}
+
+if ($engine_myisam)
+{
+ --source suite/funcs_1/include/myisam_tb1.inc
+ --source suite/funcs_1/include/myisam_tb2.inc
+ --source suite/funcs_1/include/myisam_tb3.inc
+ --source suite/funcs_1/include/myisam_tb4.inc
+ USE test1;
+ --source suite/funcs_1/include/myisam_tb2.inc
+}
+
+USE test;
+--source suite/funcs_1/include/sp_tb.inc
diff --git a/mysql-test/suite/funcs_1/datadict/datadict_priv.inc b/mysql-test/suite/funcs_1/datadict/datadict_priv.inc
new file mode 100644
index 00000000..c69d7b00
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/datadict_priv.inc
@@ -0,0 +1,112 @@
+############## suite/funcs_1/datadict/datadict_priv.inc ################
+# #
+# DDL and DML operations on information_schema tables #
+# #
+# Creation: #
+# 2007-08 hhunger Implement this test as part of #
+# WL#3982 Test information_schema.processlist #
+# #
+# Last update: #
+# 2007-08-14 mleich Some cleanup #
+# #
+########################################################################
+
+# These variables have to be set before sourcing this file.
+#
+# information_schema table to be tested
+# let $table= processlist;
+#
+# columns of the information_schema table e.g. to use in a select.
+# let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, PROGRESS;
+#
+# Where clause for an update.
+# let $update_where= WHERE id=1 ;
+#
+# Column to be used in the SET of an update.
+# let $set_column= user='any_user' ;
+#
+# Where clause of a delete.
+# let $delete_where= WHERE id=1 ;
+#
+# Column to be dropped.
+# let $drop_column= user;
+#
+# Column to be indexed
+# let $index_col= user;
+
+
+# data access
+
+eval CREATE TEMPORARY TABLE test.t_$table AS SELECT * FROM $table;
+
+eval UPDATE test.t_$table SET user='horst' $update_where ;
+
+--error ER_DBACCESS_DENIED_ERROR
+eval INSERT INTO $table SELECT * FROM test.t_$table;
+
+# bug#30208: CREATE TABLE ...LIKE does not accept dbname.tablename:unknown database
+eval DROP TABLE test.t_$table;
+
+--error ER_VIEW_NONUPD_CHECK
+eval CREATE VIEW test.v_$table ($columns) AS SELECT $columns FROM $table WITH CHECK OPTION;
+
+eval CREATE VIEW test.v_$table ($columns) AS SELECT $columns FROM $table;
+
+# !!! This query returns a wrong error due to a bug in the code of mwl106
+# !!! Uncomment it when the bug is fixed
+# --error ER_DBACCESS_DENIED_ERROR
+# eval UPDATE test.v_$TABLE SET TIME=NOW() WHERE id = 1;
+
+eval DROP VIEW test.v_$table;
+
+--error ER_DBACCESS_DENIED_ERROR
+eval UPDATE $table SET $set_column $update_where;
+
+--error ER_DBACCESS_DENIED_ERROR
+eval DELETE FROM $table $delete_where;
+
+# change privileges
+
+--error ER_DBACCESS_DENIED_ERROR
+eval REVOKE ALL ON $table FROM current_user;
+
+--error ER_DBACCESS_DENIED_ERROR
+eval GRANT INSERT,UPDATE ON $table TO current_user;
+
+SHOW GRANTS;
+
+#----------------------------------------------------------------------
+# table access
+
+--error ER_DBACCESS_DENIED_ERROR
+eval CREATE INDEX i_$table ON $table ($index_col);
+
+--error ER_DBACCESS_DENIED_ERROR
+eval DROP TABLE $table;
+
+--error ER_DBACCESS_DENIED_ERROR
+eval ALTER TABLE $table DROP COLUMN $drop_column;
+
+--error ER_DBACCESS_DENIED_ERROR
+eval ALTER TABLE $table ADD COLUMN (my_column INT);
+
+--error ER_DBACCESS_DENIED_ERROR
+eval RENAME TABLE $table TO new_$table;
+
+--error ER_DBACCESS_DENIED_ERROR
+eval RENAME TABLE $table TO files;
+
+--error ER_DBACCESS_DENIED_ERROR
+eval CREATE TABLE new_$table AS SELECT * FROM $table;
+
+#----------------------------------------------------------------------
+# database access
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP DATABASE information_schema;
+
+--error ER_PARSE_ERROR
+RENAME DATABASE information_schema TO info_schema;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
diff --git a/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc b/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc
new file mode 100644
index 00000000..ba390dfb
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc
@@ -0,0 +1,354 @@
+# suite/funcs_1/datadict/is_key_column_usage.inc
+#
+# Check the layout of information_schema.key_column_usage and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing tables
+# within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+# Last Change:
+# 2008-06-11 mleich Move t/is_key_column_usage.test to this file and
+# create variants for embedded/non embedded server.
+#
+
+let $engine_type = MEMORY;
+
+let $is_table = KEY_COLUMN_USAGE;
+
+# The table INFORMATION_SCHEMA.KEY_COLUMN_USAGE must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.7.1: INFORMATION_SCHEMA.KEY_COLUMN_USAGE layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.KEY_COLUMN_USAGE table has the following
+# columns, in the following order:
+#
+# CONSTRAINT_CATALOG (always shows NULL),
+# CONSTRAINT_SCHEMA (shows the database, or schema, in which an accessible
+# constraint, or index, resides),
+# CONSTRAINT_NAME (shows the name of the accessible constraint),
+# TABLE_CATALOG (always shows NULL),
+# TABLE_SCHEMA (shows the database, or schema, in which the table constrained
+# by that constraint resides),
+# TABLE_NAME (shows the name of the table constrained by the constraint),
+# COLUMN_NAME (shows the name of a column that is the index key, or part of
+# the index key),
+# ORDINAL_POSITION (shows the ordinal position of the column within the
+# constraint index),
+# POSITION_IN_UNIQUE_CONSTRAINT (shows, for a foreign key column, the ordinal
+# position of the referenced column within the referenced unique index;
+# otherwise NULL).
+# added with 5.0.6:
+# REFERENCED_TABLE_SCHEMA,
+# REFERENCED_TABLE_NAME,
+# REFERENCED_COLUMN_NAME
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.key_column_usage is in is_columns_is.test.
+
+# Show that CONSTRAINT_CATALOG and TABLE_CATALOG are always NULL.
+SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog,
+ table_schema, table_name, column_name
+FROM information_schema.key_column_usage
+WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL
+ORDER BY BINARY table_schema, BINARY table_name, BINARY column_name, BINARY constraint_name;
+
+
+--echo ########################################################################################
+--echo # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
+--echo ########################################################################################
+# 3.2.7.2: Ensure that the table shows the relevant information on every column, defined to
+# be part of an index key, which is accessible to the current user or to PUBLIC.
+# 3.2.7.3: Ensure that the table does not show any information on any indexed column that is
+# not accessible to the current user or PUBLIC.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+
+USE db_datadict;
+
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE t1_1
+ (f1 INT NOT NULL, PRIMARY KEY(f1),
+ f2 INT, INDEX f2_ind(f2))
+ENGINE = $engine_type;
+GRANT SELECT ON t1_1 to 'testuser1'@'localhost';
+
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE t1_2
+ (f1 INT NOT NULL, PRIMARY KEY(f1),
+ f2 INT, INDEX f2_ind(f2))
+ENGINE = $engine_type;
+GRANT SELECT ON t1_2 to 'testuser2'@'localhost';
+#FIXME: add foreign keys
+
+let $select= SELECT * FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_%'
+ORDER BY constraint_catalog, constraint_schema, constraint_name,
+ table_catalog, table_schema, table_name, ordinal_position;
+
+# show view of user root
+eval $select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+eval $select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict);
+eval $select;
+
+# Cleanup
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP TABLE t1_1;
+DROP TABLE t1_2;
+DROP DATABASE IF EXISTS db_datadict;
+
+
+--echo ########################################################################################
+--echo # Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.KEY_COLUMN_USAGE modifications
+--echo ########################################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+DROP TABLE IF EXISTS test.t1_my_table;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_my_table%';
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE test.t1_my_table
+ (f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = $engine_type;
+# Settings used in CREATE TABLE must be visible
+# in information_schema.key_column_usage.
+--vertical_results
+SELECT * FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_table';
+--horizontal_results
+#
+# Check modification of TABLE_NAME
+SELECT DISTINCT table_name FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_my_table%';
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT DISTINCT table_name FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_my_table%';
+#
+# Check modification of TABLE_SCHEMA
+SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+#
+# Check modification of COLUMN_NAME
+SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12);
+SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+#
+# Note: The size of the column list and the not very selective qualification
+# is intended. I want to see that the schema names are equal and
+# all records about 't1_my_tablex'.
+let $my_select = SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+ table_name, ordinal_position;
+#
+# Check ADD INDEX being not UNIQUE (does not show up in key_column_usage)
+eval $my_select;
+CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2);
+eval $my_select;
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+#
+# Check ADD UNIQUE INDEX without name explicit assigned
+eval $my_select;
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2);
+eval $my_select;
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+#
+# Check ADD UNIQUE INDEX with name explicit assigned
+eval $my_select;
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2);
+eval $my_select;
+DROP INDEX my_idx ON db_datadict.t1_my_tablex;
+eval $my_select;
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col);
+eval $my_select;
+#
+# Check impact of DROP TABLE
+SELECT table_name, column_name
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name, column_name
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+#
+# No UNIQUE CONSTRAINT -> no entry in key_column_usage
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = $engine_type AS
+SELECT 1 AS f1;
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+# UNIQUE CONSTRAINT -> entry in key_column_usage
+ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1);
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+#
+# Check impact of DROP SCHEMA
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+#
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA table are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+DROP TABLE IF EXISTS db_datadict.t1;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = $engine_type;
+
+# Note(mleich):
+# 1. We can get here different error messages.
+# 2. We do not want to unify the individual messages to the far to unspecific
+# 'Got one of the listed errors'.
+let $my_error_message =
+##### The previous statement must fail ######
+# Server type | expected error name | expected error message
+# --------------------------------------------------------------------------------------------------------------------
+# not embedded | ER_DBACCESS_DENIED_ERROR | ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+# embedded | ER_NON_INSERTABLE_TABLE | ERROR HY000: The target table schemata of the INSERT is not insertable-into
+# | or similar | or similar
+;
+
+--disable_abort_on_error
+INSERT INTO information_schema.key_column_usage
+ (constraint_schema, constraint_name, table_name)
+VALUES ( 'mysql', 'primary', 'db');
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.key_column_usage
+SELECT * FROM information_schema.key_column_usage;
+
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.key_column_usage
+SET table_name = 'db1' WHERE constraint_name = 'primary';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.key_column_usage WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.key_column_usage;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX i3 ON information_schema.key_column_usage(table_name);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.key_column_usage ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.key_column_usage;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.key_column_usage
+RENAME db_datadict.key_column_usage;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.key_column_usage
+RENAME information_schema.xkey_column_usage;
+--enable_abort_on_error
+
+# Cleanup
+DROP TABLE db_datadict.t1;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/datadict/is_routines.inc b/mysql-test/suite/funcs_1/datadict/is_routines.inc
new file mode 100644
index 00000000..37e77e81
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/is_routines.inc
@@ -0,0 +1,523 @@
+# suite/funcs_1/datadict/is_routines.inc
+#
+# Check the layout of information_schema.routines and the impact of
+# CREATE/ALTER/DROP PROCEDURE/FUNCTION ... on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing routines (there are no
+# in the moment) within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+# Last Change:
+# 2008-06-11 mleich Move t/is_routines.test to this file and
+# create variants for embedded/non embedded server.
+#
+
+--source include/default_charset.inc
+set sql_mode="";
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = ROUTINES;
+
+# The table INFORMATION_SCHEMA.TABLES must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.8.1: INFORMATION_SCHEMA.ROUTINES layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.ROUTINES table has the following columns,
+# in the following order:
+#
+# SPECIFIC_NAME (shows the name of an accessible stored procedure, or routine),
+# ROUTINE_CATALOG (always shows NULL),
+# ROUTINE_SCHEMA (shows the database, or schema, in which the routine resides),
+# ROUTINE_NAME (shows the same stored procedure name),
+# ROUTINE_TYPE (shows whether the stored procedure is a procedure or a function),
+# DTD_IDENTIFIER (shows, for a function, the complete data type definition of
+# the value the function will return; otherwise NULL),
+# ROUTINE_BODY (shows the language in which the stored procedure is written;
+# currently always SQL),
+# ROUTINE_DEFINITION (shows as much of the routine body as is possible in the
+# allotted space),
+# EXTERNAL_NAME (always shows NULL),
+# EXTERNAL_LANGUAGE (always shows NULL),
+# PARAMETER_STYLE (shows the routine's parameter style; always SQL),
+# IS_DETERMINISTIC (shows whether the routine is deterministic),
+# SQL_DATA_ACCESS (shows the routine's defined sql-data-access clause value),
+# SQL_PATH (always shows NULL),
+# SECURITY_TYPE (shows whether the routine's defined security_type is 'definer'
+# or 'invoker'),
+# CREATED (shows the timestamp of the time the routine was created),
+# LAST_ALTERED (shows the timestamp of the time the routine was last altered),
+# SQL_MODE (shows the sql_mode setting at the time the routine was created),
+# ROUTINE_COMMENT (shows the comment, if any, defined for the routine;
+# otherwise NULL),
+# DEFINER (shows the user who created the routine).
+# Starting with MySQL 5.1
+# CHARACTER_SET_CLIENT
+# COLLATION_CONNECTION
+# DATABASE_COLLATION
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+USE test;
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp_for_routines;
+DROP FUNCTION IF EXISTS function_for_routines;
+--enable_warnings
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
+
+# Show that the column values of
+# ROUTINE_CATALOG, EXTERNAL_NAME, EXTERNAL_LANGUAGE, SQL_PATH are always NULL
+# and
+# ROUTINE_BODY, PARAMETER_STYLE are 'SQL'
+# and
+# SPECIFIC_NAME = ROUTINE_NAME.
+SELECT specific_name,routine_catalog,routine_schema,routine_name,routine_type,
+ routine_body,external_name,external_language,parameter_style,sql_path
+FROM information_schema.routines
+WHERE routine_schema = 'test' AND
+ (routine_catalog IS NOT NULL OR external_name IS NOT NULL
+ OR external_language IS NOT NULL OR sql_path IS NOT NULL
+ OR routine_body <> 'SQL' OR parameter_style <> 'SQL'
+ OR specific_name <> routine_name);
+
+DROP PROCEDURE sp_for_routines;
+DROP FUNCTION function_for_routines;
+
+
+--echo ################################################################################
+--echo # Testcase 3.2.8.2 + 3.2.8.3: INFORMATION_SCHEMA.ROUTINES accessible information
+--echo ################################################################################
+# 3.2.8.2: Ensure that the table shows the relevant information on every SQL-invoked
+# routine (i.e. stored procedure) which is accessible to the current user
+# or to PUBLIC.
+# 3.2.8.3: Ensure that the table does not show any information on any stored procedure
+# that is not accessible to the current user or PUBLIC.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+DROP DATABASE IF EXISTS db_datadict_2;
+--enable_warnings
+
+CREATE DATABASE db_datadict;
+USE db_datadict;
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT)
+ENGINE = $other_engine_type;
+INSERT INTO res_6_408002_1(f1, f2, f3, f4)
+VALUES('abc', 'xyz', '1989-11-09', 0815);
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp_6_408002_1;
+--enable_warnings
+delimiter //;
+CREATE PROCEDURE sp_6_408002_1()
+BEGIN
+ SELECT * FROM db_datadict.res_6_408002_1;
+END//
+delimiter ;//
+
+CREATE DATABASE db_datadict_2;
+USE db_datadict_2;
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT)
+ENGINE = $other_engine_type;
+INSERT INTO res_6_408002_2(f1, f2, f3, f4)
+VALUES('abc', 'xyz', '1990-10-03', 4711);
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp_6_408002_2;
+--enable_warnings
+delimiter //;
+CREATE PROCEDURE sp_6_408002_2()
+BEGIN
+ SELECT * FROM db_datadict_2.res_6_408002_2;
+END//
+delimiter ;//
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+
+
+GRANT SELECT ON db_datadict_2.* TO 'testuser1'@'localhost';
+GRANT EXECUTE ON db_datadict_2.* TO 'testuser1'@'localhost';
+
+GRANT EXECUTE ON db_datadict.* TO 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser2'@'localhost';
+
+GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2
+TO 'testuser2'@'localhost';
+GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost';
+FLUSH PRIVILEGES;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+--replace_column 24 "YYYY-MM-DD hh:mm:ss" 25 "YYYY-MM-DD hh:mm:ss"
+SELECT * FROM information_schema.routines where routine_schema <> 'sys';
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict);
+--replace_column 24 "YYYY-MM-DD hh:mm:ss" 25 "YYYY-MM-DD hh:mm:ss"
+SELECT * FROM information_schema.routines where routine_schema <> 'sys';
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser3, localhost, testuser3, , "*NO-ONE*");
+--replace_column 24 "YYYY-MM-DD hh:mm:ss" 25 "YYYY-MM-DD hh:mm:ss"
+SELECT * FROM information_schema.routines where routine_schema <> 'sys';
+
+# Cleanup
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+
+USE test;
+DROP DATABASE db_datadict;
+DROP DATABASE db_datadict_2;
+
+
+--echo #########################################################################
+--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.ROUTINES modifications
+--echo #########################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+# Some more tests are in t/information_schema_routines.test which exists
+# in MySQL 5.1 and up only.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
+USE db_datadict;
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
+--vertical_results
+--replace_column 24 <created> 25 <modified>
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
+ORDER BY routine_name;
+--horizontal_results
+
+ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER;
+ALTER FUNCTION function_for_routines COMMENT 'updated comments';
+--vertical_results
+--replace_column 24 <created> 25 <modified>
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
+ORDER BY routine_name;
+--horizontal_results
+
+DROP PROCEDURE sp_for_routines;
+DROP FUNCTION function_for_routines;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
+
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
+--vertical_results
+--replace_column 24 <created> 25 <modified>
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
+ORDER BY routine_name;
+--horizontal_results
+use test;
+DROP DATABASE db_datadict;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
+
+
+--echo #########################################################################
+--echo # 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for
+--echo # ROUTINE_DEFINITION column
+--echo #########################################################################
+# Ensure that a stored procedure with a routine body that is too large to fit
+# into the INFORMATION_SCHEMA.ROUTINES.ROUTINE_DEFINITION column correctly shows
+# as much of the information as is possible within the allotted size.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+USE db_datadict;
+#
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE db_datadict.res_6_408004_1
+ (f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR)
+ENGINE = $other_engine_type;
+INSERT INTO db_datadict.res_6_408004_1
+VALUES ('abc', 98765 , 99999999 , 98765, 10);
+#
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE db_datadict.res_6_408004_2
+ (f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR)
+ENGINE = $other_engine_type;
+INSERT INTO db_datadict.res_6_408004_2
+VALUES ('abc', 98765 , 99999999 , 98765, 10);
+
+--echo # Checking the max. possible length of (currently) 4 GByte is not
+--echo # in this environment here.
+
+delimiter //;
+CREATE PROCEDURE sp_6_408004 ()
+BEGIN
+ DECLARE done INTEGER DEFAULt 0;
+ DECLARE variable_number_1 LONGTEXT;
+ DECLARE variable_number_2 MEDIUMINT;
+ DECLARE variable_number_3 LONGBLOB;
+ DECLARE variable_number_4 REAL;
+ DECLARE variable_number_5 YEAR;
+ DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+ DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+ DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+ DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+ DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
+ BEGIN
+ OPEN cursor_number_1;
+ WHILE done <> 1 DO
+ FETCH cursor_number_1
+ INTO variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5;
+ IF done <> 0 THEN
+ INSERT INTO res_6_408004_2
+ VALUES (variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5);
+ END IF;
+ END WHILE;
+ BEGIN
+ BEGIN
+ SET done = 0;
+ OPEN cursor_number_2;
+ WHILE done <> 1 DO
+ FETCH cursor_number_2
+ INTO variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5;
+ IF done <> 0 THEN
+ INSERT INTO res_6_408004_2
+ VALUES(variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5);
+ END IF;
+ END WHILE;
+ END;
+ SET done = 0;
+ OPEN cursor_number_3;
+ WHILE done <> 1 DO
+ FETCH cursor_number_3
+ INTO variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5;
+ IF done <> 0 THEN
+ INSERT INTO res_6_408004_2
+ VALUES(variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5);
+ END IF;
+ END WHILE;
+ END;
+ END;
+ BEGIN
+ SET done = 0;
+ OPEN cursor_number_4;
+ WHILE done <> 1 DO
+ FETCH cursor_number_4
+ INTO variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5;
+ IF done <> 0 THEN
+ INSERT INTO res_6_408004_2
+ VALUES (variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5);
+ END IF;
+ END WHILE;
+ END;
+ BEGIN
+ SET @a='test row';
+ SELECT @a;
+ SELECT @a;
+ SELECT @a;
+ END;
+ BEGIN
+ SET done = 0;
+ OPEN cursor_number_5;
+ WHILE done <> 1 DO
+ FETCH cursor_number_5
+ INTO variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5;
+ IF done <> 0 THEN
+ INSERT INTO res_6_408004_2
+ VALUES (variable_number_1, variable_number_2, variable_number_3,
+ variable_number_4, variable_number_5);
+ END IF;
+ END WHILE;
+ END;
+ BEGIN
+ SET @a='test row';
+ SELECT @a;
+ SELECT @a;
+ SELECT @a;
+ END;
+END//
+delimiter ;//
+
+CALL db_datadict.sp_6_408004 ();
+SELECT * FROM db_datadict.res_6_408004_2;
+
+--vertical_results
+--replace_column 24 "YYYY-MM-DD hh:mm:ss" 25 "YYYY-MM-DD hh:mm:ss"
+SELECT *, LENGTH(routine_definition) FROM information_schema.routines
+WHERE routine_schema = 'db_datadict';
+--horizontal_results
+
+# Cleanup
+DROP DATABASE db_datadict;
+# ----------------------------------------------------------------------------------------------
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA table are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+USE db_datadict;
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+USE test;
+
+# Note(mleich):
+# 1. We can get here different error messages.
+# 2. We do not want to unify the individual messages to the far to unspecific
+# 'Got one of the listed errors'.
+let $my_error_message =
+##### The previous statement must fail ######
+# Server type | expected error name | expected error message
+# --------------------------------------------------------------------------------------------------------------------
+# not embedded | ER_DBACCESS_DENIED_ERROR | ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+# embedded | ER_NON_INSERTABLE_TABLE | ERROR HY000: The target table schemata of the INSERT is not insertable-into
+# | or similar | or similar
+;
+
+--disable_abort_on_error
+INSERT INTO information_schema.routines (routine_name, routine_type )
+VALUES ('p2', 'procedure');
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+UPDATE information_schema.routines SET routine_name = 'p2'
+WHERE routine_body = 'sql';
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+DELETE FROM information_schema.routines ;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+TRUNCATE information_schema.routines ;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+CREATE INDEX i7 ON information_schema.routines (routine_name);
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+ALTER TABLE information_schema.routines ADD f1 INT;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+ALTER TABLE information_schema.routines DISCARD TABLESPACE;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+DROP TABLE information_schema.routines ;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+ALTER TABLE information_schema.routines RENAME db_datadict.routines;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+ALTER TABLE information_schema.routines RENAME information_schema.xroutines;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+--enable_abort_on_error
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/datadict/is_schemata.inc b/mysql-test/suite/funcs_1/datadict/is_schemata.inc
new file mode 100644
index 00000000..6ddd966d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/is_schemata.inc
@@ -0,0 +1,298 @@
+# suite/funcs_1/datadict/is_schemata.inc
+#
+# Check the layout of information_schema.schemata, permissions and the impact of
+# CREATE/ALTER/DROP SCHEMA on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing databases
+# information_schema and mysql
+# - for checking storage engine properties
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+# Last Change:
+# 2008-06-11 mleich Move t/is_schemata.test to this file and
+# create variants for embedded/non embedded server.
+#
+
+--source include/default_charset.inc
+let $is_table = SCHEMATA;
+
+# The table INFORMATION_SCHEMA.SCHEMATA must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.9.1: INFORMATION_SCHEMA.SCHEMATA layout;
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.SCHEMATA table has the following columns,
+# in the following order:
+#
+# CATALOG_NAME (always shows NULL),
+# SCHEMA_NAME (shows the name of a database, or schema, on which the current
+# user or PUBLIC has privileges),
+# DEFAULT_CHARACTER_SET_NAME (shows the name of that database's default
+# character set),
+# DEFAULT_COLLATION_NAME (shows the database defaul collation)
+# SQL_PATH (always shows NULL).
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.schemata is in is_columns_is.test.
+
+# Show that CATALOG_NAME and SQL_PATH are always NULL.
+SELECT catalog_name, schema_name, sql_path
+FROM information_schema.schemata
+WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL
+ORDER BY schema_name;
+
+
+--echo ###############################################################################
+--echo # Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information
+--echo ###############################################################################
+# 3.2.9.2 Ensure that the table shows the relevant information for every
+# database on which the current user or PUBLIC have privileges.
+# 3.2.9.3 Ensure that the table does not show any information on any databases
+# on which the current user and PUBLIC have no privileges.
+#
+# Note: Check of content within information_schema.schemata about the databases
+# information_schema and mysql is in
+# suite/funcs_1/t/is_schemata_is_mysql.test.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict_1;
+DROP DATABASE IF EXISTS db_datadict_2;
+--enable_warnings
+CREATE DATABASE db_datadict_1;
+CREATE DATABASE db_datadict_2;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+
+GRANT SELECT ON db_datadict_1.* to 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost';
+GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost';
+
+let $my_select = SELECT * FROM information_schema.schemata
+WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
+let $my_show = SHOW DATABASES LIKE 'db_datadict_%';
+
+eval $my_select;
+--sorted_result
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict_1);
+# Shows db_datadict_1
+eval $my_select;
+--sorted_result
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict_2);
+# Shows db_datadict_1 and db_datadict_2
+eval $my_select;
+--sorted_result
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser3, localhost, testuser3, ,"*NO-ONE*");
+# Shows neither db_datadict_1 nor db_datadict_2
+eval $my_select;
+--sorted_result
+eval $my_show;
+
+# Cleanup
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE db_datadict_1;
+DROP DATABASE db_datadict_2;
+
+
+--echo #################################################################################
+--echo # Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMATA modifications
+--echo #################################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+
+SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci';
+SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+
+# Check modify default CHARACTER SET
+SELECT schema_name, default_character_set_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+ALTER SCHEMA db_datadict CHARACTER SET 'utf8';
+SELECT schema_name, default_character_set_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+ALTER SCHEMA db_datadict CHARACTER SET 'latin1';
+
+# Check modify default COLLATION
+SELECT schema_name, default_collation_name FROM information_schema.schemata
+WHERE schema_name = 'db_datadict';
+ALTER SCHEMA db_datadict COLLATE 'latin1_general_cs';
+SELECT schema_name, default_collation_name FROM information_schema.schemata
+WHERE schema_name = 'db_datadict';
+
+# Check DROP DATABASE
+SELECT schema_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+DROP DATABASE db_datadict;
+SELECT schema_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci';
+
+# Note(mleich):
+# 1. We can get here different error messages.
+# 2. We do not want to unify the individual messages to the far to unspecific
+# 'Got one of the listed errors'.
+let $my_error_message =
+##### The previous statement must fail ######
+# Server type | expected error name | expected error message
+# --------------------------------------------------------------------------------------------------------------------
+# not embedded | ER_DBACCESS_DENIED_ERROR | ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+# embedded | ER_NON_INSERTABLE_TABLE | ERROR HY000: The target table schemata of the INSERT is not insertable-into
+# | or similar | or similar
+;
+
+--disable_abort_on_error
+INSERT INTO information_schema.schemata
+ (catalog_name, schema_name, default_character_set_name, sql_path)
+VALUES (NULL, 'db1', 'latin1', NULL);
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+INSERT INTO information_schema.schemata
+SELECT * FROM information_schema.schemata;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+UPDATE information_schema.schemata
+SET default_character_set_name = 'utf8'
+WHERE schema_name = 'db_datadict';
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+UPDATE information_schema.schemata SET catalog_name = 't_4711';
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+DELETE FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+TRUNCATE information_schema.schemata;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+CREATE INDEX i1 ON information_schema.schemata(schema_name);
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+ALTER TABLE information_schema.schemata ADD f1 INT;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+DROP TABLE information_schema.schemata;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+ALTER TABLE information_schema.schemata RENAME db_datadict.schemata;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+ALTER TABLE information_schema.schemata RENAME information_schema.xschemata;
+if (!$mysql_errno)
+{
+ --echo $my_error_message
+ exit;
+}
+--enable_abort_on_error
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/datadict/is_table_query.inc b/mysql-test/suite/funcs_1/datadict/is_table_query.inc
new file mode 100644
index 00000000..3ed74131
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/is_table_query.inc
@@ -0,0 +1,42 @@
+# suite/funcs_1/datadict/is_table_query.inc
+#
+# Check that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+# (Requirement 3.2.1.1)
+#
+# The variable $is_table must be set before sourcing this script.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+--disable_warnings
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+--enable_warnings
+eval CREATE VIEW test.v1 AS SELECT * FROM information_schema.$is_table;
+eval CREATE PROCEDURE test.p1() SELECT * FROM information_schema.$is_table;
+delimiter //;
+eval CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+ DECLARE counter BIGINT DEFAULT NULL;
+ SELECT COUNT(*) INTO counter FROM information_schema.$is_table;
+ RETURN counter;
+END//
+delimiter ;//
+
+
+# We are not interested to check the content here.
+--echo # Attention: The printing of the next result sets is disabled.
+--disable_result_log
+eval SELECT * FROM information_schema.$is_table;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+--enable_result_log
+
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
diff --git a/mysql-test/suite/funcs_1/datadict/is_tables.inc b/mysql-test/suite/funcs_1/datadict/is_tables.inc
new file mode 100644
index 00000000..b3d0ef4c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/is_tables.inc
@@ -0,0 +1,473 @@
+# suite/funcs_1/datadict/is_tables.inc
+#
+# Check the layout of information_schema.tables and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing tables
+# within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+# Some results of the subtests depend on the storage engines assigned.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+# Last Change:
+# 2008-06-11 mleich Move t/is_tables.test to this file and
+# create variants for embedded/non embedded server.
+#
+
+--source include/default_charset.inc
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = TABLES;
+
+# The table INFORMATION_SCHEMA.TABLES must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.TABLES layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.TABLES table has the following columns,
+# in the following order:
+#
+# TABLE_CATALOG (always shows 'def'),
+# TABLE_SCHEMA (shows the name of the database, or schema, in which an
+# accessible table resides),
+# TABLE_NAME (shows the name of a table which the current user may access),
+# TABLE_TYPE (shows whether the table is a BASE TABLE, a TEMPORARY table,
+# or a VIEW),
+# ENGINE (shows the storage engine used for the table),
+# VERSION (shows the version number of the table's .frm file),
+# ROW_FORMAT (shows the table's row storage format; either FIXED, DYNAMIC
+# or COMPRESSED),
+# TABLE_ROWS (shows the number of rows in the table),
+# AVG_ROW_LENGTH (shows the average length of the table's rows),
+# DATA_LENGTH (shows the length of the table's data file),
+# MAX_DATA_LENGTH (shows the maximum length of the table's data file),
+# INDEX_LENGTH (shows the length of the index file associated with the table),
+# DATA_FREE (shows the number of allocated, unused bytes),
+# AUTO_INCREMENT (shows the next AUTO_INCREMENT value, where applicable),
+# CREATE_TIME (shows the timestamp of the time the table was created),
+# UPDATE_TIME (shows the timestamp of the time the table's data file was
+# last updated),
+# CHECK_TIME (shows the timestamp of the time the table was last checked),
+# TABLE_COLLATION (shows the table's default collation),
+# CHECKSUM (shows the live checksum value for the table, if any; otherwise NULL),
+# CREATE_OPTIONS (shows any additional options used in the table's definition;
+# otherwise NULL),
+# TABLE_COMMENT (shows the comment added to the table's definition;
+# otherwise NULL).
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.tables is in is_columns_is.test.
+
+# Show that TABLE_CATALOG is always 'def'.
+SELECT table_catalog, table_schema, table_name
+FROM information_schema.tables WHERE table_catalog IS NULL OR table_catalog <> 'def';
+
+
+--echo ################################################################################
+--echo # Testcase 3.2.12.2 + 3.2.12.3: INFORMATION_SCHEMA.TABLES accessible information
+--echo ################################################################################
+# 3.2.12.2: Ensure that the table shows the relevant information on every base table
+# and view on which the current user or PUBLIC has privileges.
+# 3.2.12.3: Ensure that the table does not show any information on any tables
+# on which the current user and public have no privileges.
+#
+# Note: Check of content within information_schema.tables about tables within
+# database is in
+# mysql is_tables_mysql.test
+# information_schema is_tables_is.test
+# test% is_tables_<engine>.test
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.*
+ TO 'testuser1'@'localhost' WITH GRANT OPTION;
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.tb1 (f1 INT, f2 INT, f3 INT)
+ENGINE = $engine_type;
+
+GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost';
+GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION;
+
+let $my_select = SELECT * FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+let $my_show = SHOW TABLES FROM db_datadict;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+# tb2 is not granted to anyone
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE tb2 (f1 DECIMAL)
+ENGINE = $engine_type;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE tb3 (f1 VARCHAR(200))
+ENGINE = $engine_type;
+GRANT SELECT ON db_datadict.tb3 to 'testuser3'@'localhost';
+GRANT INSERT ON db_datadict.tb3 to 'testuser2'@'localhost';
+CREATE VIEW v3 AS SELECT * FROM tb3;
+GRANT SELECT ON db_datadict.v3 to 'testuser3'@'localhost';
+
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+# We do not want to check here values affected by
+# - the storage engine used
+# - Operating system / Filesystem
+# - start time of test
+# 1 TABLE_CATALOG
+# 2 TABLE_SCHEMA
+# 3 TABLE_NAME
+# 4 TABLE_TYPE
+# 5 ENGINE affected by storage engine used
+# 6 VERSION
+# 7 ROW_FORMAT affected by storage engine used
+# 8 TABLE_ROWS
+# 9 AVG_ROW_LENGTH affected by storage engine used
+# 10 DATA_LENGTH affected by storage engine used and maybe OS
+# 11 MAX_DATA_LENGTH affected by storage engine used and maybe OS
+# 12 INDEX_LENGTH affected by storage engine used and maybe OS
+# 13 DATA_FREE affected by storage engine used and maybe OS
+# 14 AUTO_INCREMENT
+# 15 CREATE_TIME depends roughly on start time of test (*)
+# 16 UPDATE_TIME depends roughly on start time of test (*)
+# 17 CHECK_TIME depends roughly on start time of test and storage engine (*)
+# 18 TABLE_COLLATION
+# 19 CHECKSUM affected by storage engine used
+# 20 CREATE_OPTIONS
+# 21 TABLE_COMMENT affected by some storage engines
+# (*) In case of view or temporary table NULL.
+--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#"
+eval $my_select;
+--enable_ps_protocol
+--sorted_result
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict);
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#"
+eval $my_select;
+--enable_ps_protocol
+--sorted_result
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser3, localhost, testuser3, , db_datadict);
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#"
+eval $my_select;
+--enable_ps_protocol
+--sorted_result
+eval $my_show;
+
+connection default;
+# we see only 'public' tables
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#"
+eval $my_select;
+--enable_ps_protocol
+--sorted_result
+eval $my_show;
+
+# Cleanup
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE db_datadict;
+
+
+--echo #########################################################################
+--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLES modifications
+--echo #########################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE test.t1_my_table (f1 BIGINT)
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+COMMENT = 'Initial Comment' ENGINE = $engine_type;
+# Settings used in CREATE TABLE must be visible in information_schema.tables.
+--vertical_results
+--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#"
+SELECT * FROM information_schema.tables
+WHERE table_name = 't1_my_table';
+--horizontal_results
+#
+# Check modification of TABLE_NAME
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+#
+# Check modification of TABLE_SCHEMA
+SELECT table_schema,table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT table_schema,table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Check modification of ENGINE
+--replace_result $engine_type <engine_type>
+SELECT table_name, engine FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+--replace_result $other_engine_type <other_engine_type>
+eval
+ALTER TABLE db_datadict.t1_my_tablex
+ENGINE = $other_engine_type;
+--replace_result $other_engine_type <other_engine_type>
+SELECT table_name, engine FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Check modification of TABLE_ROWS
+SELECT table_name, table_rows FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+INSERT INTO db_datadict.t1_my_tablex VALUES(1),(2);
+SELECT table_name, table_rows FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Check indirect modification of TABLE_COLLATION
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex DEFAULT CHARACTER SET utf8;
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+# Check direct modification of TABLE_COLLATION
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci;
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Check modification of TABLE_COMMENT
+SELECT table_name, TABLE_COMMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex COMMENT 'Changed Comment';
+SELECT table_name, TABLE_COMMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Check modification of AUTO_INCREMENT
+SELECT table_name, AUTO_INCREMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+ADD f2 BIGINT AUTO_INCREMENT, ADD PRIMARY KEY (f2);
+SELECT table_name, AUTO_INCREMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Check modification of ROW_FORMAT
+SELECT table_name, ROW_FORMAT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex ROW_FORMAT = dynamic;
+SELECT table_name, ROW_FORMAT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Check "growth" of UPDATE_TIME and modification of CHECKSUM
+SELECT table_name, checksum FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex CHECKSUM = 1;
+SELECT table_name, checksum IS NOT NULL FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+SELECT UPDATE_TIME, checksum INTO @UPDATE_TIME, @checksum
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+# Enforce a time difference bigger than the smallest unit (1 second).
+--real_sleep 1.1
+INSERT INTO db_datadict.t1_my_tablex SET f1 = 3;
+FLUSH TABLES;
+SELECT UPDATE_TIME > @UPDATE_TIME
+ AS "Is current UPDATE_TIME bigger than before last INSERT?"
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+SELECT checksum <> @checksum
+ AS "Is current CHECKSUM different than before last INSERT?"
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Information is used later
+SELECT CREATE_TIME INTO @CREATE_TIME FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Check impact of DROP TABLE
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+#
+# Check "growth" of CREATE_TIME
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE test.t1_my_tablex (f1 BIGINT)
+ENGINE = $other_engine_type;
+SELECT CREATE_TIME > @CREATE_TIME
+ AS "Is current CREATE_TIME bigger than for the old dropped table?"
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+DROP TABLE test.t1_my_tablex;
+#
+# Check a VIEW
+CREATE VIEW test.t1_my_tablex AS SELECT 1;
+--vertical_results
+SELECT * FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+--horizontal_results
+DROP VIEW test.t1_my_tablex;
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+#
+# Check a temporary table
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TEMPORARY TABLE test.t1_my_tablex
+ENGINE = $other_engine_type
+ AS SELECT 1;
+--vertical_results
+SELECT table_name, table_type FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+--horizontal_results
+DROP TEMPORARY TABLE test.t1_my_tablex;
+#
+# Check impact of DROP SCHEMA
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = $engine_type AS
+SELECT 1;
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = $engine_type;
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.tables
+SELECT * FROM information_schema.tables;
+
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.tables SET table_schema = 'test'
+WHERE table_name = 't1';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.tables WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.tables;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx_on_tables ON information_schema.tables(table_schema);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.tables DROP PRIMARY KEY;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.tables ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.tables;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.tables RENAME db_datadict.tables;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.tables RENAME information_schema.xtables;
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/datadict/is_triggers.inc b/mysql-test/suite/funcs_1/datadict/is_triggers.inc
new file mode 100644
index 00000000..5dda419a
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/is_triggers.inc
@@ -0,0 +1,272 @@
+# suite/funcs_1/datadict/is_triggers.inc
+#
+# Check the layout of information_schema.triggers and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing triggers
+# (there are no in the moment) within the databases information_schema
+# and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+# Last Change:
+# 2008-06-11 mleich Move t/is_triggers.test to this file and
+# create variants for embedded/non embedded server.
+#
+
+--source include/default_charset.inc
+set @save_sql_mode=@@global.sql_mode;
+set global sql_mode="";
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = TRIGGERS;
+
+# The table INFORMATION_SCHEMA.TRIGGERS must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.TRIGGERS layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.TRIGGERS table has the following columns,
+# in the following order:
+#
+# TRIGGER_CATALOG NULL
+# TRIGGER_SCHEMA name of the database in which the trigger occurs
+# TRIGGER_NAME
+# EVENT_MANIPULATION event associated with the trigger
+# ('INSERT', 'DELETE', or 'UPDATE')
+# EVENT_OBJECT_CATALOG NULL
+# EVENT_OBJECT_SCHEMA database in which the table associated with the
+# trigger occurs
+# EVENT_OBJECT_TABLE name of the table associated with the trigger
+# ACTION_ORDER 0
+# ACTION_CONDITION NULL
+# ACTION_STATEMENT
+# ACTION_ORIENTATION ROW
+# ACTION_TIMING 'BEFORE' or 'AFTER'
+# ACTION_REFERENCE_OLD_TABLE NULL
+# ACTION_REFERENCE_NEW_TABLE NULL
+# ACTION_REFERENCE_OLD_ROW OLD
+# ACTION_REFERENCE_NEW_ROW NEW
+# CREATED NULL (0)
+# SQL_MODE server SQL mode that was in effect at the time
+# when the trigger was created
+# (also used during trigger execution)
+# DEFINER who defined the trigger
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.tables is in is_columns_is.test.
+
+# Show that several columns are always NULL.
+--replace_column 17 #
+SELECT * FROM information_schema.triggers
+WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL
+ OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL
+ OR action_reference_new_table IS NOT NULL
+ORDER BY trigger_schema, trigger_name;
+
+
+--echo ##################################################################################
+--echo # Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information
+--echo ##################################################################################
+# 3.2.18.2: Ensure that the table shows the relevant information on every
+# trigger on which the current user or PUBLIC has privileges.
+# 3.2.18.3: Ensure that the table does not show any information on any trigger
+# on which the current user and public have no privileges.
+# The SUPER (before 5.1.22) or TRIGGER (since 5.1.22) privilege is required for
+# - creation of triggers
+# - retrieval in INFORMATION_SCHEMA.TRIGGERS (affects size of result set)
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser4'@'localhost';
+CREATE USER 'testuser4'@'localhost';
+
+GRANT TRIGGER ON *.* TO 'testuser1'@'localhost';
+GRANT TRIGGER ON *.* TO 'testuser3'@'localhost';
+GRANT TRIGGER ON *.* TO 'testuser4'@'localhost';
+GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+
+let $my_select = SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+let $my_show = SHOW TRIGGERS FROM db_datadict;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 INT, f2 INT, f3 INT)
+ENGINE = $engine_type;
+CREATE TRIGGER trg1 BEFORE INSERT
+ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before;
+GRANT ALL ON db_datadict.t1 TO 'testuser2'@'localhost';
+REVOKE TRIGGER ON db_datadict.t1 FROM 'testuser2'@'localhost';
+GRANT SELECT ON db_datadict.t1 TO 'testuser3'@'localhost';
+--replace_column 17 #
+eval $my_select;
+--replace_column 6 #
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict);
+SHOW GRANTS FOR 'testuser2'@'localhost';
+--echo # No TRIGGER Privilege --> no result for query
+--replace_column 17 #
+eval $my_select;
+--replace_column 6 #
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser3, localhost, testuser3, , test);
+SHOW GRANTS FOR 'testuser3'@'localhost';
+--echo # TRIGGER Privilege + SELECT Privilege on t1 --> result for query
+--replace_column 17 #
+eval $my_select;
+--replace_column 6 #
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser4, localhost, testuser4, , test);
+SHOW GRANTS FOR 'testuser4'@'localhost';
+--echo # TRIGGER Privilege + no SELECT Privilege on t1 --> result for query
+--disable_abort_on_error
+SELECT * FROM db_datadict.t1;
+DESC db_datadict.t1;
+--replace_column 17 #
+eval $my_select;
+--replace_column 6 #
+eval $my_show;
+
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+disconnect testuser4;
+--replace_column 17 #
+eval $my_select;
+--replace_column 6 #
+eval $my_show;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP USER 'testuser4'@'localhost';
+DROP DATABASE db_datadict;
+
+
+--echo #########################################################################
+--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TRIGGERS modifications
+--echo #########################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+# FIXME: To be implemented
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = $engine_type;
+CREATE TRIGGER db_datadict.trg1 BEFORE INSERT
+ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before;
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.triggers
+SELECT * FROM information_schema.triggers;
+
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.triggers SET trigger_schema = 'test'
+WHERE table_name = 't1';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.triggers WHERE trigger_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.triggers;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx_on_triggers ON information_schema.triggers(trigger_schema);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.triggers DROP PRIMARY KEY;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.triggers ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.triggers;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.triggers RENAME db_datadict.triggers;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers;
+
+# Cleanup
+DROP DATABASE db_datadict;
+
+set global sql_mode=@save_sql_mode;
+
diff --git a/mysql-test/suite/funcs_1/datadict/is_views.inc b/mysql-test/suite/funcs_1/datadict/is_views.inc
new file mode 100644
index 00000000..acf12ce5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/is_views.inc
@@ -0,0 +1,310 @@
+# suite/funcs_1/datadict/is_views.inc
+#
+# Check the layout of information_schema.views and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+#
+# Note:
+# - This test should not check storage engine properties.
+# - Please do not change the storage engines used within this test
+# except you know that the impact is acceptable.
+# Some storage engines might not support the modification of
+# properties like in the following tests.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+# Last Change:
+# 2008-06-11 mleich Move t/is_views.test to this file and
+# create variants for embedded/non embedded server.
+#
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = VIEWS;
+
+# The table INFORMATION_SCHEMA.VIEWS must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.13.1: INFORMATION_SCHEMA.VIEWS layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.VIEWS table has the following columns,
+# in the following order:
+#
+# TABLE_CATALOG (always shows NULL),
+# TABLE_SCHEMA (shows the database, or schema, in which an accessible
+# view resides),
+# TABLE_NAME (shows the name of a view accessible to the current user),
+# VIEW_DEFINITION (shows the SELECT statement that makes up the
+# view's definition),
+# CHECK_OPTION (shows the value of the WITH CHECK OPTION clause used to define
+# the view, either NONE, LOCAL or CASCADED),
+# IS_UPDATABLE (shows whether the view is an updatable view),
+# DEFINER (added with 5.0.14),
+# SECURITY_TYPE (added with 5.0.14).
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.views is in is_columns_is.test.
+
+# Show that TABLE_CATALOG is always 'def'.
+SELECT table_catalog, table_schema, table_name
+FROM information_schema.views WHERE table_catalog <> 'def';
+
+
+--echo ################################################################################
+--echo # Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information
+--echo ################################################################################
+# 3.2.13.2: Ensure that the table shows the relevant information on every view for
+# which the current user or PUBLIC has the SHOW CREATE VIEW privilege.
+# 3.2.13.3: Ensure that the table does not show any information on any views for which
+# the current user and PUBLIC have no SHOW CREATE VIEW privilege.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'test_no_views'@'localhost';
+CREATE USER 'test_no_views'@'localhost';
+
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1(f1 INT, f2 INT, f3 INT)
+ENGINE = $engine_type;
+CREATE VIEW db_datadict.v_granted_to_1 AS SELECT * FROM db_datadict.t1;
+CREATE VIEW db_datadict.v_granted_glob AS SELECT f2, f3 FROM db_datadict.t1;
+
+GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.v_granted_to_1 TO 'testuser1'@'localhost';
+GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'testuser2'@'localhost';
+
+let $select = SELECT * FROM information_schema.views
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+eval $select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, ,"*NO-ONE*");
+eval $select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, ,"*NO-ONE*");
+eval $select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (test_no_views, localhost, test_no_views, ,"*NO-ONE*");
+eval $select;
+
+# Cleanup
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect test_no_views;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'test_no_views'@'localhost';
+DROP DATABASE db_datadict;
+
+--echo #########################################################################
+--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.VIEWS modifications
+--echo #########################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = $engine_type;
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+
+# Check just created VIEW
+SELECT * FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema, table_name;
+CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table;
+CREATE ALGORITHM=MERGE VIEW test.t1_view1 AS SELECT f1 FROM test.t1_table;
+CREATE ALGORITHM=TEMPTABLE VIEW test.t1_view2 AS SELECT f1 FROM test.t1_table;
+SELECT * FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema, table_name;
+DROP VIEW test.t1_view1;
+DROP VIEW test.t1_view2;
+
+#
+# Check modification of DEFINER, SECURITY_TYPE, IS_UPDATABLE, VIEW_DEFINITION,
+# CHECK_OPTION
+SELECT table_name,definer FROM information_schema.views
+WHERE table_name = 't1_view';
+ALTER DEFINER = 'testuser1'@'localhost' VIEW test.t1_view AS
+SELECT DISTINCT f1 FROM test.t1_table;
+# The next result set could suffer from
+# Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS
+# because the VIEW definition is missing.
+# Therefore we exclude the problematic columns from the result set.
+SELECT table_name,definer,security_type FROM information_schema.views
+WHERE table_name LIKE 't1_%';
+ALTER DEFINER = 'root'@'localhost' SQL SECURITY INVOKER VIEW test.t1_view AS
+SELECT f1 FROM test.t1_table WITH LOCAL CHECK OPTION;
+SELECT table_name,definer,security_type FROM information_schema.views
+WHERE table_name LIKE 't1_%';
+#
+# Check modification of TABLE_SCHEMA
+SELECT table_schema,table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+--error ER_FORBID_SCHEMA_CHANGE
+RENAME TABLE test.t1_view TO db_datadict.t1_view;
+# Workaround for missing move to another database
+DROP VIEW test.t1_view;
+CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table;
+SELECT table_schema,table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+#
+# Check modification of TABLE_NAME
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+#
+# Check impact of DROP VIEW
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+DROP VIEW db_datadict.t1_viewx;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table;
+#
+# Check impact of DROP base TABLE of VIEW
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+DROP TABLE test.t1_table;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT = 'Initial Comment'
+ENGINE = $engine_type;
+#
+# Check impact of DROP SCHEMA
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+
+# Cleanup
+DROP USER 'testuser1'@'localhost';
+DROP TABLE test.t1_table;
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA table are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+CREATE VIEW db_datadict.v1 AS SELECT 1;
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.views
+SELECT * FROM information_schema.views;
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.views(table_schema, table_name)
+VALUES ('db2', 'v2');
+
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.views SET table_schema = 'test'
+WHERE table_name = 't1';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.views WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.views;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx_on_views ON information_schema.views(table_schema);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.views DROP PRIMARY KEY;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.views ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.views;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.views RENAME db_datadict.views;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.views RENAME information_schema.xviews;
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc
new file mode 100644
index 00000000..90bc19f2
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc
@@ -0,0 +1,498 @@
+############ suite/funcs_1/datadict/processlist_priv.inc ###############
+# #
+# Testing of privileges around #
+# SELECT ... PROCESSLIST/SHOW PROCESSLIST #
+# #
+# Note(mleich): #
+# There is a significant risk to get an unstable test because of #
+# timing issues. #
+# Example1: #
+# 1. Disconnect connection X #
+# 2. Switch to connection Y #
+# 3. SHOW PROCESSLIST might present a record like #
+# <ID> <user> <host> <db> Quit 0 cleaning up NULL #
+# or even a row where connection X is without #
+# "Quit" or "cleaning up". #
+# That means our SHOW PROCESSLIST can come too early. #
+# Solution: #
+# Close the connections at the end of the test. #
+# Example2 (2008-08-14 again observed): #
+# 1. connection X: SHOW PROCESSLIST/GRANT ... etc. #
+# 2. Switch to connection Y #
+# 3. SHOW PROCESSLIST might present a record like #
+# <ID> <user> <host> <db> Query TIME cleaning up <command> #
+# <ID> <user> <host> <db> Query TIME writing to net <command> #
+# Problems happens more often in case of slow filesystem! #
+# First Solution: #
+# Insert a dummy SQL command where the cleanup is most probably #
+# fast before switching to another connection and running #
+# SHOW/SELECT PROCESSLIST. #
+# Suppress writing to protocol by assignment to $variable. #
+# let $my_var= `SELECT 1`; #
+# Even the 'SELECT 1' was in some cases in state #
+# "writing to net". #
+# Final Solution: #
+# --real_sleep 0.3 #
+# This value was at least on my box sufficient. #
+# Please inform us if this test fails so that we can adjust #
+# the sleep time better or switch to poll routines. #
+# #
+# Storage engine variants of this test do not make sense. #
+# - I_S tables use the MEMORY storage engine whenever possible. #
+# - There are some I_S table which need column data types which #
+# are not supported by MEMORY. Example: LONGTEXT/BLOB #
+# MyISAM will be used for such tables. #
+# The column PROCESSLIST.INFO is of data type LONGTEXT #
+# ----> MyISAM #
+# - There is no impact of the GLOBAL(server) or SESSION default #
+# storage engine setting on the engine used for I_S tables. #
+# #
+# Creation: #
+# 2007-08 hhunger Implement this test as part of #
+# WL#3982 Test information_schema.processlist #
+# #
+# Last update: #
+# 2008-08-14 mleich Bug#38270 Test "processlist_priv_ps" fails on #
+# varying "processlist" output #
+# - Replace one sleep by a poll routines #
+# - Remove or disable superfluous sleeps #
+# #
+########################################################################
+
+# The following variables are used in "datadict_priv.inc" and here.
+#
+# information_schema table to be tested
+let $table= processlist;
+#
+# columns of the information_schema table e.g. to use in a select.
+let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY;
+#
+# Where clause for an update.
+let $update_where= WHERE id=1 ;
+#
+# Column to be used in the SET of an update.
+let $set_column= user='any_user' ;
+#
+# Where clause of a delete.
+let $delete_where= WHERE id=1 ;
+#
+# Column to be dropped.
+let $drop_column= user;
+#
+# Column to be indexed
+let $index_col= user;
+
+USE information_schema;
+
+--echo ####################################################################################
+--echo 1 Prepare test.
+--echo connection default (user=root)
+--echo ####################################################################################
+
+# Check that we have only one connection around.
+# If there is more, it may be the check() connection that has not yet ended,
+# so we wait for it for up to 10 seconds.
+
+let $counter=100;
+while ($counter)
+{
+ dec $counter;
+ let $res= `SELECT COUNT(*) <> 1 FROM processlist`;
+ if (!$res)
+ {
+ # Success; Abort while loop
+ let $counter=0;
+ }
+ if ($res)
+ {
+ --sleep 0.1
+ if (!$counter)
+ {
+ --echo This test expects one connection to the server.
+ --echo Expectation: USER HOST DB COMMAND STATE INFO
+ --echo Expectation: root localhost information_schema Query executing SELECT USER,HOST,DB,COMMAND,STATE,INFO FROM processlist ORDER BY ID
+ --echo But we found in the moment:
+ SELECT USER,HOST,DB,COMMAND,STATE,INFO FROM processlist ORDER BY ID;
+ --echo Maybe
+ --echo - the base configuration (no of parallel auxiliary sessions) of the server has changed
+ --echo - a parallel test intended for another server accidently connected to our current one
+ --echo We cannot proceed in this situation. Abort
+ exit;
+ }
+ }
+}
+
+--echo ####################################################################################
+--echo 1.1 Create two user
+--echo ####################################################################################
+# access to info tables as normal user
+--error 0, ER_CANNOT_USER
+DROP USER ddicttestuser1@'localhost';
+--error 0, ER_CANNOT_USER
+DROP USER ddicttestuser2@'localhost';
+CREATE USER ddicttestuser1@'localhost';
+CREATE USER ddicttestuser2@'localhost';
+GRANT SELECT,UPDATE,DELETE,INSERT,CREATE,CREATE TEMPORARY TABLES,CREATE VIEW,DROP on test.* to ddicttestuser1@'localhost';
+GRANT SELECT,UPDATE,DELETE,INSERT,CREATE,CREATE TEMPORARY TABLES,CREATE VIEW,DROP on test.* to ddicttestuser2@'localhost';
+SET PASSWORD FOR ddicttestuser1@'localhost' = PASSWORD('ddictpass');
+SET PASSWORD FOR ddicttestuser2@'localhost' = PASSWORD('ddictpass');
+
+--echo ####################################################################################
+--echo 1.2 Establish connection con100 (user=ddicttestuser1 with no PROCESS privilege):
+connect (con100,localhost,ddicttestuser1,ddictpass,information_schema);
+--echo ####################################################################################
+
+
+--echo ####################################################################################
+--echo 2 connection default(user=root with default privileges):
+--echo SHOW/SELECT shows all processes/threads.
+--echo ####################################################################################
+connection default;
+# Avoid Bug#38270 Test "processlist_priv_ps" fails on varying "processlist" output
+# This subtest expects that the connection con100 is in state 'Sleep'.
+# Poll till the connection con100 is in state COMMAND = 'Sleep'.
+let $wait_timeout= 10;
+let $wait_condition=
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE DB = 'information_schema' AND COMMAND = 'Sleep' AND USER = 'ddicttestuser1' AND state='';
+--source include/wait_condition.inc
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+eval SHOW CREATE TABLE $table;
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+eval SHOW $table;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+eval SELECT * FROM $table $select_where ORDER BY id;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
+eval SELECT $columns FROM $table $select_where ORDER BY id;
+--source suite/funcs_1/datadict/datadict_priv.inc
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 3 Switch to connection con100 (user=ddicttestuser1 with no PROCESS privilege):
+connection con100;
+--echo SHOW/SELECT shows only the processes (1) of the user.
+--echo ####################################################################################
+# No need for poll routine here.
+# The current state of the default session might depend on load of testing box
+# but "ddicttestuser1" must not see anything of the root session.
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+eval SHOW CREATE TABLE $table;
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+eval SHOW $table;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+eval SELECT * FROM $table $select_where ORDER BY id;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
+eval SELECT $columns FROM $table $select_where ORDER BY id;
+--source suite/funcs_1/datadict/datadict_priv.inc
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 4 Grant PROCESS privilege to ddicttestuser1
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+GRANT PROCESS ON *.* TO ddicttestuser1@'localhost' IDENTIFIED BY 'ddictpass';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 4.1 Existing connection con100 (ddicttestuser1)
+--echo The user ddicttestuser1 has the PROCESS privilege, but the connection was
+--echo established before PROCESS was granted.
+--echo SHOW/SELECT shows only the processes (1) of the user.
+--echo ####################################################################################
+connection con100;
+SHOW GRANTS;
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
+--echo SHOW/SELECT shows all processes/threads.
+--echo ####################################################################################
+connect (con101,localhost,ddicttestuser1,ddictpass,information_schema);
+SHOW GRANTS;
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 5 Grant PROCESS privilege to anonymous user.
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+create user ''@'localhost';
+GRANT PROCESS ON *.* TO ''@'localhost';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 5.1 Establish connection (anonymous1,localhost,'',,information_schema)
+--echo anonymous user with PROCESS privilege
+--echo SHOW/SELECT shows all processes/threads.
+--echo ####################################################################################
+connect (anonymous1,localhost,"''",,information_schema);
+SHOW GRANTS;
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 6 Revoke PROCESS privilege from ddicttestuser1
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+REVOKE PROCESS ON *.* FROM ddicttestuser1@'localhost';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 6.1 New connection con102 (ddicttestuser1 has no more PROCESS privilege)
+connect (con102,localhost,ddicttestuser1,ddictpass,information_schema);
+--echo Again (compared to state before GRANT PROCESS) only the processes of
+--echo ddicttestuser1 are visible.
+--echo ####################################################################################
+SHOW GRANTS;
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 7 Revoke PROCESS privilege from anonymous user
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+REVOKE PROCESS ON *.* FROM ''@'localhost';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 7.1 New connection (anonymous2,localhost,'',,information_schema)
+connect (anonymous2,localhost,"''",,information_schema);
+--echo The anonymous user has no more the PROCESS privilege
+--echo Again only the processes of the anonymous user are visible.
+--echo ####################################################################################
+SHOW GRANTS FOR ''@'localhost';
+if ($fixed_bug_30395)
+{
+# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+}
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 8.1 New connection con103 (ddicttestuser1 with SUPER privilege)
+connect (con103,localhost,ddicttestuser1,ddictpass,information_schema);
+--echo Only the processes of ddicttestuser1 user are visible.
+--echo ####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 9 Revoke SUPER privilege from user ddicttestuser1
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+REVOKE SUPER ON *.* FROM 'ddicttestuser1'@'localhost';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 9.1 New connection con104 (ddicttestuser1 without SUPER privilege)
+connect (con104,localhost,ddicttestuser1,ddictpass,information_schema);
+--echo ddicttestuser1 has no more the SUPER privilege.
+--echo Only the processes of ddicttestuser1 are visible.
+--echo ####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 10 Grant SUPER privilege with grant option to user ddicttestuser1.
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost' WITH GRANT OPTION;
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 10.1 New connection con105 (ddicttestuser1 with SUPER privilege and GRANT OPTION)
+connect (con105,localhost,ddicttestuser1,ddictpass,information_schema);
+--echo Try to grant PROCESS privilege to user ddicttestuser2 without having it.
+--echo ####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+--error ER_ACCESS_DENIED_ERROR
+GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+
+--echo ####################################################################################
+--echo 10.2 Grant SUPER and PROCESS privilege with grant option to user ddicttestuser1
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+GRANT SUPER,PROCESS ON *.* TO 'ddicttestuser1'@'localhost' WITH GRANT OPTION;
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 10.3 New connection con106 (ddicttestuser1 with SUPER,PROCESS WITH GRANT OPTION)
+connect (con106,localhost,ddicttestuser1,ddictpass,information_schema);
+--echo Grant PROCESS privilege to user ddicttestuser2
+--echo ####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 10.4 New connection con200 (ddicttestuser2 with PROCESS privilege)
+connect (con200,localhost,ddicttestuser2,ddictpass,information_schema);
+--echo ddicttestuser2 has now the PROCESS privilege and sees all connections
+--echo ####################################################################################
+SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
+--echo connection ddicttestuser1;
+--echo ####################################################################################
+connection con106;
+REVOKE PROCESS ON *.* FROM 'ddicttestuser2'@'localhost';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 11.1 New connection con201 (ddicttestuser2)
+connect (con201,localhost,ddicttestuser2,ddictpass,information_schema);
+--echo ddicttestuser2 has no more the PROCESS privilege and can only see own connects
+--echo ####################################################################################
+SHOW GRANTS;
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+REVOKE SUPER,PROCESS,GRANT OPTION ON *.* FROM 'ddicttestuser1'@'localhost';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 11.3 New connection con107 (ddicttestuser1)
+connect (con107,localhost,ddicttestuser1,ddictpass,information_schema);
+--echo ddicttestuser1 has no more the PROCESS privilege and can only see own connects
+--echo He is also unable to GRANT the PROCESS privilege to ddicttestuser2
+--echo ####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+--error ER_ACCESS_DENIED_ERROR
+GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo 12 Revoke the SELECT privilege from user ddicttestuser1
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+REVOKE SELECT ON *.* FROM 'ddicttestuser1'@'localhost';
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 12.1 New connection con108 (ddicttestuser1)
+connect (con108,localhost,ddicttestuser1,ddictpass,information_schema);
+--echo ddicttestuser1 has neither PROCESS nor SELECT privilege
+--echo Manual says: Each MySQL user has the right to access these tables, but can see
+--echo only the rows ...
+--echo Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST.
+--echo ####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+--replace_result Execute Query
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
+SHOW processlist;
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
+SELECT * FROM information_schema.processlist;
+--real_sleep 0.3
+
+--echo ####################################################################################
+--echo 12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
+--echo connection default (user=root)
+--echo ####################################################################################
+connection default;
+--error ER_DBACCESS_DENIED_ERROR
+REVOKE SELECT ON information_schema.* FROM 'ddicttestuser3'@'localhost';
+--real_sleep 0.3
+
+
+--echo ####################################################################################
+--echo connection default (user=root)
+--echo Cleanup: close connections, DROP USER etc.
+--echo ####################################################################################
+connection default;
+disconnect con100;
+disconnect con101;
+disconnect con102;
+disconnect con103;
+disconnect con104;
+disconnect con105;
+disconnect con106;
+disconnect con107;
+disconnect con108;
+disconnect con200;
+disconnect con201;
+disconnect anonymous1;
+disconnect anonymous2;
+DROP USER ddicttestuser1@'localhost';
+DROP USER ddicttestuser2@'localhost';
+REVOKE USAGE ON *.* FROM ''@'localhost';
+DROP USER ''@'localhost';
diff --git a/mysql-test/suite/funcs_1/datadict/processlist_val.inc b/mysql-test/suite/funcs_1/datadict/processlist_val.inc
new file mode 100644
index 00000000..fa6ed404
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/processlist_val.inc
@@ -0,0 +1,412 @@
+########### suite/funcs_1/datadict/processlist_val.inc #########################
+# #
+# Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
+# #
+# Ensure that the values fit to the current state of the connection and #
+# especially that they change if a connection does nothing or runs some SQL. #
+# runs some SQL. #
+# Examples: #
+# - change the default database #
+# - send some period of time no SQL command to the server #
+# - send a long running query #
+# #
+# Note(mleich): #
+# 1. Please inform me if this test fails because of timing problems. #
+# 2. Storage engine variants of this test do not make sense. #
+# - I_S tables use the MEMORY storage engine whenever possible. #
+# - There are some I_S tables which need column data types which are not #
+# supported by MEMORY. Example: LONGTEXT/BLOB #
+# MyISAM will be used for such tables. #
+# The column PROCESSLIST.INFO is of data type LONGTEXT ----> MyISAM #
+# - There is no impact of the GLOBAL(server) or SESSION default storage #
+# engine setting on the engine used for I_S tables. #
+# 3. The SHOW (FULL) PROCESSLIST command are for comparison. #
+# The main test target is INFORMATION_SCHEMA.PROCESSLIST ! #
+# 4. Attention: #
+# The values of the PROCESSLIST columns HOST and TIME tend to cause #
+# problems and therefore their printing has to be suppressed. #
+# Examples of the exact values: #
+# HOST: 'localhost' (UNIX derivates) #
+# 'localhost:<varying_port>' (WINDOWS) #
+# TIME: In many cases within this test 0 seconds but if the testing box is #
+# overloaded we might get up to 2 seconds. #
+# Solution: #
+# --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> #
+# 5. How to debug the script? #
+# <graphical diff tool> \ #
+# suite/funcs_1/datadict/processlist_val.inc \ #
+# <Result|Reject|Log file> #
+# I tweaked a lot of the script lines around "echo" so that you will get a #
+# lot of useful synchronisation. #
+# #
+# Creation: #
+# 2007-08-09 mleich Implement this test as part of #
+# WL#3982 Test information_schema.processlist #
+# #
+# Last Modification: #
+# 2008-07-04 mleich Fix for #
+# Bug#37853 Test "funcs_1.processlist_val_ps" fails in #
+# various ways #
+# - issues with printing of port (Win only) #
+# - too optimistic assumptions about timing #
+# + corrections of logic in poll routines #
+# + minor improvements #
+################################################################################
+
+# Basic preparations
+--error 0, ER_CANNOT_USER
+DROP USER test_user@'localhost';
+CREATE USER test_user@'localhost';
+GRANT ALL ON *.* TO test_user@'localhost';
+REVOKE PROCESS ON *.* FROM test_user@'localhost';
+SET PASSWORD FOR test_user@'localhost' = PASSWORD('ddictpass');
+--disable_warnings
+DROP TABLE IF EXISTS test.t1;
+--enable_warnings
+CREATE TABLE test.t1 (f1 BIGINT);
+USE test;
+
+
+echo
+# Show the definition of the PROCESSLIST table
+#--------------------------------------------------------------------------
+;
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST;
+
+echo
+# Ensure that the information about the own connection is correct.
+#--------------------------------------------------------------------------
+;
+# Expected values
+# - USER = 'root'
+# - HOST (printed value is unified), the exact values are often like
+# UNIX: 'localhost'
+# WIN: 'localhost:<some port>'
+# - DB = 'test'
+# - Command IN (no protocol -> 'Query', ps-protocol -> 'Execute')
+# - TIME (printed value will be unified), the exact values are like
+# "normal" load: 0 (seconds)
+# "heavy" load: 1 or more (seconds)
+# - State 'Filling schema table'
+# - INFO must contain the corresponding SHOW/SELECT PROCESSLIST
+#
+# 1. Just dump what we get
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS>
+SHOW FULL PROCESSLIST;
+#
+# Determine the connection id of the current connection (default)
+SET @default_id = CONNECTION_ID();
+#
+# 2. There must be exact one connection with @default_id;
+SELECT COUNT(*) = 1 AS "Expect exact one connection with this id"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id;
+#
+# 3. Check the remaining stuff
+SELECT COUNT(*) = 1 AS "Expect 1"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id
+ AND USER = 'root' AND DB = 'test' AND Command IN('Query','Execute')
+ AND State = 'Filling schema table';
+#
+# 4. Change the DB
+USE information_schema;
+SELECT COUNT(*) = 1 AS "Is the DB correct?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id AND DB = 'information_schema';
+#
+# 5. Change the statement
+let $my_statement =
+SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id;
+eval $my_statement;
+eval
+SELECT @my_info = '$my_statement'
+ AS 'Is the content of PROCESSLIST.INFO correct?';
+#
+# 6. TIME must have a reasonable value
+SELECT COUNT(*) = 1 AS "Has TIME a reasonable value?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id AND 0 <= TIME < 10 AND 0 <= TIME_MS < 10000;
+
+
+echo
+# Ensure that the information about an inactive connection is correct.
+#--------------------------------------------------------------------------
+;
+connect (con1,localhost,test_user,ddictpass,information_schema);
+#
+connection default;
+# We have now a second connection.
+# First working phase for the new connection is with Command = 'Connect'.
+# This is a very short phase and the likelihood to meet it is
+# - nearly zero on average boxes with low parallel load
+# - around some percent on weak or overloaded boxes
+# (Bug#32153 Status output differs - scheduling ?)
+# Therefore we do not try to catch this state.
+# We poll till we reach the long lasting phase with Command = 'Sleep'.
+# - USER = 'test_user'
+# - DB = 'information_schema'
+# - Command = 'Sleep'
+# - State is empty
+# - INFO IS NULL
+echo
+# Poll till the connection con1 is in state COMMAND = 'Sleep'.
+;
+let $wait_timeout= 10;
+let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE COMMAND = 'Sleep' AND USER = 'test_user';
+--source include/wait_condition.inc
+# 1. Just dump what we get
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+SHOW FULL PROCESSLIST;
+#
+# Pull ID and TIME of the second connection
+SELECT ID,TIME INTO @test_user_con1_id,@time FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE COMMAND = 'Sleep' AND USER = 'test_user';
+#
+# 2. The second connection must (behaviour at least since 2007) have an
+# ID = ID_of_previous_connection + 1
+SELECT @test_user_con1_id = @default_id + 1
+ AS "Did we got the next higher PROCESSLIST ID?";
+#
+# 3. TIME must have a reasonable value
+SELECT 0 <= @time < 10 AS "Has TIME a reasonable value?";
+#
+# 4. HOST must be for both connections similar (varying port on Win)
+SELECT COUNT(*) = 2 AS "Is HOST LIKE 'localhost%'?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE HOST LIKE 'localhost%';
+#
+# 5. Check the remaining stuff
+SELECT COUNT(*) = 1 AS "Expect 1"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @test_user_con1_id
+ AND USER = 'test_user' AND DB = 'information_schema'
+ AND Command = 'Sleep' AND State = '' AND INFO IS NULL;
+#
+# 6. Check that TIME increases
+let $wait_timeout= 10;
+let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE COMMAND = 'Sleep' AND USER = 'test_user'
+ AND TIME > @time;
+--source include/wait_condition.inc
+
+
+echo
+# Ensure that the user test_user sees only connections with his username
+# because he has not the PROCESS privilege.
+#----------------------------------------------------------------------------
+;
+connection con1;
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+SHOW FULL PROCESSLIST;
+
+
+echo
+# Ensure that the user test_user sees all connections with his username.
+#----------------------------------------------------------------------------
+;
+connect (con2,localhost,test_user,ddictpass,information_schema);
+connection default;
+# If the testing box is under heavy load we might see within some of the
+# next queries connection
+# con2 with Command = 'Connect'
+# con1 with INFO = 'SHOW FULL PROCESSLIST' and STATE = 'Writing to net'
+# Both phases are too short to be checked.
+echo
+# Poll till all connections of 'test_user' are in a state with COMMAND = 'Sleep'
+;
+let $wait_condition= SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE USER = 'test_user' AND COMMAND = 'Sleep' AND STATE = '';
+--source include/wait_condition.inc
+connection con2;
+# Just dump what we get
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+SHOW FULL PROCESSLIST;
+#
+connection default;
+# Pull the ID of con2, we will need it later
+SELECT ID INTO @test_user_con2_id FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID <> @test_user_con1_id
+ AND USER = 'test_user' AND DB = 'information_schema';
+
+
+echo
+# Ensure we get correct information about a connection during work
+#----------------------------------------------------------------------------
+;
+connection con2;
+# "Organise" a long running command to be observed by the root user.
+echo
+# Send a long enough running statement to the server, but do not
+# wait till the result comes back.
+;
+# Worst case scenario (=high I/O load on testing box):
+# - My experience:
+# Up to 2 seconds runtime per SELECT ... FROM INFORMATION_SCHEMA.PROCESSLIST
+# in rare cases.
+# - The following sequence contains ~ 4 of such SELECTs
+# Therefore we sleep 10 seconds.
+let $sleep_command =
+SELECT sleep(10), 17;
+send;
+eval $sleep_command;
+#
+connection default;
+echo
+# Poll till connection con2 is in state 'User sleep'.
+;
+# Expect to see within the processlist the other connection just during
+# statement execution.
+# - USER = 'test_user'
+# - DB = 'information_schema'
+# - Command = 'Query'(run without --ps-protocol)/'Execute' (run --ps-protocol)
+# - TIME >= 0
+# - State = 'User sleep'
+# - INFO = $sleep_command
+let $wait_condition=
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @test_user_con2_id AND Command IN('Query','Execute')
+ AND State = 'User sleep' AND INFO IS NOT NULL ;
+--source include/wait_condition.inc
+# 1. Just dump what we get
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+SHOW FULL PROCESSLIST;
+#
+# Pull some information about the connection con2
+SELECT STATE, TIME, INFO INTO @state, @time, @info
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @test_user_con2_id;
+# 2. TIME must have a reasonable value
+SELECT 0 <= @time < 10 AS "Has TIME a reasonable value?";
+# 3. STATE must be 'User sleep'
+SELECT @state = 'User sleep' AS "Has STATE the expected value?";
+# 4. INFO must fit
+eval SELECT @info = '$sleep_command' AS "Has INFO the expected value?";
+# 5. Check that TIME increases
+let $wait_timeout= 10;
+let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE ID = @test_user_con2_id AND INFO IS NOT NULL AND TIME > @time;
+--source include/wait_condition.inc
+connection con2;
+echo
+# Pull("reap") the result set from the statement executed with "send".
+;
+reap;
+connection default;
+echo
+# Poll till all connections of 'test_user' are in a state with COMMAND = 'Sleep'
+;
+let $wait_timeout= 10;
+let $wait_condition= SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE COMMAND = 'Sleep' AND USER = 'test_user';
+--source include/wait_condition.inc
+
+
+echo
+# Ensure that we see that a connection "hangs" when colliding with a
+# WRITE TABLE LOCK
+#----------------------------------------------------------------------------
+;
+LOCK TABLE test.t1 WRITE;
+#
+connection con2;
+echo
+# Send a statement to the server, but do not wait till the result
+# comes back. We will pull this later.
+;
+send
+SELECT COUNT(*) FROM test.t1;
+connection default;
+echo
+# Poll till INFO is no more NULL and State = 'Waiting for table metadata lock'.
+;
+let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE INFO IS NOT NULL AND STATE = 'Waiting for table metadata lock';
+--source include/wait_condition.inc
+#
+# Expect to see the state 'Waiting for table metadata lock' for the third
+# connection because the SELECT collides with the WRITE TABLE LOCK.
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+UNLOCK TABLES;
+#
+connection con2;
+echo
+# Pull("reap") the result set from the statement executed with "send".
+;
+reap;
+
+
+echo
+# Ensure that SHOW/SELECT processlist can handle extreme long commands
+#----------------------------------------------------------------------------
+;
+# We do not want to waste runtime, therefore we run the following test based
+# on "Lock collision" and not with some "sleep(10)".
+connection default;
+LOCK TABLE test.t1 WRITE;
+#
+connection con2;
+echo
+# Send a long (~20 KB code) statement to the server, but do not wait
+# till the result comes back. We will pull this later.
+;
+let $string=
+`SELECT CONCAT('BEGIN-',
+ REPEAT('This is the representative of a very long statement.',400),
+ '-END')`;
+let $my_statement =
+SELECT count(*),'$string' AS "Long string" FROM test.t1;
+send;
+eval $my_statement;
+connection default;
+echo
+# Poll till INFO is no more NULL and State = 'Waiting for table metadata lock'.
+;
+let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE INFO IS NOT NULL AND STATE = 'Waiting for table metadata lock';
+--source include/wait_condition.inc
+echo
+# Expect result:
+# Statement Content of INFO
+# SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST Complete statement
+# SHOW FULL PROCESSLIST Complete statement
+# SHOW PROCESSLIST statement truncated after 100 char
+;
+--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
+--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE>
+SHOW FULL PROCESSLIST;
+--replace_result Execute Query
+--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE>
+SHOW PROCESSLIST;
+UNLOCK TABLES;
+connection con2;
+echo
+# Pull("reap") the result set from the monster statement executed with "send".
+;
+reap;
+
+
+# Cleanup
+connection default;
+disconnect con1;
+disconnect con2;
+DROP USER test_user@'localhost';
+DROP TABLE test.t1;
diff --git a/mysql-test/suite/funcs_1/datadict/statistics.inc b/mysql-test/suite/funcs_1/datadict/statistics.inc
new file mode 100644
index 00000000..56a291a5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/statistics.inc
@@ -0,0 +1,52 @@
+# suite/funcs_1/datadict/statistics.inc
+#
+# Auxiliary script to be sourced by
+# is_statistics_is
+# is_statistics_mysql
+# is_statistics_<engine>
+#
+# Purpose:
+# Check the content of information_schema.statistics about tables within the
+# database '$database'.
+#
+# Usage:
+# The variable $database has to be set before sourcing this script.
+# Example:
+# let $database = db_data;
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source suite/funcs_1/datadict/datadict.pre
+
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+# Create a low privileged user.
+# Note: The database db_datadict is just a "home" for the low privileged user
+# and not in the focus of testing.
+--error 0,ER_CANNOT_USER
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON db_datadict.* TO testuser1@localhost;
+
+let $my_select = SELECT * FROM information_schema.statistics
+$my_where
+ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
+--replace_column 10 #CARD#
+eval $my_select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1,localhost,testuser1,,db_datadict);
+--replace_column 10 #CARD#
+eval $my_select;
+
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/datadict/table_constraints.inc b/mysql-test/suite/funcs_1/datadict/table_constraints.inc
new file mode 100644
index 00000000..74e4c038
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/table_constraints.inc
@@ -0,0 +1,43 @@
+# suite/funcs_1/datadict/table_constraints.inc
+#
+# Auxiliary script to be sourced by
+# suite/funcs_1/t/is_table_constraints_mysql.test
+# suite/funcs_1/t/is_table_constraints_is.test
+#
+# The variable
+# $table_schema database to be inspected
+# has to be set before sourcing this script.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+# Create a low privileged user.
+# Note: The database db_datadict is just a "home" for the low privileged user
+# and not in the focus of testing.
+--error 0,ER_CANNOT_USER
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON db_datadict.* TO testuser1@localhost;
+
+let $my_select = SELECT * FROM information_schema.table_constraints
+WHERE table_schema = '$table_schema'
+ORDER BY table_schema,table_name,constraint_name;
+eval $my_select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1,localhost,testuser1,,db_datadict);
+eval $my_select;
+
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/datadict/tables.inc b/mysql-test/suite/funcs_1/datadict/tables.inc
new file mode 100644
index 00000000..ad9abc3f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/tables.inc
@@ -0,0 +1,55 @@
+# suite/funcs_1/datadict/tables.inc
+#
+# Auxiliary script to be sourced by
+# is_tables_<engine>.test
+#
+# The variable $engine_type has to be assigned before sourcing ths script.
+#
+# Author:
+# 2008-06-04 mleich Create this script based on older scripts and new code.
+#
+
+--source include/default_charset.inc
+
+# Just have some tables within different databases.
+--disable_warnings
+DROP DATABASE IF EXISTS test1;
+DROP DATABASE IF EXISTS test2;
+--enable_warnings
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+
+--replace_result $engine_type <engine_to_be_used>
+eval CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = $engine_type;
+--replace_result $engine_type <engine_to_be_used>
+eval CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = $engine_type;
+--replace_result $engine_type <engine_to_be_used>
+eval CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = $engine_type;
+
+--source suite/funcs_1/datadict/tables2.inc
+SHOW TABLES FROM test1;
+SHOW TABLES FROM test2;
+
+# Create a low privileged user.
+# Note: The database db_datadict is just a "home" for the low privileged user
+# and not in the focus of testing.
+--error 0,ER_CANNOT_USER
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1,localhost,testuser1,,test1);
+--source suite/funcs_1/datadict/tables2.inc
+SHOW TABLES FROM test1;
+# The lowprivileged user testuser1 will get here an error.
+--disable_abort_on_error
+SHOW TABLES FROM test2;
+--enable_abort_on_error
+
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+
+DROP DATABASE test1;
+DROP DATABASE test2;
diff --git a/mysql-test/suite/funcs_1/datadict/tables1.inc b/mysql-test/suite/funcs_1/datadict/tables1.inc
new file mode 100644
index 00000000..36a4ee56
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/tables1.inc
@@ -0,0 +1,36 @@
+# suite/funcs_1/datadict/tables1.inc
+#
+# Auxiliary script to be sourced by
+# is_tables_mysql.test
+# is_tables_mysql_embedded.test
+# is_tables_is.test
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--disable_warnings
+DROP DATABASE IF EXISTS test1;
+--enable_warnings
+CREATE DATABASE test1;
+
+--source suite/funcs_1/datadict/tables2.inc
+
+# Create a low privileged user.
+# Note: The database test1 is just a "home" for the low privileged user
+# and not in the focus of testing.
+--error 0,ER_CANNOT_USER
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1,localhost,testuser1,,test1);
+--source suite/funcs_1/datadict/tables2.inc
+
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE test1;
diff --git a/mysql-test/suite/funcs_1/datadict/tables2.inc b/mysql-test/suite/funcs_1/datadict/tables2.inc
new file mode 100644
index 00000000..2d19eb8b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/tables2.inc
@@ -0,0 +1,45 @@
+# suite/funcs_1/datadict/tables2.inc
+#
+# Auxiliary script to be sourced by suite/funcs_1/datadict/tables1.inc.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+################################################################################
+
+# 8 TABLE_ROWS
+# 9 AVG_ROW_LENGTH
+# 10 DATA_LENGTH
+# 11 MAX_DATA_LENGTH
+# 12 INDEX_LENGTH
+# 13 DATA_FREE
+# 15 CREATE_TIME
+# 16 UPDATE_TIME
+# 17 CHECK_TIME
+# 20 CREATE_OPTIONS
+# 21 TABLE_COMMENT User defined comment
+# + InnoDB
+# + InnoDB: "InnoDB free: <number_kB> kB" appended
+# <number_kB> depends on tablespace history!
+# The LEFT/INSTR/IF/LENGTH stuff should remove these
+# storage engine specific part.
+let $innodb_pattern = 'InnoDB free';
+--vertical_results
+# We do not unify the engine name here, because the rowformat is
+# specific to the engine.
+--replace_result Dynamic DYNAMIC_OR_PAGE Page DYNAMIC_OR_PAGE MyISAM MYISAM_OR_MARIA Aria MYISAM_OR_MARIA
+--replace_column 8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#" 22 "#MIL#"
+eval
+SELECT *,
+ LEFT( table_comment,
+ IF(INSTR(table_comment,$innodb_pattern) = 0,
+ LENGTH(table_comment),
+ INSTR(table_comment,$innodb_pattern) - 1))
+ AS "user_comment",
+ '-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+$my_where
+ORDER BY table_schema,table_name;
+--horizontal_results
diff --git a/mysql-test/suite/funcs_1/disabled.def b/mysql-test/suite/funcs_1/disabled.def
new file mode 100644
index 00000000..9bfe9567
--- /dev/null
+++ b/mysql-test/suite/funcs_1/disabled.def
@@ -0,0 +1,12 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarely.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : Comment test
+#
+# Don't use any TAB characters for whitespace.
+#
+##############################################################################
+
diff --git a/mysql-test/suite/funcs_1/include/bug28309_skip.inc b/mysql-test/suite/funcs_1/include/bug28309_skip.inc
new file mode 100644
index 00000000..18ba6641
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/bug28309_skip.inc
@@ -0,0 +1,13 @@
+# Skip tests which suffer from
+# Bug#28309 First insert violates unique constraint
+# - was "memory" table empty?
+# if the folowing conditions are fulfilled:
+# - MySQL Version is 5.0 (Bug is fixed in 5.1 and up)
+# - use of embedded server
+# - run on a case insensitive filesystem
+#
+let $value= query_get_value(SHOW VARIABLES LIKE 'lower_case_file_system', Value, 1);
+if (`SELECT '$value' = 'ON' AND VERSION() LIKE '5.0%embedded%'`)
+{
+ skip # Test requires backport of fix for Bug#28309 First insert violates unique constraint - was "memory" table empty ?;
+}
diff --git a/mysql-test/suite/funcs_1/include/cleanup.inc b/mysql-test/suite/funcs_1/include/cleanup.inc
new file mode 100644
index 00000000..ef8b8f01
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/cleanup.inc
@@ -0,0 +1,21 @@
+# suite/funcs_1/include/cleanup.inc
+#
+# Remove all objects created by sourcing
+# suite/funcs_1/datadict/datadict_load.inc
+#
+DROP DATABASE test1;
+DROP DATABASE test4;
+DROP TABLE test.t1;
+DROP TABLE test.t2;
+DROP TABLE test.t3;
+DROP TABLE test.t4;
+DROP TABLE test.t7;
+DROP TABLE test.t8;
+DROP TABLE test.t9;
+DROP TABLE test.t10;
+DROP TABLE test.t11;
+DROP TABLE test.tb1;
+DROP TABLE test.tb2;
+DROP TABLE test.tb3;
+DROP TABLE test.tb4;
+
diff --git a/mysql-test/suite/funcs_1/include/innodb_tb1.inc b/mysql-test/suite/funcs_1/include/innodb_tb1.inc
new file mode 100644
index 00000000..02d17ece
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/innodb_tb1.inc
@@ -0,0 +1,70 @@
+##### suite/funcs_1/include/innodb_tb1.inc
+
+--disable_warnings
+drop table if exists tb1 ;
+--enable_warnings
+create table tb1 (
+f1 char(0),
+f2 char(0) binary,
+f3 char(0) ascii,
+f4 tinytext,
+f5 text,
+f6 mediumtext,
+f7 longtext,
+f8 tinyblob,
+f9 blob,
+f10 mediumblob,
+f11 longblob,
+f12 binary,
+f13 tinyint,
+f14 tinyint unsigned,
+f15 tinyint zerofill,
+f16 tinyint unsigned zerofill,
+f17 smallint,
+f18 smallint unsigned,
+f19 smallint zerofill,
+f20 smallint unsigned zerofill,
+f21 mediumint,
+f22 mediumint unsigned,
+f23 mediumint zerofill,
+f24 mediumint unsigned zerofill,
+f25 int,
+f26 int unsigned,
+f27 int zerofill,
+f28 int unsigned zerofill,
+f29 bigint,
+f30 bigint unsigned,
+f31 bigint zerofill,
+f32 bigint unsigned zerofill,
+f33 decimal,
+f34 decimal unsigned,
+f35 decimal zerofill,
+f36 decimal unsigned zerofill not null DEFAULT 9.9,
+f37 decimal (0) not null DEFAULT 9.9,
+f38 decimal (64) not null DEFAULT 9.9,
+f39 decimal (0) unsigned not null DEFAULT 9.9,
+f40 decimal (64) unsigned not null DEFAULT 9.9,
+f41 decimal (0) zerofill not null DEFAULT 9.9,
+f42 decimal (64) zerofill not null DEFAULT 9.9,
+f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
+f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
+f45 decimal (0,0) not null DEFAULT 9.9,
+f46 decimal (63,30) not null DEFAULT 9.9,
+f47 decimal (0,0) unsigned not null DEFAULT 9.9,
+f48 decimal (63,30) unsigned not null DEFAULT 9.9,
+f49 decimal (0,0) zerofill not null DEFAULT 9.9,
+f50 decimal (63,30) zerofill not null DEFAULT 9.9,
+f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
+f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
+f53 numeric not null DEFAULT 99,
+f54 numeric unsigned not null DEFAULT 99,
+f55 numeric zerofill not null DEFAULT 99,
+f56 numeric unsigned zerofill not null DEFAULT 99,
+f57 numeric (0) not null DEFAULT 99,
+f58 numeric (64) not null DEFAULT 99
+) engine = innodb;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb1.txt'
+into table tb1;
diff --git a/mysql-test/suite/funcs_1/include/innodb_tb2.inc b/mysql-test/suite/funcs_1/include/innodb_tb2.inc
new file mode 100644
index 00000000..1a5896cb
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/innodb_tb2.inc
@@ -0,0 +1,65 @@
+##### suite/funcs_1/include/innodb_tb2.inc
+
+--disable_warnings
+drop table if exists tb2 ;
+--enable_warnings
+--enable_prepare_warnings
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = innodb;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb2.txt'
+into table tb2;
+--disable_prepare_warnings
diff --git a/mysql-test/suite/funcs_1/include/innodb_tb3.inc b/mysql-test/suite/funcs_1/include/innodb_tb3.inc
new file mode 100644
index 00000000..a9968632
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/innodb_tb3.inc
@@ -0,0 +1,70 @@
+##### suite/funcs_1/include/innodb_tb3.inc
+
+--disable_warnings
+drop table if exists tb3 ;
+--enable_warnings
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 tinytext,
+f122 text,
+f123 mediumtext,
+f124 longtext,
+f125 tinyblob,
+f126 blob,
+f127 mediumblob,
+f128 longblob,
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = innodb;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb3.txt'
+into table tb3;
diff --git a/mysql-test/suite/funcs_1/include/innodb_tb4.inc b/mysql-test/suite/funcs_1/include/innodb_tb4.inc
new file mode 100644
index 00000000..95a0b8af
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/innodb_tb4.inc
@@ -0,0 +1,72 @@
+##### suite/funcs_1/include/innodb_tb4.inc
+
+--disable_warnings
+drop table if exists tb4;
+--enable_warnings
+--enable_prepare_warnings
+create table tb4 (
+f176 numeric (0) unsigned not null DEFAULT 9,
+f177 numeric (64) unsigned not null DEFAULT 9,
+f178 numeric (0) zerofill not null DEFAULT 9,
+f179 numeric (64) zerofill not null DEFAULT 9,
+f180 numeric (0) unsigned zerofill not null DEFAULT 9,
+f181 numeric (64) unsigned zerofill not null DEFAULT 9,
+f182 numeric (0,0) not null DEFAULT 9,
+f183 numeric (63,30) not null DEFAULT 9,
+f184 numeric (0,0) unsigned not null DEFAULT 9,
+f185 numeric (63,30) unsigned not null DEFAULT 9,
+f186 numeric (0,0) zerofill not null DEFAULT 9,
+f187 numeric (63,30) zerofill not null DEFAULT 9,
+f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
+f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
+f190 real not null DEFAULT 88.8,
+f191 real unsigned not null DEFAULT 88.8,
+f192 real zerofill not null DEFAULT 88.8,
+f193 real unsigned zerofill not null DEFAULT 88.8,
+f194 double not null DEFAULT 55.5,
+f195 double unsigned not null DEFAULT 55.5,
+f196 double zerofill not null DEFAULT 55.5,
+f197 double unsigned zerofill not null DEFAULT 55.5,
+f198 float,
+f199 float unsigned,
+f200 float zerofill,
+f201 float unsigned zerofill,
+f202 float(0),
+f203 float(23),
+f204 float(0) unsigned,
+f205 float(23) unsigned,
+f206 float(0) zerofill,
+f207 float(23) zerofill,
+f208 float(0) unsigned zerofill,
+f209 float(23) unsigned zerofill,
+f210 float(24),
+f211 float(53),
+f212 float(24) unsigned,
+f213 float(53) unsigned,
+f214 float(24) zerofill,
+f215 float(53) zerofill,
+f216 float(24) unsigned zerofill,
+f217 float(53) unsigned zerofill,
+f218 date,
+f219 time,
+f220 datetime,
+f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+f222 year,
+f223 year(3),
+f224 year(4),
+f225 enum("1enum","2enum"),
+f226 set("1set","2set"),
+f235 char(0),
+f236 char(90),
+f237 char(255) ascii,
+f238 varchar(0),
+f239 varchar(20000) binary,
+f240 varchar(2000),
+f241 char(100)
+) engine = innodb;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb4.txt'
+into table tb4;
+--disable_prepare_warnings
diff --git a/mysql-test/suite/funcs_1/include/memory_tb1.inc b/mysql-test/suite/funcs_1/include/memory_tb1.inc
new file mode 100644
index 00000000..e15f14bf
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/memory_tb1.inc
@@ -0,0 +1,62 @@
+##### suite/funcs_1/include/memory_tb1.inc
+
+--disable_warnings
+drop table if exists tb1 ;
+--enable_warnings
+create table tb1 (
+f1 char,
+f2 char binary,
+f3 char ascii,
+f12 binary,
+f13 tinyint,
+f14 tinyint unsigned,
+f15 tinyint zerofill,
+f16 tinyint unsigned zerofill,
+f17 smallint,
+f18 smallint unsigned,
+f19 smallint zerofill,
+f20 smallint unsigned zerofill,
+f21 mediumint,
+f22 mediumint unsigned,
+f23 mediumint zerofill,
+f24 mediumint unsigned zerofill,
+f25 int,
+f26 int unsigned,
+f27 int zerofill,
+f28 int unsigned zerofill,
+f29 bigint,
+f30 bigint unsigned,
+f31 bigint zerofill,
+f32 bigint unsigned zerofill,
+f33 decimal not null DEFAULT 9.9,
+f34 decimal unsigned not null DEFAULT 9.9,
+f35 decimal zerofill not null DEFAULT 9.9,
+f36 decimal unsigned zerofill not null DEFAULT 9.9,
+f37 decimal (0) not null DEFAULT 9.9,
+f38 decimal (64) not null DEFAULT 9.9,
+f39 decimal (0) unsigned not null DEFAULT 9.9,
+f40 decimal (64) unsigned not null DEFAULT 9.9,
+f41 decimal (0) zerofill not null DEFAULT 9.9,
+f42 decimal (64) zerofill not null DEFAULT 9.9,
+f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
+f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
+f45 decimal (0,0) not null DEFAULT 9.9,
+f46 decimal (63,30) not null DEFAULT 9.9,
+f47 decimal (0,0) unsigned not null DEFAULT 9.9,
+f48 decimal (63,30) unsigned not null DEFAULT 9.9,
+f49 decimal (0,0) zerofill not null DEFAULT 9.9,
+f50 decimal (63,30) zerofill not null DEFAULT 9.9,
+f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
+f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
+f53 numeric not null DEFAULT 99,
+f54 numeric unsigned not null DEFAULT 99,
+f55 numeric zerofill not null DEFAULT 99,
+f56 numeric unsigned zerofill not null DEFAULT 99,
+f57 numeric (0) not null DEFAULT 99,
+f58 numeric (64) not null DEFAULT 99
+) engine = memory;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb1.txt'
+into table tb1;
diff --git a/mysql-test/suite/funcs_1/include/memory_tb2.inc b/mysql-test/suite/funcs_1/include/memory_tb2.inc
new file mode 100644
index 00000000..b9e6bd72
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/memory_tb2.inc
@@ -0,0 +1,68 @@
+##### suite/funcs_1/include/memory_tb2.inc
+
+--disable_warnings
+drop table if exists tb2 ;
+--enable_warnings
+
+--enable_prepare_warnings
+
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = memory;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb2.txt'
+into table tb2 ;
+
+--disable_prepare_warnings
diff --git a/mysql-test/suite/funcs_1/include/memory_tb3.inc b/mysql-test/suite/funcs_1/include/memory_tb3.inc
new file mode 100644
index 00000000..f384c1b5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/memory_tb3.inc
@@ -0,0 +1,64 @@
+##### suite/funcs_1/include/memory_tb3.inc
+
+--disable_warnings
+drop table if exists tb3;
+--enable_warnings
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = memory;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
diff --git a/mysql-test/suite/funcs_1/include/memory_tb4.inc b/mysql-test/suite/funcs_1/include/memory_tb4.inc
new file mode 100644
index 00000000..786e2772
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/memory_tb4.inc
@@ -0,0 +1,71 @@
+##### suite/funcs_1/include/memory_tb4.inc
+
+--disable_warnings
+drop table if exists tb4 ;
+--enable_warnings
+--enable_prepare_warnings
+create table tb4 (
+f176 numeric (0) unsigned not null DEFAULT 9,
+f177 numeric (64) unsigned not null DEFAULT 9,
+f178 numeric (0) zerofill not null DEFAULT 9,
+f179 numeric (64) zerofill not null DEFAULT 9,
+f180 numeric (0) unsigned zerofill not null DEFAULT 9,
+f181 numeric (64) unsigned zerofill not null DEFAULT 9,
+f182 numeric (0,0) not null DEFAULT 9,
+f183 numeric (63,30) not null DEFAULT 9,
+f184 numeric (0,0) unsigned not null DEFAULT 9,
+f185 numeric (63,30) unsigned not null DEFAULT 9,
+f186 numeric (0,0) zerofill not null DEFAULT 9,
+f187 numeric (63,30) zerofill not null DEFAULT 9,
+f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
+f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
+f190 real not null DEFAULT 88.8,
+f191 real unsigned not null DEFAULT 88.8,
+f192 real zerofill not null DEFAULT 88.8,
+f193 real unsigned zerofill not null DEFAULT 88.8,
+f194 double not null DEFAULT 55.5,
+f195 double unsigned not null DEFAULT 55.5,
+f196 double zerofill not null DEFAULT 55.5,
+f197 double unsigned zerofill not null DEFAULT 55.5,
+f198 float,
+f199 float unsigned,
+f200 float zerofill,
+f201 float unsigned zerofill,
+f202 float(0),
+f203 float(23),
+f204 float(0) unsigned,
+f205 float(23) unsigned,
+f206 float(0) zerofill,
+f207 float(23) zerofill,
+f208 float(0) unsigned zerofill,
+f209 float(23) unsigned zerofill,
+f210 float(24),
+f211 float(53),
+f212 float(24) unsigned,
+f213 float(53) unsigned,
+f214 float(24) zerofill,
+f215 float(53) zerofill,
+f216 float(24) unsigned zerofill,
+f217 float(53) unsigned zerofill,
+f218 date,
+f219 time,
+f220 datetime,
+f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+f222 year,
+f223 year(3),
+f224 year(4),
+f225 enum("1enum","2enum"),
+f226 set("1set","2set"),
+f236 char(95),
+f241 char(255),
+f237 char(130) binary,
+f238 varchar(25000) binary,
+f239 varbinary(0),
+f240 varchar(1200)
+) engine = memory;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb4.txt'
+into table tb4;
+--disable_prepare_warnings
diff --git a/mysql-test/suite/funcs_1/include/myisam_tb1.inc b/mysql-test/suite/funcs_1/include/myisam_tb1.inc
new file mode 100644
index 00000000..261e6e92
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/myisam_tb1.inc
@@ -0,0 +1,70 @@
+##### suite/funcs_1/include/myisam_tb1.inc
+
+--disable_warnings
+drop table if exists tb1 ;
+--enable_warnings
+create table tb1 (
+f1 char,
+f2 char binary,
+f3 char ascii,
+f4 tinytext,
+f5 text,
+f6 mediumtext,
+f7 longtext,
+f8 tinyblob,
+f9 blob,
+f10 mediumblob,
+f11 longblob,
+f12 binary,
+f13 tinyint,
+f14 tinyint unsigned,
+f15 tinyint zerofill,
+f16 tinyint unsigned zerofill,
+f17 smallint,
+f18 smallint unsigned,
+f19 smallint zerofill,
+f20 smallint unsigned zerofill,
+f21 mediumint,
+f22 mediumint unsigned,
+f23 mediumint zerofill,
+f24 mediumint unsigned zerofill,
+f25 int,
+f26 int unsigned,
+f27 int zerofill,
+f28 int unsigned zerofill,
+f29 bigint,
+f30 bigint unsigned,
+f31 bigint zerofill,
+f32 bigint unsigned zerofill,
+f33 decimal not null DEFAULT 9.9,
+f34 decimal unsigned not null DEFAULT 9.9,
+f35 decimal zerofill not null DEFAULT 9.9,
+f36 decimal unsigned zerofill not null DEFAULT 9.9,
+f37 decimal (0) not null DEFAULT 9.9,
+f38 decimal (64) not null DEFAULT 9.9,
+f39 decimal (0) unsigned not null DEFAULT 9.9,
+f40 decimal (64) unsigned not null DEFAULT 9.9,
+f41 decimal (0) zerofill not null DEFAULT 9.9,
+f42 decimal (64) zerofill not null DEFAULT 9.9,
+f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
+f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
+f45 decimal (0,0) not null DEFAULT 9.9,
+f46 decimal (63,30) not null DEFAULT 9.9,
+f47 decimal (0,0) unsigned not null DEFAULT 9.9,
+f48 decimal (63,30) unsigned not null DEFAULT 9.9,
+f49 decimal (0,0) zerofill not null DEFAULT 9.9,
+f50 decimal (63,30) zerofill not null DEFAULT 9.9,
+f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
+f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
+f53 numeric not null DEFAULT 99,
+f54 numeric unsigned not null DEFAULT 99,
+f55 numeric zerofill not null DEFAULT 99,
+f56 numeric unsigned zerofill not null DEFAULT 99,
+f57 numeric (0) not null DEFAULT 99,
+f58 numeric (64) not null DEFAULT 99
+) engine = myisam;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/myisam_tb1.txt'
+into table tb1;
diff --git a/mysql-test/suite/funcs_1/include/myisam_tb2.inc b/mysql-test/suite/funcs_1/include/myisam_tb2.inc
new file mode 100644
index 00000000..2a558408
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/myisam_tb2.inc
@@ -0,0 +1,82 @@
+###### suite/funcs_1/include/myisam_tb2.inc
+
+--disable_warnings
+drop table if exists tb2 ;
+--enable_warnings
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set",
+f110 VARBINARY(64) null,
+f111 VARBINARY(27) null ,
+f112 VARBINARY(64) null ,
+f113 VARBINARY(192) null ,
+f114 VARBINARY(192) ,
+f115 VARBINARY(27) null ,
+f116 VARBINARY(64) null,
+f117 VARBINARY(192) null
+) engine = myisam;
+
+# The original columns. They are replaced by varbinary, because the funcs_1 tests should
+# not depend on the optional availability of the geometry feature.
+# f110 geometry null,
+# f111 point null ,
+# f112 linestring null ,
+# f113 polygon null ,
+# f114 geometrycollection ,
+# f115 multipoint null ,
+# f116 multilinestring null,
+# f117 multipolygon null
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/myisam_tb2.txt'
+into table tb2;
diff --git a/mysql-test/suite/funcs_1/include/myisam_tb3.inc b/mysql-test/suite/funcs_1/include/myisam_tb3.inc
new file mode 100644
index 00000000..aa0bb5bb
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/myisam_tb3.inc
@@ -0,0 +1,70 @@
+##### suite/funcs_1/include/myisam_tb3.inc
+
+--disable_warnings
+drop table if exists tb3 ;
+--enable_warnings
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 tinytext,
+f122 text,
+f123 mediumtext,
+f124 longtext,
+f125 tinyblob,
+f126 blob,
+f127 mediumblob,
+f128 longblob,
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) Engine = myisam;
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/myisam_tb3.txt'
+into table tb3;
diff --git a/mysql-test/suite/funcs_1/include/myisam_tb4.inc b/mysql-test/suite/funcs_1/include/myisam_tb4.inc
new file mode 100644
index 00000000..da934e6d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/myisam_tb4.inc
@@ -0,0 +1,90 @@
+##### suite/funcs_1/include/myisam_tb4.inc
+
+--disable_warnings
+drop table if exists tb4 ;
+--enable_warnings
+create table tb4 (
+f176 numeric (0) unsigned not null DEFAULT 9,
+f177 numeric (64) unsigned not null DEFAULT 9,
+f178 numeric (0) zerofill not null DEFAULT 9,
+f179 numeric (64) zerofill not null DEFAULT 9,
+f180 numeric (0) unsigned zerofill not null DEFAULT 9,
+f181 numeric (64) unsigned zerofill not null DEFAULT 9,
+f182 numeric (0,0) not null DEFAULT 9,
+f183 numeric (63,30) not null DEFAULT 9,
+f184 numeric (0,0) unsigned not null DEFAULT 9,
+f185 numeric (63,30) unsigned not null DEFAULT 9,
+f186 numeric (0,0) zerofill not null DEFAULT 9,
+f187 numeric (63,30) zerofill not null DEFAULT 9,
+f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
+f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
+f190 real not null DEFAULT 88.8,
+f191 real unsigned not null DEFAULT 88.8,
+f192 real zerofill not null DEFAULT 88.8,
+f193 real unsigned zerofill not null DEFAULT 88.8,
+f194 double not null DEFAULT 55.5,
+f195 double unsigned not null DEFAULT 55.5,
+f196 double zerofill not null DEFAULT 55.5,
+f197 double unsigned zerofill not null DEFAULT 55.5,
+f198 float,
+f199 float unsigned,
+f200 float zerofill,
+f201 float unsigned zerofill,
+f202 float(0),
+f203 float(23),
+f204 float(0) unsigned,
+f205 float(23) unsigned,
+f206 float(0) zerofill,
+f207 float(23) zerofill,
+f208 float(0) unsigned zerofill,
+f209 float(23) unsigned zerofill,
+f210 float(24),
+f211 float(53),
+f212 float(24) unsigned,
+f213 float(53) unsigned,
+f214 float(24) zerofill,
+f215 float(53) zerofill,
+f216 float(24) unsigned zerofill,
+f217 float(53) unsigned zerofill,
+f218 date,
+f219 time,
+f220 datetime,
+f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+f222 year,
+f223 year(3),
+f224 year(4),
+f225 enum("1enum","2enum"),
+f226 set("1set","2set"),
+f227 VARBINARY(64),
+f228 VARBINARY(27),
+f229 VARBINARY(64),
+f230 VARBINARY(192),
+f231 VARBINARY(192),
+f232 VARBINARY(27),
+f233 VARBINARY(64),
+f234 VARBINARY(192),
+f235 char(255),
+f236 char(60) ascii,
+f237 char(255) binary,
+f238 varchar(0) binary,
+f239 varbinary(1000),
+f240 varchar(120),
+f241 char(100),
+f242 bit(30)
+) engine = myisam;
+
+# The original columns. They are replaced by varbinary, because the funcs_1 tests should
+# not depend on the optional availability of the geometry feature.
+# f227 geometry,
+# f228 point,
+# f229 linestring,
+# f230 polygon,
+# f231 geometrycollection,
+# f232 multipoint,
+# f233 multilinestring,
+# f234 multipolygon,
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/myisam_tb4.txt'
+into table tb4;
diff --git a/mysql-test/suite/funcs_1/include/show_connection.inc b/mysql-test/suite/funcs_1/include/show_connection.inc
new file mode 100644
index 00000000..1cc2dd19
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/show_connection.inc
@@ -0,0 +1,14 @@
+#### suite/funcs_1/include/show_connection.inc
+#
+# This file shows the current connection information into the result file
+# By using the '... AS "" ' an empty line will separate this in the result.
+#
+# Usage:
+# Add the following to any *.test file:
+# :
+# --source suite/funcs_1/include/show_connection.inc
+# :
+
+--disable_query_log
+SELECT USER() AS "", DATABASE() AS "";
+--enable_query_log
diff --git a/mysql-test/suite/funcs_1/include/sp_tb.inc b/mysql-test/suite/funcs_1/include/sp_tb.inc
new file mode 100644
index 00000000..53ee9ded
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/sp_tb.inc
@@ -0,0 +1,89 @@
+--disable_abort_on_error
+
+USE test;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
+--enable_warnings
+eval
+CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = $engine_type;
+eval
+CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = $engine_type;
+eval
+CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = $engine_type;
+eval
+CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = $engine_type;
+eval
+CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t1;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t2;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t4;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t10;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t11;
+
+
+--disable_warnings
+drop TABLE if exists t3;
+--enable_warnings
+eval
+CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t3.txt' INTO TABLE t3;
+
+#---------------------------
+
+--disable_warnings
+drop database if exists test4;
+--enable_warnings
+CREATE database test4;
+use test4;
+
+eval
+CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
+ENGINE = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t6;
+#---------------------------
+
+use test;
+
+--disable_warnings
+drop TABLE if exists t7, t8;
+--enable_warnings
+eval
+CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = $engine_type;
+eval
+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 t7;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' INTO TABLE t8;
+
+
+--disable_warnings
+drop TABLE if exists t9;
+--enable_warnings
+eval CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t9.txt' INTO TABLE t9;
+
diff --git a/mysql-test/suite/funcs_1/include/tb3.inc b/mysql-test/suite/funcs_1/include/tb3.inc
new file mode 100644
index 00000000..0f73c39c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/include/tb3.inc
@@ -0,0 +1,66 @@
+##### suite/funcs_1/include/tb3.inc
+#
+# This auxiliary script is used in several Trigger tests.
+#
+# If the table need data than the file std_data/funcs_1/memory_tb3.txt
+# could be used.
+#
+
+--disable_warnings
+drop table if exists tb3;
+--enable_warnings
+--replace_result $engine_type <engine_to_be_used>
+eval create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = $engine_type;
diff --git a/mysql-test/suite/funcs_1/lib/DataGen_local.pl b/mysql-test/suite/funcs_1/lib/DataGen_local.pl
new file mode 100755
index 00000000..8ca74407
--- /dev/null
+++ b/mysql-test/suite/funcs_1/lib/DataGen_local.pl
@@ -0,0 +1,1247 @@
+#!/usr/bin/env perl
+
+
+if ( (scalar(@ARGV) != 1 ) || ($ARGV[0] =~ /[^0-9]/i ) )
+
+{
+ if( $ARGV[0] =~ /[^0-9]/i )
+
+ {
+
+ print "\n\t First parameter <Number of Rows> should be an integer value. \n"
+
+ }
+
+ &printusage;
+
+}
+
+
+else
+
+{
+
+
+# Third Table "t3.txt"
+
+
+ $file = 't3.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+ $s_int = 0;
+
+
+ #Write data to file
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $char20 = &get_next_char20($count);
+
+
+ print ($char20); #char (20)
+
+ print ("\t",$char20); #char (20)
+
+ print ("\t",$s_int); #int
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+# Fourth Table "t4.txt"
+
+
+ $file = 't4.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+ $s_int = 0;
+
+ $current_date = "1000-01-00";
+
+
+ #Write data to file
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $char20 = &get_next_char20($count);
+
+ $char25 = &get_next_char25($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $current_date = &get_next_date($current_date);
+
+
+ print ($char20); #char (20)
+
+ print ("\t",$char25); #char (25)
+
+ print ("\t",$current_date); #date
+
+ print ("\t",$s_int); #int
+
+ print ("\t",$char25); #char (25)
+
+ print ("\t",$s_int); #int
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+
+
+
+
+# Seventh Table "t7.txt"
+
+
+ $file = 't7.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+ $current_date = "1000-01-00";
+
+
+ #Write data to file
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+
+ $char20 = &get_next_char20($count);
+
+ $char25 = &get_next_char25($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $current_date = &get_next_date($current_date);
+
+
+ print ($char20); #Text
+
+ print ("\t",$char25); #Text
+
+ print ("\t",$date); #Date
+
+ print ("\t",$s_int); #int
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+# Ninth Table "t9.txt"
+
+
+ $file = 't9.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+ #Data type declarations
+
+
+ $s_int = 0;
+
+
+ #Write data to file
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $char25 = &get_next_char25($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+
+ print ($s_int); #int
+
+ print ("\t",$char25); #char (25)
+
+ print ("\t",$s_int); #int
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+
+
+
+# Thirteenth Table "t13.txt"
+
+
+ $file = 't13.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+
+ #Write data to file
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $geometry = &get_next_geometry($count);
+
+ $point = &get_next_point($count);
+
+ $linestring = &get_next_linestring($count);
+
+ $polygon = &get_next_polygon($count);
+
+ $geometry_collection = &get_next_geometry_collection($count);
+
+ $multipoint = &get_next_multipoint($count);
+
+ $multilinestring = &get_next_multilinestring($count);
+
+ $multipolygon = &get_next_multipolygon($count);
+
+
+ print ($geometry); #geometry
+
+ print ("\t",$point); #point
+
+ print ("\t",$linestring); #linestring
+
+ print ("\t",$polygon); #polygon
+
+ print ("\t",$geometry_collection); #geometrycollection
+
+ print ("\t",$multipoint); #multipoint
+
+ print ("\t",$multilinestring); #multilinestring
+
+ print ("\t",$multipolygon); #multipolygon
+
+ print ("\n");
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+}
+
+
+
+#Subroutines START HERE
+
+
+
+sub get_next_tinytext
+
+{
+
+ my($count) = @_;
+
+ my($default_char) = "a";
+
+ $index = $count % 20 ;
+
+
+ @ascii = ("\140","\141","\142","\143","\144","\145","\146","\147","\136","\137",
+
+ "\150","\151","\152","\153","\154","\155","\156","\157","\134","\135");
+
+
+
+ my($quotient) = $count / 100;
+
+ $quotient =~ s/\.[0-9]*// ;
+
+ $tinytext = $default_char.$ascii[$index].$quotient;
+
+
+ return($tinytext);
+
+}
+
+
+
+sub get_next_char20
+
+{
+
+ my($count) = @_;
+
+ my($default_char) = "a";
+
+ $index = $count % 20 ;
+
+
+ @ascii = ("\140","\141","\142","\143","\144","\145","\146","\147","\136","\137",
+
+ "\150","\151","\152","\153","\154","\155","\156","\157","\134","\135");
+
+
+ $longtext = $default_char.$ascii[$index].$default_char x $index;
+
+ return($longtext);
+
+}
+
+
+
+
+sub get_next_char25
+
+{
+
+ my($count) = @_;
+
+ my($default_char) = "a";
+
+ $index = $count % 20;
+
+
+ @ascii = ("\140","\141","\142","\143","\144","\145","\146","\147","\136","\137",
+
+ "\150","\151","\152","\153","\154","\155","\156","\157","\134","\135");
+
+
+ $longtext = $default_char.$ascii[$index].$default_char x $index;
+
+ return($longtext);
+
+}
+
+
+
+
+sub get_next_year
+
+{
+
+ my($next_year) = @_;
+
+ if (($next_year >= 1901) && ($next_year < 2155))
+
+ {
+
+ $next_year++;
+
+ }
+
+
+ else
+
+ {
+
+ $next_year = 1901;
+
+ }
+
+ return($next_year);
+
+}
+
+
+
+sub get_next_s_int
+
+{
+
+ my($count,$maxsize) = @_;
+
+ $s_int = int($count - ($maxsize/2));
+
+ return($s_int);
+
+}
+
+
+sub get_next_date
+{
+
+ my($date) = @_ ;
+
+ $pattern = '-';
+
+ @words = split(/$pattern/, $date);
+
+ $year = $words[0];
+
+ $month = $words[1];
+
+ $day = $words[2];
+
+
+ if (($month == 2) )
+
+ {
+
+ if($day == 28)
+
+ {
+
+ if($year % 4 == 0)
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+
+ elsif($day == 29)
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+
+
+ else
+
+ {
+
+ $day++;
+
+ }
+
+ }
+
+
+ elsif($day == 30)
+
+ {
+
+ if (($month == 1) || ($month == 3) || ($month == 5) || ($month == 7) || ($month == 8) || ($month == 10) || ($month == 12))
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+
+ elsif($day == 31)
+
+ {
+
+ if ($month == 12)
+
+ {
+
+ $day = 01;
+
+ $month = 01;
+
+
+
+ if($year < 9999)
+
+ {
+
+ $year++;
+
+ }
+
+ else
+
+ {
+
+ $year = 1000;
+
+ }
+
+ }
+
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+
+
+ else
+
+ {
+
+ $day++;
+
+ }
+
+
+
+ $date = $year."-".$month."-".$day;
+
+ return($date);
+
+}
+
+
+
+
+sub get_next_s_date
+
+{
+
+ my($date) = @_ ;
+
+ $pattern = '-';
+
+ @words = split(/$pattern/, $date);
+
+
+ $year = "$words[0]";
+
+ $month = "$words[1]";
+
+ $day = "$words[2]";
+
+
+ if (($month == "02") )
+
+ {
+
+ if($day == "28")
+
+ {
+
+ if($year =~ /[0-9][0-9]00/)
+
+ {
+
+ if($year % 400 == 0)
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+
+
+ else
+
+ {
+
+ if($year % 4 == 0)
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+ }
+
+
+
+ elsif($day == "29")
+
+ {
+
+ $day = "01";
+
+ $month++;
+
+ }
+
+
+
+ else
+
+ {
+
+ $day++;
+
+ }
+
+ }
+
+
+ elsif($day == "30")
+
+ {
+
+ if (($month == "01") || ($month == "03") || ($month == "05") || ($month == "07") || ($month == "08") || ($month == "10") || ($month == "12"))
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = "01";
+
+ $month++;
+
+ }
+
+ }
+
+
+ elsif($day == "31")
+
+ {
+
+ if ($month == "12")
+
+ {
+
+ $day = "01";
+
+ $month = "01";
+
+
+
+ if($year < "2036")
+
+ {
+
+ $year = $year + "0001";
+
+ }
+
+ else
+
+ {
+
+ $year = "1970";
+
+ }
+
+ }
+
+
+ else
+
+ {
+
+ $day = "01";
+
+ $month++;
+
+ }
+
+ }
+
+
+
+ else
+
+ {
+
+ $day++;
+
+ }
+
+
+ if($month !~ /[0-9][0-9]/)
+
+ {
+
+ $month = "0".$month;
+
+ }
+
+
+
+ if($day !~ /[0-9][0-9]/)
+
+ {
+
+ $day = "0".$day;
+
+ }
+
+
+
+ $date = "$year"."-"."$month"."-"."$day";
+
+
+
+ return($date);
+
+}
+
+
+
+sub printusage
+
+{
+
+ print "\n\nUsage: DataGen <Number of Rows>";
+
+ print "\n\n<Number of Rows>: The number of rows in the table ".
+
+ "\n\nE.g. DataGen 5000".
+
+ "\n\nThis will generate 11 text files containing 5000" .
+
+ " records each for the 11 types of tables.";
+
+}
+
+
+
+sub get_next_geometry
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 20 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@\0\0\0\0\0\0^@\0\0\0\0\0\0^@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0r@\0\0\0\0\0r@\0\0\0\0\0\0y@\0\0\0\0\0\0y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0r@\0\0\0\0\0\0Y@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0@@\0\0\0\0\0@@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+
+sub get_next_point
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 20 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\09@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0A@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0\09@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0A@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0F@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0K@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0@P@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0R@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\09@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0@U@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0W@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0@P@\0\0\0\0\0W@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0R@\0\0\0\0\0W@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0@U@\0\0\0\0\0W@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0W@\0\0\0\0\0W@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_linestring
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 20 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@\0\0\0\0\0\0^@\0\0\0\0\0\0^@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0r@\0\0\0\0\0r@\0\0\0\0\0\0y@\0\0\0\0\0\0y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0r@\0\0\0\0\0\0Y@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0@@\0\0\0\0\0@@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+
+sub get_next_polygon
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 20 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0+@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0(@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0*@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0r@\0\0\0\0\0\0&@\0\0\0\0\0r@\0\0\0\0\0r@\0\0\0\0\0\0&@\0\0\0\0\0r@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\00@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\01@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\02@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\03@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0@\0\0\0\0\0\0.@\0\0\0\0\0@\0\0\0\0\0@\0\0\0\0\0\0.@\0\0\0\0\0@\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\05@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\06@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0?\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\07@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\0?\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\08@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_geometry_collection
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 20 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0(@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0*@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0r@\0\0\0\0\0\0&@\0\0\0\0\0r@\0\0\0\0\0r@\0\0\0\0\0\0&@\0\0\0\0\0r@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\00@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\01@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\02@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\03@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0@\0\0\0\0\0\0.@\0\0\0\0\0@\0\0\0\0\0@\0\0\0\0\0\0.@\0\0\0\0\0@\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\05@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\06@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0?\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\07@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\0?\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\08@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_multipoint
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 20 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0*@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0Q@\0\0\0\0\0Q@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0V@\0\0\0\0\0V@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0i@\0\0\0\0\0\0i@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0r@\0\0\0\0\0\0Y@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_multilinestring
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 20 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@\0\0\0\0\0\0^@\0\0\0\0\0\0^@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0r@\0\0\0\0\0r@\0\0\0\0\0\0y@\0\0\0\0\0\0y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0r@\0\0\0\0\0\0Y@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0@@\0\0\0\0\0@@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_multipolygon
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 20 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\N',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0(@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0*@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0r@\0\0\0\0\0\0&@\0\0\0\0\0r@\0\0\0\0\0r@\0\0\0\0\0\0&@\0\0\0\0\0r@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\00@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\01@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\02@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\03@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0@\0\0\0\0\0\0.@\0\0\0\0\0@\0\0\0\0\0@\0\0\0\0\0\0.@\0\0\0\0\0@\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\05@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\06@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0?\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\07@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\0?\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\08@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub random
+
+{
+
+ my($limit) = @_ ;
+
+ $random = int(rand($limit));
+
+ return($random);
+
+}
+
diff --git a/mysql-test/suite/funcs_1/lib/DataGen_modify.pl b/mysql-test/suite/funcs_1/lib/DataGen_modify.pl
new file mode 100755
index 00000000..8ad8e619
--- /dev/null
+++ b/mysql-test/suite/funcs_1/lib/DataGen_modify.pl
@@ -0,0 +1,3960 @@
+#!/usr/bin/env perl
+
+
+if ( (scalar(@ARGV) != 2 ) || ($ARGV[0] =~ /[^0-9]/i ) )
+
+{
+
+ if( $ARGV[0] =~ /[^0-9]/i )
+
+ {
+
+ print "\n\nFirst parameter <Rowcount> should be an integer value. \n"
+
+ }
+
+ &printusage;
+
+}
+
+
+else
+
+{
+
+
+# Case "InnoDB"
+
+
+ if ( $ARGV[1] =~ /innodb/i )
+
+ {
+
+
+
+# First Table "tb1.txt"
+
+
+ $file = 'innodb_tb1.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+#Data type declarations
+
+
+ $s_int = 0;
+
+ $u_int = 0;
+
+ srand();
+
+
+ #Write data to file
+
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $u_int++;
+
+ $char = &get_next_char($count);
+
+ $char_0 = &get_next_char_0($count);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $decimal = $count. "\." .$count;
+
+
+ print ($char_0); #char(0)##
+
+ print ("\t",$char_0); #char binary(0)##
+
+ print ("\t",$char_0); #char ascii(0)##
+
+ print ("\t",$tinytext); #tiny text unicode##
+
+ print ("\t",$tinytext); #text
+
+ print ("\t",$longtext); #medium text
+
+ print ("\t",$longtext); #long text
+
+ print ("\t",$tinytext); #tiny blob
+
+ print ("\t",$tinytext); #blob
+
+ print ("\t",$longtext); #medium blob
+
+ print ("\t",$longtext); #long blob
+
+ print ("\t",$char); #binary
+
+ print ("\t",&random(127)); #tiny int
+
+ print ("\t",&random(255)); #tiny int unsigned
+
+ print ("\t",&random(127)); #tiny int zerofill
+
+ print ("\t",&random(255)); #tiny int unsigned zerofill
+
+ print ("\t",&random(32767)); #smallint
+
+ print ("\t",&random(65535)); #smallint unsigned
+
+ print ("\t",&random(32767)); #smallint zerofill
+
+ print ("\t",&random(65535)); #smallint unsigned zerofill
+
+ print ("\t",$s_int); #mediumint
+
+ print ("\t",$u_int); #mediumint unsigned
+
+ print ("\t",$u_int); #mediumint zerofill
+
+ print ("\t",$u_int); #mediumint unsigned zerofill
+
+ print ("\t",$s_int); #int
+
+ print ("\t",$u_int); #int unsigned
+
+ print ("\t",$u_int); #int zerofill
+
+ print ("\t",$u_int); #int unsigned zerofill
+
+ print ("\t",$s_int); #bigint
+
+ print ("\t",$u_int); #bigint unsigned
+
+ print ("\t",$u_int); #bigint zerofill
+
+ print ("\t",$u_int); #bigint unsigned zerofill
+
+ print ("\t",$s_int); #decimal
+
+ print ("\t",$u_int); #decimal unsigned
+
+ print ("\t",$u_int); #decimal zerofill
+
+ print ("\t",$u_int); #decimal unsigned zerofill not null
+
+ print ("\t",$s_int); #decimal(0) not null
+
+ print ("\t",$s_int); #decimal(254) not null
+
+ print ("\t",$u_int); #decimal (0) unsigned not null
+
+ print ("\t",$u_int); #decimal (254) unsigned not null
+
+ print ("\t",$u_int); #decimal(0) zerofill not null
+
+ print ("\t",$u_int); #decimal(254) zerofill not null
+
+ print ("\t",$u_int); #decimal (0) unsigned zerofill not null
+
+ print ("\t",$u_int); #decimal (254) unsigned zerofill not null
+
+ print ("\t",$s_int); #decimal (0,0) not null
+
+ print ("\t",$decimal); #decimal(253,253) not null
+
+ print ("\t",$u_int); #decimal (0,0) unsigned not null
+
+ print ("\t",$decimal); #decimal (253,253) unsigned not null
+
+ print ("\t",$u_int); #decimal(0,0) zerofill not null
+
+ print ("\t",$decimal); #decimal(253,253) zerofill not null
+
+ print ("\t",$u_int); #decimal (0,0) unsigned zerofill not null
+
+ print ("\t",$decimal); #decimal (253,253) unsigned zerofill not null
+
+ print ("\t",$s_int); #numeric not null
+
+ print ("\t",$u_int); #numeric unsigned not null
+
+ print ("\t",$u_int); #numeric zerofill not null
+
+ print ("\t",$u_int); #numeric unsigned zerofill not null
+
+ print ("\t",$s_int); #numeric(0) not null
+
+ print ("\t",$s_int); #numeric(254) not null
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+# Second Table "tb2.txt"
+
+
+ $file = 'innodb_tb2.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+ $s_int = 0;
+
+ $u_int = 0;
+
+ $enum = 1;
+
+ $set = 1;
+
+ $int=0;
+
+ $current_time = "838:59:59";
+
+ $s_time = "00:00:00";
+
+ $s_date = "1970-01-01";
+
+ $current_date = "1000-01-00";
+
+ $current_year = 1901;
+
+ $u_current_float = 1.175494351e-38;
+
+ $s_current_float = -1.175494351e-38;
+
+ srand();
+
+
+ #Write data to file
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $u_int++;
+
+ $char = &get_next_char($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $decimal = $count. "\." .$count;
+
+ $int = &get_next_int($int);
+
+ $enum = &get_next_enum($enum);
+
+ $set = &get_next_set($set);
+
+ $current_date = &get_next_date($current_date);
+
+ $current_time = &get_next_time($current_time);
+
+ $current_year = &get_next_year($current_year);
+
+ $u_current_float = &get_next_float($u_current_float);
+
+ $s_current_float = &get_next_float($s_current_float);
+
+ $s_time = &get_next_s_time($s_time);
+
+ $s_date = &get_next_s_date($s_date);
+
+ $datetime = &get_next_datetime($s_date,$s_time);
+
+ $timestamp = &get_next_timestamp($s_date,$s_time);
+
+
+ print ($u_int); #numeric (0) unsigned
+
+ print ("\t",$u_int); #numeric (254) unsigned
+
+ print ("\t",$u_int); #numeric (0) zerofill
+
+ print ("\t",$u_int); #numeric (254) zerofill
+
+ print ("\t",$u_int); #numeric (0) unsigned zerofill
+
+ print ("\t",$u_int); #numeric (254) unsigned zerofill
+
+ print ("\t",$s_int); #numeric (0,0)
+
+ print ("\t",$decimal); #numeric (253,253)
+
+ print ("\t",$u_int); #numeric (0,0) unsigned
+
+ print ("\t",$decimal); #numeric (253,253) unsigned
+
+ print ("\t",$u_int); #numeric (0,0) zerofill
+
+ print ("\t",$decimal); #numeric (253,253) zerofill
+
+ print ("\t",$u_int); #numeric (0,0) unsigned zerofill
+
+ print ("\t",$decimal); #numeric (253,253) unsigned zerofill
+
+ print ("\t",$s_current_float); #real
+
+ print ("\t",$u_current_float); #real unsigned
+
+ print ("\t",$u_current_float); #real zerofill
+
+ print ("\t",$u_current_float); #real unsigned zerofill
+
+ print ("\t",$s_current_float); #double
+
+ print ("\t",$u_current_float); #double unsigned
+
+ print ("\t",$u_current_float); #double zerofill
+
+ print ("\t",$u_current_float); #double unsigned zerofill
+
+ print ("\t",$s_current_float); #float not null
+
+ print ("\t",$u_current_float); #float unsigned not null
+
+ print ("\t",$u_current_float); #float zerofill not null
+
+ print ("\t",$u_current_float); #float unsigned zerofill not null
+
+ print ("\t",$s_current_float); #float(0) not null
+
+ print ("\t",$s_current_float); #float(23) not null
+
+ print ("\t",$u_current_float); #float(0) unsigned not null
+
+ print ("\t",$u_current_float); #float(23) unsigned not null
+
+ print ("\t",$u_current_float); #float(0) zerofill not null
+
+ print ("\t",$u_current_float); #float(23) zerofill not null
+
+ print ("\t",$u_current_float); #float(0) unsigned zerofill not null
+
+ print ("\t",$u_current_float); #float(23) unsigned zerofill not null
+
+ print ("\t",$s_current_float); #float(24) not null
+
+ print ("\t",$s_current_float); #float(53) not null
+
+ print ("\t",$u_current_float); #float(24) unsigned not null
+
+ print ("\t",$u_current_float); #float(53) unsigned not null
+
+ print ("\t",$u_current_float); #float(24) zerofill not null
+
+ print ("\t",$u_current_float); #float(53) zerofill not null
+
+ print ("\t",$u_current_float); #float(24) unsigned zerofill not null
+
+ print ("\t",$u_current_float); #float(53) unsigned zerofill not null
+
+ print ("\t",$current_date); #date not null
+
+ print ("\t",$current_time); #time not null
+
+ print ("\t",$datetime); #datetime not null
+
+ print ("\t",$timestamp); #timestamp not null
+
+ print ("\t",$current_year); #year not null
+
+ print ("\t",$current_year); #year(3) not null
+
+ print ("\t",$current_year); #year(4) not null
+
+ print ("\t",$enum); #enum("1enum","2enum") not null
+
+ print ("\t",$set); #set("1set","2set") not null
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+# Third Table "tb3.txt"
+
+
+ $file = 'innodb_tb3.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+ $u_int = 0;
+
+ srand();
+
+
+ #Write data to file
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+
+ $u_int++;
+
+ $char = &get_next_char($count);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $decimal = $count. "\." .$count;
+
+
+ print ($char); #char not null
+
+ print ("\t",$char); #char binary not null
+
+ print ("\t",$char); #char ascii not null
+
+ print ("\t",$tinytext); #tinytext not null
+
+ print ("\t",$tinytext); #text not null
+
+ print ("\t",$longtext); #mediumtext not null
+
+ print ("\t",$longtext); #longtext not null unicode##
+
+ print ("\t",$tinytext); #tinyblob not null
+
+ print ("\t",$tinytext); #blob not null
+
+ print ("\t",$longtext); #mediumblob not null
+
+ print ("\t",$longtext); #longblob not null
+
+ print ("\t",$char); #binary not null
+
+ print ("\t",&random(127)); #tinyint not null
+
+ print ("\t",&random(255)); #tinyint unsigned not null
+
+ print ("\t",&random(127)); #tinyint zerofill not null
+
+ print ("\t",&random(255)); #tinyint unsigned zerofill not null
+
+ print ("\t",&random(32767)); #smallint not null
+
+ print ("\t",&random(65535)); #smallint unsigned not null
+
+ print ("\t",&random(32767)); #smallint zerofill not null
+
+ print ("\t",&random(65535)); #smallint unsigned zerofill not null
+
+ print ("\t",$s_int); #mediumint not null
+
+ print ("\t",$u_int); #mediumint unsigned not null
+
+ print ("\t",$u_int); #mediumint zerofill not null
+
+ print ("\t",$u_int); #mediumint unsigned zerofill not null
+
+ print ("\t",$s_int); #int not null
+
+ print ("\t",$u_int); #int unsigned not null
+
+ print ("\t",$u_int); #int zerofill not null
+
+ print ("\t",$u_int); #int unsigned zerofill not null
+
+ print ("\t",$s_int); #bigint not null
+
+ print ("\t",$u_int); #bigint unsigned not null
+
+ print ("\t",$u_int); #bigint zerofill not null
+
+ print ("\t",$u_int); #bigint unsigned zerofill not null
+
+ print ("\t",$s_int); #decimal not null
+
+ print ("\t",$u_int); #decimal unsigned not null
+
+ print ("\t",$u_int); #decimal zerofill not null
+
+ print ("\t",$u_int); #decimal unsigned zerofill
+
+ print ("\t",$s_int); #decimal(0)
+
+ print ("\t",$s_int); #decimal(254)
+
+ print ("\t",$u_int); #decimal (0) unsigned
+
+ print ("\t",$u_int); #decimal (254) unsigned
+
+ print ("\t",$u_int); #decimal(0) zerofill
+
+ print ("\t",$u_int); #decimal(254) zerofill
+
+ print ("\t",$u_int); #decimal (0) unsigned zerofill
+
+ print ("\t",$u_int); #decimal (254) unsigned zerofill
+
+ print ("\t",$s_int); #decimal (0,0)
+
+ print ("\t",$decimal); #decimal(253,253)
+
+ print ("\t",$u_int); #decimal (0,0) unsigned
+
+ print ("\t",$decimal); #decimal (253,253) unsigned
+
+ print ("\t",$u_int); #decimal(0,0) zerofill
+
+ print ("\t",$decimal); #decimal(253,253) zerofill
+
+ print ("\t",$u_int); #decimal (0,0) unsigned zerofill
+
+ print ("\t",$decimal); #decimal (253,253) unsigned zerofill
+
+ print ("\t",$s_int); #numeric
+
+ print ("\t",$u_int); #numeric unsigned
+
+ print ("\t",$u_int); #numeric zerofill
+
+ print ("\t",$u_int); #numeric unsigned zerofill
+
+ print ("\t",$s_int); #numeric(0)
+
+ print ("\t",$s_int); #numeric(254)
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+# Fourth Table "tb4.txt"
+
+
+ $file = 'innodb_tb4.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+ $enum = 1;
+
+ $ret_bit = 1;
+
+ $set = 1;
+
+ $s_int = 0;
+
+ $u_int = 0;
+
+ $int=0;
+
+ $s_time = "00:00:00";
+
+ $s_date = "1970-01-01";
+
+ $current_time = "838:59:59";
+
+ $current_date = "1000-01-00";
+
+ $current_year = 1901;
+
+ $u_current_float = 1.175494351e-38;
+
+ $s_current_float = -1.175494351e-38;
+
+ srand();
+
+
+ #Write data to file
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $u_int++;
+
+# $bit = &get_next_bit(0);
+
+ $char = &get_next_char($count);
+
+ $char_0 = &get_next_char_0($count);
+
+ $char_55 = &get_next_char_55($count);
+
+ $char_90 = &get_next_char_90($count);
+
+ $char_100 = &get_next_char_100($count);
+
+ $char_255 = &get_next_char_255($count);
+
+ $varchar_500 = &get_next_varchar_500($count);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $decimal = $count. "\." .$count;
+
+ $int = &get_next_int($int);
+
+ $enum = &get_next_enum($enum);
+
+ $set = &get_next_set($set);
+
+ $current_date = &get_next_date($current_date);
+
+ $current_time = &get_next_time($current_time);
+
+ $current_year = &get_next_year($current_year);
+
+ $u_current_float = &get_next_float($u_current_float);
+
+ $s_current_float = &get_next_float($s_current_float);
+
+ $s_time = &get_next_s_time($s_time);
+
+ $s_date = &get_next_s_date($s_date);
+
+ $datetime = &get_next_datetime($s_date,$s_time);
+
+ $timestamp = &get_next_timestamp($s_date,$s_time);
+
+
+ print ($u_int); #numeric (0) unsigned not null
+
+ print ("\t",$u_int); #numeric (254) unsigned not null
+
+ print ("\t",$u_int); #numeric (0) zerofill not null
+
+ print ("\t",$u_int); #numeric (254) zerofill not null
+
+ print ("\t",$u_int); #numeric (0) unsigned zerofill not null
+
+ print ("\t",$u_int); #numeric (254) unsigned zerofill not null
+
+ print ("\t",$s_int); #numeric (0,0) not null
+
+ print ("\t",$decimal); #numeric (253,253) not null
+
+ print ("\t",$u_int); #numeric (0,0) unsigned not null
+
+ print ("\t",$decimal); #numeric (253,253) unsigned not null
+
+ print ("\t",$u_int); #numeric (0,0) zerofill not null
+
+ print ("\t",$decimal); #numeric (253,253) zerofill not null
+
+ print ("\t",$u_int); #numeric (0,0) unsigned zerofill not null
+
+ print ("\t",$decimal); #numeric (253,253) unsigned zerofill not null
+
+ print ("\t",$s_current_float); #real not null
+
+ print ("\t",$u_current_float); #real unsigned not null
+
+ print ("\t",$u_current_float); #real zerofill not null
+
+ print ("\t",$u_current_float); #real unsigned zerofill not null
+
+ print ("\t",$s_current_float); #double not null
+
+ print ("\t",$u_current_float); #double unsigned not null
+
+ print ("\t",$u_current_float); #double zerofill not null
+
+ print ("\t",$u_current_float); #double unsigned zerofill not null
+
+ print ("\t",$s_current_float); #float
+
+ print ("\t",$u_current_float); #float unsi gned
+
+ print ("\t",$u_current_float); #float zerofill
+
+ print ("\t",$u_current_float); #float unsigned zerofill
+
+ print ("\t",$s_current_float); #float(0)
+
+ print ("\t",$s_current_float); #float(23)
+
+ print ("\t",$u_current_float); #float(0) unsigned
+
+ print ("\t",$u_current_float); #float(23) unsigned
+
+ print ("\t",$u_current_float); #float(0) zerofill
+
+ print ("\t",$u_current_float); #float(23) zerofill
+
+ print ("\t",$u_current_float); #float(0) unsigned zerofill
+
+ print ("\t",$u_current_float); #float(23) unsigned zerofill
+
+ print ("\t",$s_current_float); #float(24)
+
+ print ("\t",$s_current_float); #float(53)
+
+ print ("\t",$u_current_float); #float(24) unsigned
+
+ print ("\t",$u_current_float); #float(53) unsigned
+
+ print ("\t",$u_current_float); #float(24) zerofill
+
+ print ("\t",$u_current_float); #float(53) zerofill
+
+ print ("\t",$u_current_float); #float(24) unsigned zerofill
+
+ print ("\t",$u_current_float); #float(53) unsigned zerofill
+
+ print ("\t",$current_date); #date
+
+ print ("\t",$current_time); #time
+
+ print ("\t",$datetime); #datetime
+
+ print ("\t",$timestamp); #timestamp
+
+ print ("\t",$current_year); #year
+
+ print ("\t",$current_year); #year(3)
+
+ print ("\t",$current_year); #year(4)
+
+ print ("\t",$enum); #enum("1enum","2enum")
+
+ print ("\t",$set); #set("1set","2set")
+
+ print ("\t",$char_0); #char(0) unicode##
+
+ print ("\t",$char_90); #char(90)##
+
+ print ("\t",$char_255); #char(255) ascii##
+
+ print ("\t",$char_0); #varchar(0)##
+
+ print ("\t",$varchar_500); #varchar(20000) binary##
+
+ print ("\t",$varchar_500); #varchar(2000) unicode##
+
+ print ("\t",$char_100); #char(100) unicode##
+
+# print ("\t",$bit); #Bit(0)##
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+ }
+
+
+
+#Next Database "MyIsam"
+
+
+ elsif ( $ARGV[1] =~ /myisam/i )
+
+ {
+
+
+# Fifth Table "tb5.txt"
+
+
+ $file = 'myisam_tb1.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+
+ #Data type declarations
+
+
+ $s_int = 0;
+
+ $u_int = 0;
+
+ srand();
+
+
+
+ #Write data to file
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $u_int++;
+
+ $char = &get_next_char($count);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $decimal = $count. "\." .$count;
+
+
+ print ($char); #char
+
+ print ("\t",$char); #char binary
+
+ print ("\t",$char); #char ascii
+
+ print ("\t",$tinytext); #tiny text unicode##
+
+ print ("\t",$tinytext); #text
+
+ print ("\t",$longtext); #medium text
+
+ print ("\t",$longtext); #long text
+
+ print ("\t",$tinytext); #tiny blob
+
+ print ("\t",$tinytext); #blob
+
+ print ("\t",$longtext); #medium blob
+
+ print ("\t",$longtext); #long blob
+
+ print ("\t",$char); #binary
+
+ print ("\t",&random(127)); #tiny int
+
+ print ("\t",&random(255)); #tiny int unsigned
+
+ print ("\t",&random(127)); #tiny int zerofill
+
+ print ("\t",&random(255)); #tiny int unsigned zerofill
+
+ print ("\t",&random(32767)); #smallint
+
+ print ("\t",&random(65535)); #smallint unsigned
+
+ print ("\t",&random(32767)); #smallint zerofill
+
+ print ("\t",&random(65535)); #smallint unsigned zerofill
+
+ print ("\t",$s_int); #mediumint
+
+ print ("\t",$u_int); #mediumint unsigned
+
+ print ("\t",$u_int); #mediumint zerofill
+
+ print ("\t",$u_int); #mediumint unsigned zerofill
+
+ print ("\t",$s_int); #int
+
+ print ("\t",$u_int); #int unsigned
+
+ print ("\t",$u_int); #int zerofill
+
+ print ("\t",$u_int); #int unsigned zerofill
+
+ print ("\t",$s_int); #bigint
+
+ print ("\t",$u_int); #bigint unsigned
+
+ print ("\t",$u_int); #bigint zerofill
+
+ print ("\t",$u_int); #bigint unsigned zerofill
+
+ print ("\t",$s_int); #decimal not null
+
+ print ("\t",$u_int); #decimal unsigned not null
+
+ print ("\t",$u_int); #decimal zerofill not null
+
+ print ("\t",$u_int); #decimal unsigned zerofill not null
+
+ print ("\t",$s_int); #decimal(0) not null
+
+ print ("\t",$s_int); #decimal(254) not null
+
+ print ("\t",$u_int); #decimal (0) unsigned not null
+
+ print ("\t",$u_int); #decimal (254) unsigned not null
+
+ print ("\t",$u_int); #decimal(0) zerofill not null
+
+ print ("\t",$u_int); #decimal(254) zerofill not null
+
+ print ("\t",$u_int); #decimal (0) unsigned zerofill not null
+
+ print ("\t",$u_int); #decimal (254) unsigned zerofill not null
+
+ print ("\t",$s_int); #decimal (0,0) not null
+
+ print ("\t",$decimal); #decimal(253,253) not null
+
+ print ("\t",$u_int); #decimal (0,0) unsigned not null
+
+ print ("\t",$decimal); #decimal (253,253) unsigned not null
+
+ print ("\t",$u_int); #decimal(0,0) zerofill not null
+
+ print ("\t",$decimal); #decimal(253,253) zerofill not null
+
+ print ("\t",$u_int); #decimal (0,0) unsigned zerofill not null
+
+ print ("\t",$decimal); #decimal (253,253) unsigned zerofill not null
+
+ print ("\t",$s_int); #numeric not null
+
+ print ("\t",$u_int); #numeric unsigned not null
+
+ print ("\t",$u_int); #numeric zerofill not null
+
+ print ("\t",$u_int); #numeric unsigned zerofill not null
+
+ print ("\t",$s_int); #numeric(0) not null
+
+ print ("\t",$s_int); #numeric(254) not null
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+# Sixth Table "tb6.txt"
+
+
+ $file = 'myisam_tb2.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+ $enum = 1;
+
+ $set = 1;
+
+ $s_int = 0;
+
+ $u_int = 0;
+
+ $int=0;
+
+ $s_time = "00:00:00";
+
+ $s_date = "1970-01-01";
+
+ $current_time = "838:59:59";
+
+ $current_date = "1000-01-00";
+
+ $current_year = 1901;
+
+ $u_current_float = 1.175494351e-38;
+
+ $s_current_float = -1.175494351e-38;
+
+ srand();
+
+
+ #Write data to file
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $u_int++;
+
+ $char = &get_next_char($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $decimal = $count. "\." .$count;
+
+ $int = &get_next_int($int);
+
+ $enum = &get_next_enum($enum);
+
+ $set = &get_next_set($set);
+
+ $current_date = &get_next_date($current_date);
+
+ $current_time = &get_next_time($current_time);
+
+ $current_year = &get_next_year($current_year);
+
+ $u_current_float = &get_next_float($u_current_float);
+
+ $s_current_float = &get_next_float($s_current_float);
+
+ $s_time = &get_next_s_time($s_time);
+
+ $s_date = &get_next_s_date($s_date);
+
+ $datetime = &get_next_datetime($s_date,$s_time);
+
+ $timestamp = &get_next_timestamp($s_date,$s_time);
+
+
+ $geometry = &get_next_geometry($count);
+
+ $point = &get_next_point($count);
+
+ $linestring = &get_next_linestring($count);
+
+ $polygon = &get_next_polygon($count);
+
+ $geometry_collection = &get_next_geometry_collection($count);
+
+ $multipoint = &get_next_multipoint($count);
+
+ $multilinestring = &get_next_multilinestring($count);
+
+ $multipolygon = &get_next_multipolygon($count);
+
+
+ print ($u_int); #numeric (0) unsigned
+
+ print ("\t",$u_int); #numeric (254) unsigned
+
+ print ("\t",$u_int); #numeric (0) zerofill
+
+ print ("\t",$u_int); #numeric (254) zerofill
+
+ print ("\t",$u_int); #numeric (0) unsigned zerofill
+
+ print ("\t",$u_int); #numeric (254) unsigned zerofill
+
+ print ("\t",$s_int); #numeric (0,0)
+
+ print ("\t",$decimal); #numeric (253,253)
+
+ print ("\t",$u_int); #numeric (0,0) unsigned
+
+ print ("\t",$decimal); #numeric (253,253) unsigned
+
+ print ("\t",$u_int); #numeric (0,0) zerofill
+
+ print ("\t",$decimal); #numeric (253,253) zerofill
+
+ print ("\t",$u_int); #numeric (0,0) unsigned zerofill
+
+ print ("\t",$decimal); #numeric (253,253) unsigned zerofill
+
+ print ("\t",$s_current_float); #real
+
+ print ("\t",$u_current_float); #real unsigned
+
+ print ("\t",$u_current_float); #real zerofill
+
+ print ("\t",$u_current_float); #real unsigned zerofill
+
+ print ("\t",$s_current_float); #double
+
+ print ("\t",$u_current_float); #double unsigned
+
+ print ("\t",$u_current_float); #double zerofill
+
+ print ("\t",$u_current_float); #double unsigned zerofill
+
+ print ("\t",$s_current_float); #float not null
+
+ print ("\t",$u_current_float); #float unsigned not null
+
+ print ("\t",$u_current_float); #float zerofill not null
+
+ print ("\t",$u_current_float); #float unsigned zerofill not null
+
+ print ("\t",$s_current_float); #float(0) not null
+
+ print ("\t",$s_current_float); #float(23) not null
+
+ print ("\t",$u_current_float); #float(0) unsigned not null
+
+ print ("\t",$u_current_float); #float(23) unsigned not null
+
+ print ("\t",$u_current_float); #float(0) zerofill not null
+
+ print ("\t",$u_current_float); #float(23) zerofill not null
+
+ print ("\t",$u_current_float); #float(0) unsigned zerofill not null
+
+ print ("\t",$u_current_float); #float(23) unsigned zerofill not null
+
+ print ("\t",$s_current_float); #float(24) not null
+
+ print ("\t",$s_current_float); #float(53) not null
+
+ print ("\t",$u_current_float); #float(24) unsigned not null
+
+ print ("\t",$u_current_float); #float(53) unsigned not null
+
+ print ("\t",$u_current_float); #float(24) zerofill not null
+
+ print ("\t",$u_current_float); #float(53) zerofill not null
+
+ print ("\t",$u_current_float); #float(24) unsigned zerofill not null
+
+ print ("\t",$u_current_float); #float(53) unsigned zerofill not null
+
+ print ("\t",$current_date); #date not null
+
+ print ("\t",$current_time); #time not null
+
+ print ("\t",$datetime); #datetime not null
+
+ print ("\t",$timestamp); #timestamp not null
+
+ print ("\t",$current_year); #year not null
+
+ print ("\t",$current_year); #year(3) not null
+
+ print ("\t",$current_year); #year(4) not null
+
+ print ("\t",$enum); #enum("1enum","2enum") not null
+
+ print ("\t",$set); #set("1set","2set") not null
+
+ print ("\t",$geometry); #geometry not null
+
+ print ("\t",$point); #point not null
+
+ print ("\t",$linestring); #linestring not null
+
+ print ("\t",$polygon); #polygon not null
+
+ print ("\t",$geometry_collection); #geometrycollection not null
+
+ print ("\t",$multipoint); #multipoint not null
+
+ print ("\t",$multilinestring); #multilinestring not null
+
+ print ("\t",$multipolygon); #multipolygon not null
+
+
+#geometry not null, point not null, linestring not null, polygon not null, geometrycollection not null, multipoint not null, multilinestring not null, multipolygon not null
+
+
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+# Seventh Table "tb7.txt"
+
+
+ $file = 'myisam_tb3.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+ $u_int = 0;
+
+ srand();
+
+
+ #Write data to file
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+
+ $u_int++;
+
+ $char = &get_next_char($count);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $decimal = $count. "\." .$count;
+
+
+ print ($char); #char not null
+
+ print ("\t",$char); #char binary not null
+
+ print ("\t",$char); #char ascii not null
+
+ print ("\t",$tinytext); #tinytext not null
+
+ print ("\t",$tinytext); #text not null
+
+ print ("\t",$longtext); #mediumtext not null
+
+ print ("\t",$longtext); #longtext not null unicode##
+
+ print ("\t",$tinytext); #tinyblob not null
+
+ print ("\t",$tinytext); #blob not null
+
+ print ("\t",$longtext); #mediumblob not null
+
+ print ("\t",$longtext); #longblob not null
+
+ print ("\t",$char); #binary not null
+
+ print ("\t",&random(127)); #tinyint not null
+
+ print ("\t",&random(255)); #tinyint unsigned not null
+
+ print ("\t",&random(127)); #tinyint zerofill not null
+
+ print ("\t",&random(255)); #tinyint unsigned zerofill not null
+
+ print ("\t",&random(32767)); #smallint not null
+
+ print ("\t",&random(65535)); #smallint unsigned not null
+
+ print ("\t",&random(32767)); #smallint zerofill not null
+
+ print ("\t",&random(65535)); #smallint unsigned zerofill not null
+
+ print ("\t",$s_int); #mediumint not null
+
+ print ("\t",$u_int); #mediumint unsigned not null
+
+ print ("\t",$u_int); #mediumint zerofill not null
+
+ print ("\t",$u_int); #mediumint unsigned zerofill not null
+
+ print ("\t",$s_int); #int not null
+
+ print ("\t",$u_int); #int unsigned not null
+
+ print ("\t",$u_int); #int zerofill not null
+
+ print ("\t",$u_int); #int unsigned zerofill not null
+
+ print ("\t",$s_int); #bigint not null
+
+ print ("\t",$u_int); #bigint unsigned not null
+
+ print ("\t",$u_int); #bigint zerofill not null
+
+ print ("\t",$u_int); #bigint unsigned zerofill not null
+
+ print ("\t",$s_int); #decimal
+
+ print ("\t",$u_int); #decimal unsigned
+
+ print ("\t",$u_int); #decimal zerofill
+
+ print ("\t",$u_int); #decimal unsigned zerofill
+
+ print ("\t",$s_int); #decimal(0)
+
+ print ("\t",$s_int); #decimal(254)
+
+ print ("\t",$u_int); #decimal (0) unsigned
+
+ print ("\t",$u_int); #decimal (254) unsigned
+
+ print ("\t",$u_int); #decimal(0) zerofill
+
+ print ("\t",$u_int); #decimal(254) zerofill
+
+ print ("\t",$u_int); #decimal (0) unsigned zerofill
+
+ print ("\t",$u_int); #decimal (254) unsigned zerofill
+
+ print ("\t",$s_int); #decimal (0,0)
+
+ print ("\t",$decimal); #decimal(253,253)
+
+ print ("\t",$u_int); #decimal (0,0) unsigned
+
+ print ("\t",$decimal); #decimal (253,253) unsigned
+
+ print ("\t",$u_int); #decimal(0,0) zerofill
+
+ print ("\t",$decimal); #decimal(253,253) zerofill
+
+ print ("\t",$u_int); #decimal (0,0) unsigned zerofill
+
+ print ("\t",$decimal); #decimal (253,253) unsigned zerofill
+
+ print ("\t",$s_int); #numeric
+
+ print ("\t",$u_int); #numeric unsigned
+
+ print ("\t",$u_int); #numeric zerofill
+
+ print ("\t",$u_int); #numeric unsigned zerofill
+
+ print ("\t",$s_int); #numeric(0)
+
+ print ("\t",$s_int); #numeric(254)
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+# Eighth Table "tb8.txt"
+
+
+ $file = 'myisam_tb4.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+ $enum = 1;
+
+ $set = 1;
+
+ $ret_bit = 1;
+
+ $s_int = 0;
+
+ $u_int = 0;
+
+ $s_time = "00:00:00";
+
+ $s_date = "1970-01-01";
+
+ $int=0;
+
+ $current_time = "838:59:59";
+
+ $current_date = "1000-01-00";
+
+ $current_year = 1901;
+
+ $u_current_float = 1.175494351e-38;
+
+ $s_current_float = -1.175494351e-38;
+
+ srand();
+
+
+ #Write data to file
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $u_int++;
+
+ $bit = &get_next_bit(30);
+
+ $char = &get_next_char($count);
+
+ $char_0 = &get_next_char_0($count);
+
+ $char_55 = &get_next_char_55($count);
+
+ $char_90 = &get_next_char_90($count);
+
+ $char_100 = &get_next_char_100($count);
+
+ $char_255 = &get_next_char_255($count);
+
+ $varchar_500 = &get_next_varchar_500($count);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $decimal = $count. "\." .$count;
+
+ $enum = &get_next_enum($enum);
+
+ $set = &get_next_set($set);
+
+ $current_date = &get_next_date($current_date);
+
+ $current_time = &get_next_time($current_time);
+
+ $current_year = &get_next_year($current_year);
+
+ $u_current_float = &get_next_float($u_current_float);
+
+ $s_current_float = &get_next_float($s_current_float);
+
+ $s_time = &get_next_s_time($s_time);
+
+ $s_date = &get_next_s_date($s_date);
+
+ $datetime = &get_next_datetime($s_date,$s_time);
+
+ $timestamp = &get_next_timestamp($s_date,$s_time);
+
+ $geometry = &get_next_geometry($count);
+
+ $point = &get_next_point($count);
+
+ $linestring = &get_next_linestring($count);
+
+ $polygon = &get_next_polygon($count);
+
+ $geometry_collection = &get_next_geometry_collection($count);
+
+ $multipoint = &get_next_multipoint($count);
+
+ $multilinestring = &get_next_multilinestring($count);
+
+ $multipolygon = &get_next_multipolygon($count);
+
+
+ print ($u_int); #numeric (0) unsigned not null
+
+ print ("\t",$u_int); #numeric (254) unsigned not null
+
+ print ("\t",$u_int); #numeric (0) zerofill not null
+
+ print ("\t",$u_int); #numeric (254) zerofill not null
+
+ print ("\t",$u_int); #numeric (0) unsigned zerofill not null
+
+ print ("\t",$u_int); #numeric (254) unsigned zerofill not null
+
+ print ("\t",$s_int); #numeric (0,0) not null
+
+ print ("\t",$decimal); #numeric (253,253) not null
+
+ print ("\t",$u_int); #numeric (0,0) unsigned not null
+
+ print ("\t",$decimal); #numeric (253,253) unsigned not null
+
+ print ("\t",$u_int); #numeric (0,0) zerofill not null
+
+ print ("\t",$decimal); #numeric (253,253) zerofill not null
+
+ print ("\t",$u_int); #numeric (0,0) unsigned zerofill not null
+
+ print ("\t",$decimal); #numeric (253,253) unsigned zerofill not null
+
+ print ("\t",$s_current_float); #real not null
+
+ print ("\t",$u_current_float); #real unsigned not null
+
+ print ("\t",$u_current_float); #real zerofill not null
+
+ print ("\t",$u_current_float); #real unsigned zerofill not null
+
+ print ("\t",$s_current_float); #double not null
+
+ print ("\t",$u_current_float); #double unsigned not null
+
+ print ("\t",$u_current_float); #double zerofill not null
+
+ print ("\t",$u_current_float); #double unsigned zerofill not null
+
+ print ("\t",$s_current_float); #float
+
+ print ("\t",$u_current_float); #float unsigned
+
+ print ("\t",$u_current_float); #float zerofill
+
+ print ("\t",$u_current_float); #float unsigned zerofill
+
+ print ("\t",$s_current_float); #float(0)
+
+ print ("\t",$s_current_float); #float(23)
+
+ print ("\t",$u_current_float); #float(0) unsigned
+
+ print ("\t",$u_current_float); #float(23) unsigned
+
+ print ("\t",$u_current_float); #float(0) zerofill
+
+ print ("\t",$u_current_float); #float(23) zerofill
+
+ print ("\t",$u_current_float); #float(0) unsigned zerofill
+
+ print ("\t",$u_current_float); #float(23) unsigned zerofill
+
+ print ("\t",$s_current_float); #float(24)
+
+ print ("\t",$s_current_float); #float(53)
+
+ print ("\t",$u_current_float); #float(24) unsigned
+
+ print ("\t",$u_current_float); #float(53) unsigned
+
+ print ("\t",$u_current_float); #float(24) zerofill
+
+ print ("\t",$u_current_float); #float(53) zerofill
+
+ print ("\t",$u_current_float); #float(24) unsigned zerofill
+
+ print ("\t",$u_current_float); #float(53) unsigned zerofill
+
+ print ("\t",$current_date); #date
+
+ print ("\t",$current_time); #time
+
+ print ("\t",$datetime); #datetime
+
+ print ("\t",$timestamp); #timestamp
+
+ print ("\t",$current_year); #year
+
+ print ("\t",$current_year); #year(3)
+
+ print ("\t",$current_year); #year(4)
+
+ print ("\t",$enum); #enum("1enum","2enum")
+
+ print ("\t",$set); #set("1set","2set")
+
+ print ("\t",$geometry); #geometry
+
+ print ("\t",$point); #point
+
+ print ("\t",$linestring); #linestring
+
+ print ("\t",$polygon); #polygon
+
+ print ("\t",$geometry_collection); #geometrycollection
+
+ print ("\t",$multipoint); #multipoint
+
+ print ("\t",$multilinestring); #multilinestring
+
+ print ("\t",$multipolygon); #multipolygon
+
+ print ("\t",$char_255); #char(255) unicode##
+
+ print ("\t",$char_55); #char(60) ascii##
+
+ print ("\t",$char_255); #char(255) binary##
+
+ print ("\t",$char_0); #varchar(0) binary##
+
+ print ("\t",$varchar_500); #varbinary(20000)##
+
+ print ("\t",$char_100); #varchar(120) unicode##
+
+ print ("\t",$char_100); #char(100) unicode##
+
+ print ("\t",$bit); #bit(30)##
+
+#geometry, point, linestring, polygon, geometrycollection, multipoint, multilinestring, multipolygon
+
+
+ print ("\n");
+
+ }
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+ }
+
+
+
+ elsif ( $ARGV[1] =~ /memory/i )
+
+ {
+
+
+# Ninth Table "tb9.txt"
+
+
+ $file = 'memory_tb1.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+
+ #Data type declarations
+
+
+ $s_int = 0;
+
+ $u_int = 0;
+
+ srand();
+
+
+
+ #Write data to file
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $u_int++;
+
+ $char = &get_next_char($count);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $decimal = $count. "\." .$count;
+
+
+ print ($char); #char
+
+ print ("\t",$char); #char binary
+
+ print ("\t",$char); #char ascii
+
+ print ("\t",$char); #binary
+
+ print ("\t",&random(127)); #tiny int
+
+ print ("\t",&random(255)); #tiny int unsigned
+
+ print ("\t",&random(127)); #tiny int zerofill
+
+ print ("\t",&random(255)); #tiny int unsigned zerofill
+
+ print ("\t",&random(32767)); #smallint
+
+ print ("\t",&random(65535)); #smallint unsigned
+
+ print ("\t",&random(32767)); #smallint zerofill
+
+ print ("\t",&random(65535)); #smallint unsigned zerofill
+
+ print ("\t",$s_int); #mediumint
+
+ print ("\t",$u_int); #mediumint unsigned
+
+ print ("\t",$u_int); #mediumint zerofill
+
+ print ("\t",$u_int); #mediumint unsigned zerofill
+
+ print ("\t",$s_int); #int
+
+ print ("\t",$u_int); #int unsigned
+
+ print ("\t",$u_int); #int zerofill
+
+ print ("\t",$u_int); #int unsigned zerofill
+
+ print ("\t",$s_int); #bigint
+
+ print ("\t",$u_int); #bigint unsigned
+
+ print ("\t",$u_int); #bigint zerofill
+
+ print ("\t",$u_int); #bigint unsigned zerofill
+
+ print ("\t",$s_int); #decimal
+
+ print ("\t",$u_int); #decimal unsigned
+
+ print ("\t",$u_int); #decimal zerofill
+
+ print ("\t",$u_int); #decimal unsigned zerofill not null
+
+ print ("\t",$s_int); #decimal(0) not null
+
+ print ("\t",$s_int); #decimal(254) not null
+
+ print ("\t",$u_int); #decimal (0) unsigned not null
+
+ print ("\t",$u_int); #decimal (254) unsigned not null
+
+ print ("\t",$u_int); #decimal(0) zerofill not null
+
+ print ("\t",$u_int); #decimal(254) zerofill not null
+
+ print ("\t",$u_int); #decimal (0) unsigned zerofill not null
+
+ print ("\t",$u_int); #decimal (254) unsigned zerofill not null
+
+ print ("\t",$s_int); #decimal (0,0) not null
+
+ print ("\t",$decimal); #decimal(253,253) not null
+
+ print ("\t",$u_int); #decimal (0,0) unsigned not null
+
+ print ("\t",$decimal); #decimal (253,253) unsigned not null
+
+ print ("\t",$u_int); #decimal(0,0) zerofill not null
+
+ print ("\t",$decimal); #decimal(253,253) zerofill not null
+
+ print ("\t",$u_int); #decimal (0,0) unsigned zerofill not null
+
+ print ("\t",$decimal); #decimal (253,253) unsigned zerofill not null
+
+ print ("\t",$s_int); #numeric not null
+
+ print ("\t",$u_int); #numeric unsigned not null
+
+ print ("\t",$u_int); #numeric zerofill not null
+
+ print ("\t",$u_int); #numeric unsigned zerofill not null
+
+ print ("\t",$s_int); #numeric(0) not null
+
+ print ("\t",$s_int); #numeric(254) not null
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+
+
+# Tenth Table "tb10.txt"
+
+
+ $file = 'memory_tb2.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+ $enum = 1;
+
+ $set = 1;
+
+ $s_int = 0;
+
+ $u_int = 0;
+
+ $s_time = "00:00:00";
+
+ $s_date = "1970-01-01";
+
+ $int=0;
+
+ $current_time = "838:59:59";
+
+ $current_date = "1000-01-00";
+
+ $current_year = 1901;
+
+ $u_current_float = 1.175494351e-38;
+
+ $s_current_float = -1.175494351e-38;
+
+ srand();
+
+
+ #Write data to file
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $u_int++;
+
+ $char = &get_next_char($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $decimal = $count. "\." .$count;
+
+ $int = &get_next_int($int);
+
+ $enum = &get_next_enum($enum);
+
+ $set = &get_next_set($set);
+
+ $current_date = &get_next_date($current_date);
+
+ $current_time = &get_next_time($current_time);
+
+ $current_year = &get_next_year($current_year);
+
+ $u_current_float = &get_next_float($u_current_float);
+
+ $s_current_float = &get_next_float($s_current_float);
+
+ $s_time = &get_next_s_time($s_time);
+
+ $s_date = &get_next_s_date($s_date);
+
+ $datetime = &get_next_datetime($s_date,$s_time);
+
+ $timestamp = &get_next_timestamp($s_date,$s_time);
+
+
+ print ($u_int); #numeric (0) unsigned
+
+ print ("\t",$u_int); #numeric (254) unsigned
+
+ print ("\t",$u_int); #numeric (0) zerofill
+
+ print ("\t",$u_int); #numeric (254) zerofill
+
+ print ("\t",$u_int); #numeric (0) unsigned zerofill
+
+ print ("\t",$u_int); #numeric (254) unsigned zerofill
+
+ print ("\t",$s_int); #numeric (0,0)
+
+ print ("\t",$decimal); #numeric (253,253)
+
+ print ("\t",$u_int); #numeric (0,0) unsigned
+
+ print ("\t",$decimal); #numeric (253,253) unsigned
+
+ print ("\t",$u_int); #numeric (0,0) zerofill
+
+ print ("\t",$decimal); #numeric (253,253) zerofill
+
+ print ("\t",$u_int); #numeric (0,0) unsigned zerofill
+
+ print ("\t",$decimal); #numeric (253,253) unsigned zerofill
+
+ print ("\t",$s_current_float); #real
+
+ print ("\t",$u_current_float); #real unsigned
+
+ print ("\t",$u_current_float); #real zerofill
+
+ print ("\t",$u_current_float); #real unsigned zerofill
+
+ print ("\t",$s_current_float); #double
+
+ print ("\t",$u_current_float); #double unsigned
+
+ print ("\t",$u_current_float); #double zerofill
+
+ print ("\t",$u_current_float); #double unsigned zerofill
+
+ print ("\t",$s_current_float); #float not null
+
+ print ("\t",$u_current_float); #float unsigned not null
+
+ print ("\t",$u_current_float); #float zerofill not null
+
+ print ("\t",$u_current_float); #float unsigned zerofill not null
+
+ print ("\t",$s_current_float); #float(0) not null
+
+ print ("\t",$s_current_float); #float(23) not null
+
+ print ("\t",$u_current_float); #float(0) unsigned not null
+
+ print ("\t",$u_current_float); #float(23) unsigned not null
+
+ print ("\t",$u_current_float); #float(0) zerofill not null
+
+ print ("\t",$u_current_float); #float(23) zerofill not null
+
+ print ("\t",$u_current_float); #float(0) unsigned zerofill not null
+
+ print ("\t",$u_current_float); #float(23) unsigned zerofill not null
+
+ print ("\t",$s_current_float); #float(24) not null
+
+ print ("\t",$s_current_float); #float(53) not null
+
+ print ("\t",$u_current_float); #float(24) unsigned not null
+
+ print ("\t",$u_current_float); #float(53) unsigned not null
+
+ print ("\t",$u_current_float); #float(24) zerofill not null
+
+ print ("\t",$u_current_float); #float(53) zerofill not null
+
+ print ("\t",$u_current_float); #float(24) unsigned zerofill not null
+
+ print ("\t",$u_current_float); #float(53) unsigned zerofill not null
+
+ print ("\t",$current_date); #date not null
+
+ print ("\t",$current_time); #time not null
+
+ print ("\t",$datetime); #datetime not null
+
+ print ("\t",$timestamp); #timestamp not null
+
+ print ("\t",$current_year); #year not null
+
+ print ("\t",$current_year); #year(3) not null
+
+ print ("\t",$current_year); #year(4) not null
+
+ print ("\t",$enum); #enum("1enum","2enum") not null
+
+ print ("\t",$set); #set("1set","2set") not null
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+
+# Eleventh Table "tb11.txt"
+
+
+ $file = 'memory_tb3.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+ $u_int = 0;
+
+ srand();
+
+
+ #Write data to file
+
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+
+ $u_int++;
+
+ $char = &get_next_char($count);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $decimal = $count. "\." .$count;
+
+
+ print ($char); #char not null
+
+ print ("\t",$char); #char binary not null
+
+ print ("\t",$char); #char ascii not null
+
+# OBN - Added two strings to address the missing f121, f122 used in trigger testing
+# as char(50). In MyISAM, innodb they are text and tinytext
+ print ("\t",$char); #char (50)
+ print ("\t",$char); #char (50)
+# OBN - End of modification
+
+ print ("\t",$char); #binary not null
+
+ print ("\t",&random(127)); #tinyint not null
+
+ print ("\t",&random(255)); #tinyint unsigned not null
+
+ print ("\t",&random(127)); #tinyint zerofill not null
+
+ print ("\t",&random(255)); #tinyint unsigned zerofill not null
+
+ print ("\t",&random(32767)); #smallint not null
+
+ print ("\t",&random(65535)); #smallint unsigned not null
+
+ print ("\t",&random(32767)); #smallint zerofill not null
+
+ print ("\t",&random(65535)); #smallint unsigned zerofill not null
+
+ print ("\t",$s_int); #mediumint not null
+
+ print ("\t",$u_int); #mediumint unsigned not null
+
+ print ("\t",$u_int); #mediumint zerofill not null
+
+ print ("\t",$u_int); #mediumint unsigned zerofill not null
+
+ print ("\t",$s_int); #int not null
+
+ print ("\t",$u_int); #int unsigned not null
+
+ print ("\t",$u_int); #int zerofill not null
+
+ print ("\t",$u_int); #int unsigned zerofill not null
+
+ print ("\t",$s_int); #bigint not null
+
+ print ("\t",$u_int); #bigint unsigned not null
+
+ print ("\t",$u_int); #bigint zerofill not null
+
+ print ("\t",$u_int); #bigint unsigned zerofill not null
+
+ print ("\t",$s_int); #decimal not null
+
+ print ("\t",$u_int); #decimal unsigned not null
+
+ print ("\t",$u_int); #decimal zerofill not null
+
+ print ("\t",$u_int); #decimal unsigned zerofill
+
+ print ("\t",$s_int); #decimal(0)
+
+ print ("\t",$s_int); #decimal(254)
+
+ print ("\t",$u_int); #decimal (0) unsigned
+
+ print ("\t",$u_int); #decimal (254) unsigned
+
+ print ("\t",$u_int); #decimal(0) zerofill
+
+ print ("\t",$u_int); #decimal(254) zerofill
+
+ print ("\t",$u_int); #decimal (0) unsigned zerofill
+
+ print ("\t",$u_int); #decimal (254) unsigned zerofill
+
+ print ("\t",$s_int); #decimal (0,0)
+
+ print ("\t",$decimal); #decimal(253,253)
+
+ print ("\t",$u_int); #decimal (0,0) unsigned
+
+ print ("\t",$decimal); #decimal (253,253) unsigned
+
+ print ("\t",$u_int); #decimal(0,0) zerofill
+
+ print ("\t",$decimal); #decimal(253,253) zerofill
+
+ print ("\t",$u_int); #decimal (0,0) unsigned zerofill
+
+ print ("\t",$decimal); #decimal (253,253) unsigned zerofill
+
+ print ("\t",$s_int); #numeric
+
+ print ("\t",$u_int); #numeric unsigned
+
+ print ("\t",$u_int); #numeric zerofill
+
+ print ("\t",$u_int); #numeric unsigned zerofill
+
+ print ("\t",$s_int); #numeric(0)
+
+ print ("\t",$s_int); #numeric(254)
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+
+# Twelfth Table "tb12.txt"
+
+
+ $file = 'memory_tb4.txt';
+
+ open ( FILE_INPUT, ">$file");
+
+ $oldhandle = select(FILE_INPUT);
+
+
+ $enum = 1;
+
+ $ret_bit = 1;
+
+ $set = 1;
+
+ $s_int = 0;
+
+ $u_int = 0;
+
+ $s_time = "00:00:00";
+
+ $s_date = "1970-01-01";
+
+ $int=0;
+
+ $current_time = "838:59:59";
+
+ $current_date = "1000-01-00";
+
+ $current_year = 1901;
+
+ $u_current_float = 1.175494351e-38;
+
+ $s_current_float = -1.175494351e-38;
+
+ srand();
+
+
+ #Write data to file
+
+ for ($count=0; $count < $ARGV[0]; $count++)
+
+ {
+
+ $u_int++;
+
+# $bit = &get_next_bit(64);
+
+ $char = &get_next_char($count);
+
+ $char_0 = &get_next_char_0($count);
+
+ $char_55 = &get_next_char_55($count);
+
+ $char_90 = &get_next_char_90($count);
+
+ $char_100 = &get_next_char_100($count);
+
+ $char_255 = &get_next_char_255($count);
+
+ $varchar_500 = &get_next_varchar_500($count);
+
+ $longtext = &get_next_longtext($count);
+
+ $tinytext = &get_next_tinytext($count);
+
+ $s_int = &get_next_s_int($count,$ARGV[0]);
+
+ $decimal = $count. "\." .$count;
+
+ $int = &get_next_int($int);
+
+ $enum = &get_next_enum($enum);
+
+ $set = &get_next_set($set);
+
+ $current_date = &get_next_date($current_date);
+
+ $current_time = &get_next_time($current_time);
+
+ $current_year = &get_next_year($current_year);
+
+ $u_current_float = &get_next_float($u_current_float);
+
+ $s_current_float = &get_next_float($s_current_float);
+
+ $s_time = &get_next_s_time($s_time);
+
+ $s_date = &get_next_s_date($s_date);
+
+ $datetime = &get_next_datetime($s_date,$s_time);
+
+ $timestamp = &get_next_timestamp($s_date,$s_time);
+
+
+ print ($u_int); #numeric (0) unsigned not null
+
+ print ("\t",$u_int); #numeric (254) unsigned not null
+
+ print ("\t",$u_int); #numeric (0) zerofill not null
+
+ print ("\t",$u_int); #numeric (254) zerofill not null
+
+ print ("\t",$u_int); #numeric (0) unsigned zerofill not null
+
+ print ("\t",$u_int); #numeric (254) unsigned zerofill not null
+
+ print ("\t",$s_int); #numeric (0,0) not null
+
+ print ("\t",$decimal); #numeric (253,253) not null
+
+ print ("\t",$u_int); #numeric (0,0) unsigned not null
+
+ print ("\t",$decimal); #numeric (253,253) unsigned not null
+
+ print ("\t",$u_int); #numeric (0,0) zerofill not null
+
+ print ("\t",$decimal); #numeric (253,253) zerofill not null
+
+ print ("\t",$u_int); #numeric (0,0) unsigned zerofill not null
+
+ print ("\t",$decimal); #numeric (253,253) unsigned zerofill not null
+
+ print ("\t",$s_current_float); #real not null
+
+ print ("\t",$u_current_float); #real unsigned not null
+
+ print ("\t",$u_current_float); #real zerofill not null
+
+ print ("\t",$u_current_float); #real unsigned zerofill not null
+
+ print ("\t",$s_current_float); #double not null
+
+ print ("\t",$u_current_float); #double unsigned not null
+
+ print ("\t",$u_current_float); #double zerofill not null
+
+ print ("\t",$u_current_float); #double unsigned zerofill not null
+
+ print ("\t",$s_current_float); #float
+
+ print ("\t",$u_current_float); #float unsigned
+
+ print ("\t",$u_current_float); #float zerofill
+
+ print ("\t",$u_current_float); #float unsigned zerofill
+
+ print ("\t",$s_current_float); #float(0)
+
+ print ("\t",$s_current_float); #float(23)
+
+ print ("\t",$u_current_float); #float(0) unsigned
+
+ print ("\t",$u_current_float); #float(23) unsigned
+
+ print ("\t",$u_current_float); #float(0) zerofill
+
+ print ("\t",$u_current_float); #float(23) zerofill
+
+ print ("\t",$u_current_float); #float(0) unsigned zerofill
+
+ print ("\t",$u_current_float); #float(23) unsigned zerofill
+
+ print ("\t",$s_current_float); #float(24)
+
+ print ("\t",$s_current_float); #float(53)
+
+ print ("\t",$u_current_float); #float(24) unsigned
+
+ print ("\t",$u_current_float); #float(53) unsigned
+
+ print ("\t",$u_current_float); #float(24) zerofill
+
+ print ("\t",$u_current_float); #float(53) zerofill
+
+ print ("\t",$u_current_float); #float(24) unsigned zerofill
+
+ print ("\t",$u_current_float); #float(53) unsigned zerofill
+
+ print ("\t",$current_date); #date
+
+ print ("\t",$current_time); #time
+
+ print ("\t",$datetime); #datetime
+
+ print ("\t",$timestamp); #timestamp
+
+ print ("\t",$current_year); #year
+
+ print ("\t",$current_year); #year(3)
+
+ print ("\t",$current_year); #year(4)
+
+ print ("\t",$enum); #enum("1enum","2enum")
+
+ print ("\t",$set); #set("1set","2set")
+
+ print ("\t",$char_90); #char(95) unicode##
+
+ print ("\t",$char_255); #char(255) unicode##
+
+ print ("\t",$char_100); #char(130) binary##
+
+ print ("\t",$varchar_500); #varchar(25000) binary##
+
+ print ("\t",$char_0); #varbinary(0)##
+
+ print ("\t",$varchar_500); #varchar(1200) unicode##
+
+# print ("\t",$bit); #Bit(64)##
+
+ print ("\n");
+
+ }
+
+
+ select ($oldhandle);
+
+ close (FILE_INPUT);
+
+
+ }
+
+
+ else
+
+ {
+
+ &printusage;
+
+ }
+
+
+}
+
+
+
+#Subroutines START HERE
+
+
+sub get_next_geometry
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 6 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@\0\0\0\0\0\0^@\0\0\0\0\0\0^@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0�@\0\0\0\0\0�@\0\0\0\0\0\0y@\0\0\0\0\0\0y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�@\0\0\0\0\0\0Y@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0@@\0\0\0\0\0@@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+
+sub get_next_point
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 6 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\09@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0A@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0\09@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0A@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0F@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0K@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0@P@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0�@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\09@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0@U@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0K@\0\0\0\0\0�@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0@P@\0\0\0\0\0�@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0�@\0\0\0\0\0�@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0@U@\0\0\0\0\0�@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0�@\0\0\0\0\0�@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_linestring
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 6 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@\0\0\0\0\0\0^@\0\0\0\0\0\0^@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0�@\0\0\0\0\0�@\0\0\0\0\0\0y@\0\0\0\0\0\0y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�@\0\0\0\0\0\0Y@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0@@\0\0\0\0\0@@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+
+sub get_next_polygon
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 6 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\04@\0\0\0\0\0\0�\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0�\0\0\0\0\0\04@\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0+@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0(@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0*@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0�@\0\0\0\0\0\0&@\0\0\0\0\0�@\0\0\0\0\0�@\0\0\0\0\0\0&@\0\0\0\0\0�@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\00@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\01@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\02@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\03@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0�\0\0\0\0\0\0.@\0\0\0\0\0�\0\0\0\0\0�\0\0\0\0\0\0.@\0\0\0\0\0�\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\05@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\06@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0�\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\07@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\0�\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\08@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_geometry_collection
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 6 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\04@\0\0\0\0\0\0�\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0�\0\0\0\0\0\04@\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0(@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0*@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0�@\0\0\0\0\0\0&@\0\0\0\0\0�@\0\0\0\0\0�@\0\0\0\0\0\0&@\0\0\0\0\0�@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\00@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\01@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\02@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\03@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0�\0\0\0\0\0\0.@\0\0\0\0\0�\0\0\0\0\0�\0\0\0\0\0\0.@\0\0\0\0\0�\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\05@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\06@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0�\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\07@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\0�\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\08@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_multipoint
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 6 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0*@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0Q@\0\0\0\0\0Q@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0V@\0\0\0\0\0V@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0i@\0\0\0\0\0\0i@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0�@\0\0\0\0\0\0Y@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_multilinestring
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 6 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0[@\0\0\0\0\0[@\0\0\0\0\0\0^@\0\0\0\0\0\0^@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0�@\0\0\0\0\0�@\0\0\0\0\0\0y@\0\0\0\0\0\0y@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�@\0\0\0\0\0\0Y@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0@@\0\0\0\0\0@@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_multipolygon
+
+{
+
+ my($count) = @_;
+
+ $index = $count % 6 ;
+
+
+ @ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\04@\0\0\0\0\0\0�\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0�\0\0\0\0\0\04@\0\0\0\0\0\0�\0\0\0\0\0\0�\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@',
+
+'\N',
+
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0T@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0,@\0\0\0\0\0\0(@\0\0\0\0\0\0(@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0V@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0.@\0\0\0\0\0\0*@\0\0\0\0\0\0*@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0Y@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\00@\0\0\0\0\0\0,@\0\0\0\0\0\0,@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0i@\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\01@\0\0\0\0\0\0.@\0\0\0\0\0\0.@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0�@\0\0\0\0\0\0&@\0\0\0\0\0�@\0\0\0\0\0�@\0\0\0\0\0\0&@\0\0\0\0\0�@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\02@\0\0\0\0\0\00@\0\0\0\0\0\00@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0y@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\03@\0\0\0\0\0\01@\0\0\0\0\0\01@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0@@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\04@\0\0\0\0\0\02@\0\0\0\0\0\02@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0@\0\0\0\0\0\0,@\0\0\0\0\0\0,@\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\05@\0\0\0\0\0\03@\0\0\0\0\0\03@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0�\0\0\0\0\0\0.@\0\0\0\0\0�\0\0\0\0\0�\0\0\0\0\0\0.@\0\0\0\0\0�\0\0\0\0\0\0.@\0\0\0\0\0\0.@\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\06@\0\0\0\0\0\04@\0\0\0\0\0\04@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\0@\0\0\0\0\0\00@\0\0\0\0\0\00@\0\0\0\0\0\0\0\0\05@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\07@\0\0\0\0\0\05@\0\0\0\0\0\05@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0 @\0\0\0\0\0\01@\0\0\0\0\0\01@\0\0\0\0\0\0\0\0\06@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\08@\0\0\0\0\0\06@\0\0\0\0\0\06@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0�\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\07@',
+
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\0�\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\08@');
+
+
+ return($ascii[$index]);
+
+}
+
+
+sub get_next_int
+
+{
+
+ my($next_int) = @_;
+
+ if (($next_int>= 0) && ($next_int<= 255))
+
+ {
+
+ $next_int++;
+
+ }
+
+
+ else
+
+ {
+
+ $next_int = 0;
+
+ }
+
+ return($next_int);
+
+}
+
+
+
+sub get_next_enum
+
+{
+
+ my($next_enum) = @_;
+
+ if($next_enum == 1)
+
+ {
+
+ $next_enum = 2;
+
+ }
+
+ else
+
+ {
+
+ $next_enum = 1;
+
+ }
+
+
+
+ return($next_enum);
+
+}
+
+
+sub get_next_set
+
+{
+
+ my($next_set) = @_;
+
+ if($next_set == 3)
+
+ {
+
+ $next_set = 1;
+
+ }
+
+ else
+
+ {
+
+ $next_set++;
+
+ }
+
+
+
+ return($next_set);
+
+}
+
+
+sub get_next_bit
+
+{
+ my($col_size) = @_;
+
+ my($max_size) = $col_size / 8;
+
+# my($sp_char) = "\x01";
+
+ my($max_no) = 9 x $max_size;
+
+ if ($ret_bit < $max_no)
+ {
+
+ $ret_bit++;
+
+ }
+
+ else
+ {
+
+ $ret_bit = 1;
+
+ }
+
+ return($ret_bit);
+
+}
+
+
+sub get_next_char
+
+{
+ my($count) = @_;
+
+ my($index) = $count % 72;
+
+ @ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',
+
+'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','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');
+
+
+ return($ascii[$index]);
+}
+
+
+
+sub get_next_char_0
+
+{
+ my($ret_string) = '';
+
+ return($ret_string);
+}
+
+
+sub get_next_char_55
+
+{
+ my($count) = @_;
+
+ my($local_count) = $count % 15;
+
+ my($ret_string) = '';
+
+ my($index) = $count % 72;
+
+ @ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',
+
+'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','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');
+
+ for($loop_count=0;$loop_count <= $local_count; $loop_count++)
+
+ {
+
+ $ret_string = $ret_string.$ascii[$index];
+
+ $index = ($index + 1) % 72;
+
+ }
+
+ $ret_string = $count.$ret_string;
+
+ return($ret_string);
+
+}
+
+
+sub get_next_char_90
+
+{
+ my($count) = @_;
+
+ my($ret_string) = '';
+
+ my($local_count) = $count % 25;
+
+ my($index) = $count % 72;
+
+ @ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',
+
+'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','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');
+
+
+ for($loop_count=0; $loop_count <= $local_count; $loop_count++)
+
+ {
+
+ $ret_string = $ret_string.$ascii[$index];
+
+ $index = ($index + 1) % 72;
+ }
+
+ $ret_string = $count.$ret_string;
+
+ return($ret_string);
+
+}
+
+
+sub get_next_char_100
+
+{
+ my($count) = @_;
+
+ my($local_count) = $count % 50;
+
+ my($ret_string) = '';
+
+ my($index) = $count % 72;
+
+ @ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',
+
+'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','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');
+
+ for($loop_count=0; $loop_count <= $local_count; $loop_count++)
+
+ {
+
+ $ret_string = $ret_string.$ascii[$index];
+
+ $index = ($index + 1) % 72;
+ }
+
+ $ret_string = $count.$ret_string;
+
+ return($ret_string);
+
+}
+
+
+
+sub get_next_char_255
+
+{
+ my($count) = @_;
+
+ my($local_count) = $count % 125;
+
+ my($ret_string) = '';
+
+ my($index) = $count % 72;
+
+ @ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',
+
+'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','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');
+
+ for($loop_count=0; $loop_count<$local_count; $loop_count++)
+
+ {
+
+ $ret_string = $ret_string.$ascii[$index];
+
+ $index = ($index + 1) % 72;
+ }
+
+ $ret_string = $count.$ret_string;
+
+ return($ret_string);
+
+}
+
+
+sub get_next_varchar_500
+{
+ my($count) = @_;
+
+ my($ret_string) = '';
+
+ my($local_count) = $count % 100;
+
+ my($index) = $count % 72;
+
+ @ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',
+
+'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','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');
+
+ for($loop_count=0; $loop_count<$local_count; $loop_count++)
+
+ {
+
+ $ret_string = $ret_string.$ascii[$index];
+
+ $index = ($index + 1) % 72;
+ }
+
+ $ret_string = $count.$ret_string;
+
+ return($ret_string);
+
+}
+
+
+
+sub get_next_float
+
+{
+
+ my($next_float) = @_;
+
+ $next_float = $next_float + 1e-47;
+
+ return($next_float);
+
+}
+
+
+
+
+sub get_next_tinytext
+
+{
+
+ my($count) = @_;
+
+ my($default_char) = "a";
+
+ $index = $count % 20 ;
+
+
+ @ascii = ("\140","\141","\142","\143","\144","\145","\146","\147","\136","\137","\150",
+
+ "\151","\152","\153","\154","\155","\156","\157","\134","\135");
+
+
+ my($quotient) = $count / 100;
+
+ $quotient =~ s/\.[0-9]*// ;
+
+ $tinytext = $default_char.$ascii[$index].$quotient;
+
+
+ return($tinytext);
+
+}
+
+
+
+sub get_next_longtext
+
+{
+
+ my($count) = @_;
+
+ my($default_char) = "a";
+
+ $index = $count % 20 ;
+
+ $multp = $count % 100;
+
+ @ascii = ("\140","\141","\142","\143","\144","\145","\146","\147","\136","\137","\150",
+
+ "\151","\152","\153","\154","\155","\156","\157","\134","\135");
+
+
+ $longtext = $count.$ascii[$index].$default_char x $multp;
+
+ return($longtext);
+
+}
+
+
+
+sub get_next_year
+
+{
+
+ my($next_year) = @_;
+
+ if (($next_year >= 1901) && ($next_year < 2155))
+
+ {
+
+ $next_year++;
+
+ }
+
+
+ else
+
+ {
+
+ $next_year = 1901;
+
+ }
+
+ return($next_year);
+
+}
+
+
+
+sub get_next_datetime
+
+{
+
+ my($date,$time) = @_;
+
+ $datetime = $date." ".$time;
+
+ return($datetime);
+
+}
+
+
+
+sub get_next_s_int
+
+{
+
+ my($count,$maxsize) = @_;
+
+ $s_int = int($count - ($maxsize/2));
+
+ return($s_int);
+
+}
+
+
+
+
+sub get_next_timestamp
+
+{
+
+ my($date,$time) = @_;
+
+ my($pattern1) = "-";
+
+ my($pattern2) = ":";
+
+ @split_date = split(/$pattern1/,$date);
+
+ @split_time = split(/$pattern2/,$time);
+
+ $timestamp = "$split_date[0]"."$split_date[1]"."$split_date[2]"."$split_time[0]"."$split_time[1]"."$split_time[2]";
+
+ return($timestamp);
+}
+
+
+
+sub get_next_time
+
+{
+
+ my($time) = @_;
+
+ $pattern = ":";
+
+ @words = split(/$pattern/, $time);
+
+
+
+ $hour = $words[0];
+
+ $min = $words[1];
+
+ $sec = $words[2];
+
+
+
+#Boundary condition
+
+
+ if(($hour == -838)&&($min == 0)&&($sec == 0))
+
+ {
+
+ $hour = 838;
+
+ $min = 59;
+
+ $sec = 59;
+
+ }
+
+
+ if($min > 0)
+
+ {
+
+ if($sec > 0)
+
+ {
+
+ $sec-- ;
+
+ }
+
+ else
+
+ {
+
+ $sec = 59;
+
+ $min-- ;
+
+ }
+
+ }
+
+
+
+ else
+
+ {
+
+ $hour-- ;
+
+ $min = 59;
+
+ $sec = 59;
+
+ }
+
+
+ if($hour !~ /[0-9][0-9]/)
+
+ {
+
+ $hour = "0".$hour;
+
+ }
+
+
+ if($min !~ /[0-9][0-9]/)
+
+ {
+
+ $min = "0".$min;
+
+ }
+
+
+
+ if($sec !~ /[0-9][0-9]/)
+
+ {
+
+ $sec = "0".$sec;
+
+ }
+
+
+ $time = "$hour".":"."$min".":"."$sec";
+
+ return($time);
+
+}
+
+
+
+sub get_next_date
+
+{
+
+ my($date) = @_ ;
+
+ $pattern = '-';
+
+ @words = split(/$pattern/, $date);
+
+
+ $year = $words[0];
+
+ $month = $words[1];
+
+ $day = $words[2];
+
+
+ if (($month == 2) )
+
+ {
+
+ if($day == 28)
+
+ {
+
+ if($year =~ /[0-9][0-9]00/)
+
+ {
+
+ if($year % 400 == 0)
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+
+
+ else
+
+ {
+
+ if($year % 4 == 0)
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+ }
+
+
+ elsif($day == 29)
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+
+
+ else
+
+ {
+
+ $day++;
+
+ }
+
+ }
+
+
+ elsif($day == 30)
+
+ {
+
+ if (($month == 1) || ($month == 3) || ($month == 5) || ($month == 7) || ($month == 8) || ($month == 10) || ($month == 12))
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+
+ elsif($day == 31)
+
+ {
+
+ if ($month == 12)
+
+ {
+
+ $day = 01;
+
+ $month = 01;
+
+
+
+ if($year < 9999)
+
+ {
+
+ $year++;
+
+ }
+
+ else
+
+ {
+
+ $year = 1000;
+
+ }
+
+ }
+
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+
+
+ else
+
+ {
+
+ $day++;
+
+ }
+
+
+ if($month !~ /[0-9][0-9]/)
+
+ {
+
+ $month = "0".$month;
+
+ }
+
+
+
+ if($day !~ /[0-9][0-9]/)
+
+ {
+
+ $day = "0".$day;
+
+ }
+
+
+
+ $date = "$year"."-"."$month"."-"."$day";
+
+
+
+ return($date);
+
+}
+
+
+
+
+sub get_next_s_date
+
+{
+
+ my($date) = @_ ;
+
+ $pattern = '-';
+
+ @words = split(/$pattern/, $date);
+
+
+ $year = "$words[0]";
+
+ $month = "$words[1]";
+
+ $day = "$words[2]";
+
+
+ if (($month == "02") )
+
+ {
+
+ if($day == "28")
+
+ {
+
+ if($year =~ /[0-9][0-9]00/)
+
+ {
+
+ if($year % 400 == 0)
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+
+
+ else
+
+ {
+
+ if($year % 4 == 0)
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = 01;
+
+ $month++;
+
+ }
+
+ }
+
+ }
+
+
+
+ elsif($day == "29")
+
+ {
+
+ $day = "01";
+
+ $month++;
+
+ }
+
+
+
+ else
+
+ {
+
+ $day++;
+
+ }
+
+ }
+
+
+ elsif($day == "30")
+
+ {
+
+ if (($month == "01") || ($month == "03") || ($month == "05") || ($month == "07") || ($month == "08") || ($month == "10") || ($month == "12"))
+
+ {
+
+ $day++;
+
+ }
+
+ else
+
+ {
+
+ $day = "01";
+
+ $month++;
+
+ }
+
+ }
+
+
+ elsif($day == "31")
+
+ {
+
+ if ($month == "12")
+
+ {
+
+ $day = "01";
+
+ $month = "01";
+
+
+
+ if($year < "2036")
+
+ {
+
+ $year = $year + "0001";
+
+ }
+
+ else
+
+ {
+
+ $year = "1970";
+
+ }
+
+ }
+
+
+ else
+
+ {
+
+ $day = "01";
+
+ $month++;
+
+ }
+
+ }
+
+
+
+ else
+
+ {
+
+ $day++;
+
+ }
+
+
+ if($month !~ /[0-9][0-9]/)
+
+ {
+
+ $month = "0".$month;
+
+ }
+
+
+
+ if($day !~ /[0-9][0-9]/)
+
+ {
+
+ $day = "0".$day;
+
+ }
+
+
+
+ $date = "$year"."-"."$month"."-"."$day";
+
+
+
+ return($date);
+
+}
+
+
+
+
+sub get_next_s_time
+
+{
+
+ my($time) = @_;
+
+ $pattern = ":";
+
+ @words = split(/$pattern/, $time);
+
+
+
+ $hour = "$words[0]";
+
+ $min = "$words[1]";
+
+ $sec = "$words[2]";
+
+
+
+ #Boundary condition
+
+
+ if(($hour == "23")&&($min == "59")&&($sec == "59"))
+
+ {
+
+ $hour = "00";
+
+ $min = "00";
+
+ $sec = "00";
+
+ }
+
+
+ if($min < "59")
+
+ {
+
+ if($sec < "59")
+
+ {
+
+ $sec = $sec + "01";
+
+ }
+
+ else
+
+ {
+
+ $sec = "00";
+
+ $min = $min + "01" ;
+
+ }
+
+ }
+
+
+
+ else
+
+ {
+
+ $hour = $hour + "01" ;
+
+ $min = "00";
+
+ $sec = "00";
+
+ }
+
+
+ if($hour !~ /[0-9][0-9]/)
+
+ {
+
+ $hour = "0".$hour;
+
+ }
+
+
+ if($min !~ /[0-9][0-9]/)
+
+ {
+
+ $min = "0".$min;
+
+ }
+
+
+
+ if($sec !~ /[0-9][0-9]/)
+
+ {
+
+ $sec = "0".$sec;
+
+ }
+
+
+ $time = "$hour".":"."$min".":"."$sec";
+
+
+
+ return($time);
+
+}
+
+
+
+
+sub printusage
+
+{
+
+ print "\n\nUsage: Perl DataGen.pl <Rowcount> <Storage Engine>";
+
+ print "\n\n<Rowcount>: The number of rows in the table " .
+
+ "\n<Storage Engine>: The storage engine parameter" .
+
+ " will be of the following types:" .
+
+ "\n\t\t InnoDB | MyIsam | Memory" .
+
+ "\n\nE.g. Perl DataGen.pl 5000 InnoDB" .
+
+ "\n\nThis will generate 4 text files containing 5000" .
+
+ " records each for the 4 types of InnoDB tables.\n\n";
+
+}
+
+
+
+sub random
+
+{
+
+ my($limit) = @_ ;
+
+ $random = int(rand($limit));
+
+ return($random);
+
+}
+
diff --git a/mysql-test/suite/funcs_1/r/charset_collation.result b/mysql-test/suite/funcs_1/r/charset_collation.result
new file mode 100644
index 00000000..c0c36d9e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/charset_collation.result
@@ -0,0 +1,41 @@
+DROP USER dbdict_test@localhost;
+CREATE USER dbdict_test@localhost;
+connect con,localhost,dbdict_test,,;
+
+SELECT *
+FROM information_schema.character_sets
+WHERE character_set_name IN ('utf8mb3','latin1','binary')
+ORDER BY character_set_name;
+CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
+binary binary Binary pseudo charset 1
+latin1 latin1_swedish_ci cp1252 West European 1
+utf8mb3 utf8mb3_general_ci UTF-8 Unicode 3
+
+SELECT *
+FROM information_schema.collations
+WHERE character_set_name IN ('utf8mb3','latin1','binary')
+AND (collation_name LIKE CONCAT(character_set_name,'_general_ci')
+OR
+collation_name LIKE CONCAT(character_set_name,'_bin'))
+ORDER BY collation_name;
+COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
+latin1_bin latin1 47 Yes 1
+latin1_general_ci latin1 48 Yes 1
+utf8mb3_bin utf8mb3 83 Yes 1
+utf8mb3_general_ci utf8mb3 33 Yes Yes 1
+
+SELECT *
+FROM information_schema.collation_character_set_applicability
+WHERE character_set_name IN ('utf8mb3','latin1','binary')
+AND (collation_name LIKE CONCAT(character_set_name,'_general_ci')
+OR
+collation_name LIKE CONCAT(character_set_name,'_bin'))
+ORDER BY collation_name, character_set_name;
+COLLATION_NAME CHARACTER_SET_NAME FULL_COLLATION_NAME ID IS_DEFAULT
+latin1_bin latin1 latin1_bin 47
+latin1_general_ci latin1 latin1_general_ci 48
+utf8mb3_bin utf8mb3 utf8mb3_bin 83
+utf8mb3_general_ci utf8mb3 utf8mb3_general_ci 33 Yes
+connection default;
+disconnect con;
+DROP USER dbdict_test@localhost;
diff --git a/mysql-test/suite/funcs_1/r/innodb_bitdata.result b/mysql-test/suite/funcs_1/r/innodb_bitdata.result
new file mode 100644
index 00000000..917157fc
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_bitdata.result
@@ -0,0 +1,3 @@
+
+NOT YET IMPLEMENTED: bitdata tests
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_cursors.result b/mysql-test/suite/funcs_1/r/innodb_cursors.result
new file mode 100644
index 00000000..9f20e512
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_cursors.result
@@ -0,0 +1,3 @@
+
+NOT YET IMPLEMENTED: cursor tests
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result
new file mode 100644
index 00000000..b603d36f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result
@@ -0,0 +1,5264 @@
+SET timestamp=unix_timestamp('2001-02-03 10:20:30');
+DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1_values
+(
+id BIGINT AUTO_INCREMENT,
+select_id BIGINT,
+PRIMARY KEY(id)
+) ENGINE = <engine_to_be_tested>;
+ALTER TABLE t1_values ADD my_char_30 CHAR(30);
+ALTER TABLE t1_values ADD my_varchar_1000 VARCHAR(1000);
+ALTER TABLE t1_values ADD my_binary_30 BINARY(30);
+ALTER TABLE t1_values ADD my_varbinary_1000 VARBINARY(1000);
+ALTER TABLE t1_values ADD my_datetime DATETIME;
+ALTER TABLE t1_values ADD my_date DATE;
+ALTER TABLE t1_values ADD ts_dummy TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
+ALTER TABLE t1_values ADD my_timestamp TIMESTAMP NOT NULL DEFAULT '2001-01-01 10:20:30';
+ALTER TABLE t1_values ADD my_time TIME;
+ALTER TABLE t1_values ADD my_year YEAR;
+ALTER TABLE t1_values ADD my_bigint BIGINT;
+ALTER TABLE t1_values ADD my_double DOUBLE;
+ALTER TABLE t1_values ADD my_decimal DECIMAL(64,30);
+SET sql_mode = 'traditional';
+INSERT INTO t1_values SET id = 0;
+INSERT INTO t1_values SET
+my_char_30 = '',
+my_varchar_1000 = '',
+my_binary_30 = '',
+my_varbinary_1000 = '',
+my_datetime = '0001-01-01 00:00:00',
+my_date = '0001-01-01',
+my_timestamp = '1970-01-01 14:00:01',
+my_time = '-838:59:59',
+my_year = '1901',
+my_bigint = -9223372036854775808,
+my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 ,
+my_double = -1.7976931348623E+308;
+INSERT INTO t1_values SET
+my_char_30 = '<--------30 characters------->',
+my_varchar_1000 = CONCAT('<---------1000 characters',
+RPAD('',965,'-'),'--------->'),
+my_binary_30 = '<--------30 characters------->',
+my_varbinary_1000 = CONCAT('<---------1000 characters',
+RPAD('',965,'-'),'--------->'),
+my_datetime = '9999-12-31 23:59:59',
+my_date = '9999-12-31',
+my_timestamp = '2038-01-01 02:59:59',
+my_time = '838:59:59',
+my_year = 2155,
+my_bigint = 9223372036854775807,
+my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 ,
+my_double = 1.7976931348623E+308;
+INSERT INTO t1_values SET
+my_char_30 = ' ---äÖüß@µ*$-- ',
+my_varchar_1000 = ' ---äÖüß@µ*$-- ',
+my_binary_30 = ' ---äÖüß@µ*$-- ',
+my_varbinary_1000 = ' ---äÖüß@µ*$-- ',
+my_datetime = '2004-02-29 23:59:59',
+my_date = '2004-02-29',
+my_timestamp = '2004-02-29 23:59:59',
+my_time = '13:00:00',
+my_year = 2000,
+my_bigint = 0,
+my_decimal = 0.0,
+my_double = 0;
+INSERT INTO t1_values SET
+my_char_30 = '-1',
+my_varchar_1000 = '-1',
+my_binary_30 = '-1',
+my_varbinary_1000 = '-1',
+my_datetime = '2005-06-28 10:00:00',
+my_date = '2005-06-28',
+my_timestamp = '2005-06-28 10:00:00',
+my_time = '10:00:00',
+my_year = 2005,
+my_bigint = -1,
+my_decimal = -1.000000000000000000000000000000,
+my_double = -0.1E+1;
+PREPARE ins_sel_with_result FROM "INSERT INTO t1_selects SET my_select = @my_select,
+disable_result = 'No'" ;
+PREPARE ins_sel_no_result FROM "INSERT INTO t1_selects SET my_select = @my_select,
+disable_result = 'Yes'" ;
+SET sql_mode = 'traditional';
+SET @my_select = 'SELECT sqrt(my_bigint), my_bigint, id FROM t1_values';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 4;
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = -25;
+##### 1.1.1. CAST --> BINARY
+##### 1.1.2. CAST --> CHAR
+##### 1.1.3. CAST --> DATE
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 20050627;
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = +20.050627E+6;
+##### 1.1.4. CAST --> DATETIME
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 200506271758;
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = +0.0200506271758E+13;
+##### 1.1.5. CAST --> TIME
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 1758;
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = +1.758E+3;
+##### 1.1.6. CAST --> DECIMAL
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = -0.33333333E+4;
+##### 1.1.7. CAST --> SIGNED INTEGER
+
+"Attention: CAST --> SIGNED INTEGER
+ Bug#5913 Traditional mode: BIGINT range not correctly delimited
+ Status: To be fixed later"
+--------------------------------------------------------------------------------
+##### 1.1.8. CAST --> UNSIGNED INTEGER
+
+"Attention: CAST --> UNSIGNED INTEGER
+ The file with expected results suffers from Bug 5913"
+--------------------------------------------------------------------------------
+
+some statements disabled because of
+Bug#5913 Traditional mode: BIGINT range not correctly delimited
+--------------------------------------------------------------------------------
+SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT INSTR(my_char_30, ''char''),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LCASE(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt'')
+ AS my_col,
+ id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_char_30 ),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_varchar_1000 ),
+my_char_30, my_varchar_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_binary_30 ),
+my_char_30, my_binary_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_varbinary_1000 ),
+my_char_30, my_varbinary_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_char_30 ),
+my_varchar_1000, my_char_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_binary_30 ),
+my_varchar_1000, my_binary_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
+my_varchar_1000, my_varbinary_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_binary_30 ),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_char_30 ),
+my_binary_30, my_char_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_varchar_1000 ),
+my_binary_30, my_varchar_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
+my_binary_30, my_varbinary_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_char_30 ),
+my_varbinary_1000, my_char_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
+my_varbinary_1000, my_varchar_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
+my_varbinary_1000, my_binary_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_char_30, 3),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_varchar_1000, 3),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_binary_30, 3),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_varbinary_1000, 3),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_bigint),
+my_bigint, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_double),
+my_double, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_decimal),
+my_decimal, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select =
+'SELECT CONCAT(''A'',my_char_30), my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT my_char_30, id FROM t1_values';
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = 'Viana do Castelo';
+SET sql_mode = '';
+
+"# The basic preparations end and the main test starts here"
+--------------------------------------------------------------------------------
+CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values;
+SELECT my_char_30, id FROM t1_values
+WHERE select_id = 193 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 193 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values;
+SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values
+WHERE select_id = 192 OR select_id IS NULL order by id;
+CONCAT('A',my_char_30) my_char_30 id
+NULL NULL 1
+A 2
+A<--------30 characters-------> <--------30 characters-------> 3
+A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+A-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 192 OR select_id IS NULL) order by id;
+CONCAT('A',my_char_30) my_char_30 id
+NULL NULL 1
+A 2
+A<--------30 characters-------> <--------30 characters-------> 3
+A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+A-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LTRIM(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 191 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 191 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LTRIM(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 190 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 190 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LTRIM(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 189 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 189 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LTRIM(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 188 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 188 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOWER(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 187 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 187 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LOWER(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 186 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 186 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LOWER(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 185 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 185 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LOWER(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 184 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 184 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_decimal),
+my_decimal, id FROM t1_values;
+SELECT LOCATE('-', ' - -ABC', my_decimal),
+my_decimal, id FROM t1_values
+WHERE select_id = 183 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 183 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_double),
+my_double, id FROM t1_values;
+SELECT LOCATE('-', ' - -ABC', my_double),
+my_double, id FROM t1_values
+WHERE select_id = 182 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 182 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_bigint),
+my_bigint, id FROM t1_values;
+SELECT LOCATE('-', ' - -ABC', my_bigint),
+my_bigint, id FROM t1_values
+WHERE select_id = 181 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 181 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_varbinary_1000, 3),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOCATE('-', my_varbinary_1000, 3),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 180 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 180 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_binary_30, 3),
+my_binary_30, id FROM t1_values;
+SELECT LOCATE('-', my_binary_30, 3),
+my_binary_30, id FROM t1_values
+WHERE select_id = 179 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 179 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_varchar_1000, 3),
+my_varchar_1000, id FROM t1_values;
+SELECT LOCATE('-', my_varchar_1000, 3),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 178 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 178 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_char_30, 3),
+my_char_30, id FROM t1_values;
+SELECT LOCATE('-', my_char_30, 3),
+my_char_30, id FROM t1_values
+WHERE select_id = 177 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 177 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
+my_varbinary_1000, my_binary_30 id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
+my_varbinary_1000, my_binary_30 id FROM t1_values
+WHERE select_id = 176 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 176 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
+my_varbinary_1000, my_varchar_1000 id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
+my_varbinary_1000, my_varchar_1000 id FROM t1_values
+WHERE select_id = 175 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 175 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_char_30 ),
+my_varbinary_1000, my_char_30 id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_char_30 ),
+my_varbinary_1000, my_char_30 id FROM t1_values
+WHERE select_id = 174 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 174 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 173 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 173 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
+my_binary_30, my_varbinary_1000 id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
+my_binary_30, my_varbinary_1000 id FROM t1_values
+WHERE select_id = 172 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 172 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varchar_1000 ),
+my_binary_30, my_varchar_1000 id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_varchar_1000 ),
+my_binary_30, my_varchar_1000 id FROM t1_values
+WHERE select_id = 171 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 171 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_char_30 ),
+my_binary_30, my_char_30 id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_char_30 ),
+my_binary_30, my_char_30 id FROM t1_values
+WHERE select_id = 170 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 170 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_binary_30 ),
+my_binary_30, id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_binary_30 ),
+my_binary_30, id FROM t1_values
+WHERE select_id = 169 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 169 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
+my_varchar_1000, my_varbinary_1000 id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
+my_varchar_1000, my_varbinary_1000 id FROM t1_values
+WHERE select_id = 168 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 168 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_binary_30 ),
+my_varchar_1000, my_binary_30 id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_binary_30 ),
+my_varchar_1000, my_binary_30 id FROM t1_values
+WHERE select_id = 167 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 167 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_char_30 ),
+my_varchar_1000, my_char_30 id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_char_30 ),
+my_varchar_1000, my_char_30 id FROM t1_values
+WHERE select_id = 166 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 166 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
+my_varchar_1000, id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 165 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 165 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varbinary_1000 ),
+my_char_30, my_varbinary_1000 id FROM t1_values;
+SELECT LOCATE(my_char_30, my_varbinary_1000 ),
+my_char_30, my_varbinary_1000 id FROM t1_values
+WHERE select_id = 164 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 164 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_binary_30 ),
+my_char_30, my_binary_30 id FROM t1_values;
+SELECT LOCATE(my_char_30, my_binary_30 ),
+my_char_30, my_binary_30 id FROM t1_values
+WHERE select_id = 163 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 163 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varchar_1000 ),
+my_char_30, my_varchar_1000 id FROM t1_values;
+SELECT LOCATE(my_char_30, my_varchar_1000 ),
+my_char_30, my_varchar_1000 id FROM t1_values
+WHERE select_id = 162 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 162 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_char_30 ),
+my_char_30, id FROM t1_values;
+SELECT LOCATE(my_char_30, my_char_30 ),
+my_char_30, id FROM t1_values
+WHERE select_id = 161 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 161 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOCATE('char', my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 160 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 160 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LOCATE('char', my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 159 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 159 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LOCATE('char', my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 158 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 158 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LOCATE('char', my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 157 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 157 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt')
+ AS my_col,
+ id FROM t1_values;
+SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt')
+ AS my_col,
+ id FROM t1_values
+WHERE select_id = 156 OR select_id IS NULL order by id;
+my_col id
+Here is content from load_file
+ 1
+Here is content from load_file
+ 2
+Here is content from load_file
+ 3
+Here is content from load_file
+ 4
+Here is content from load_file
+ 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 156 OR select_id IS NULL) order by id;
+my_col id
+Here is content from load_file
+ 1
+Here is content from load_file
+ 2
+Here is content from load_file
+ 3
+Here is content from load_file
+ 4
+Here is content from load_file
+ 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 155 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 155 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 154 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 154 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 153 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 153 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LENGTH(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 152 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 152 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values;
+SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values
+WHERE select_id = 151 OR select_id IS NULL order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id
+NULL NULL 1
+ -1.7976931348623e308 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
+ 0 4
+ -1 5
+Warnings:
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 151 OR select_id IS NULL) order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id
+NULL NULL 1
+ -1.7976931348623e308 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
+ 0 4
+ -1 5
+Warnings:
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values;
+SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values
+WHERE select_id = 150 OR select_id IS NULL order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id
+NULL NULL 1
+ -9999999999999999999999999999999999.999999999999999999999999999999 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3
+ 0.000000000000000000000000000000 4
+ -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 150 OR select_id IS NULL) order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id
+NULL NULL 1
+ -9999999999999999999999999999999999.999999999999999999999999999999 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3
+ 0.000000000000000000000000000000 4
+ -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values;
+SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values
+WHERE select_id = 149 OR select_id IS NULL order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id
+NULL NULL 1
+ -9223372036854775808 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3
+ 0 4
+ -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 149 OR select_id IS NULL) order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id
+NULL NULL 1
+ -9223372036854775808 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3
+ 0 4
+ -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values;
+SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values
+WHERE select_id = 148 OR select_id IS NULL order by id;
+LEFT(my_varbinary_1000, 2) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 148 OR select_id IS NULL) order by id;
+LEFT(my_varbinary_1000, 2) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values;
+SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values
+WHERE select_id = 147 OR select_id IS NULL order by id;
+LEFT(my_binary_30, 2) my_binary_30 id
+NULL NULL 1
+ 2
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 147 OR select_id IS NULL) order by id;
+LEFT(my_binary_30, 2) my_binary_30 id
+NULL NULL 1
+
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$--
+-1 -1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values;
+SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values
+WHERE select_id = 146 OR select_id IS NULL order by id;
+LEFT(my_varchar_1000, 2) my_varchar_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 146 OR select_id IS NULL) order by id;
+LEFT(my_varchar_1000, 2) my_varchar_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values;
+SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values
+WHERE select_id = 145 OR select_id IS NULL order by id;
+LEFT(my_char_30, 2) my_char_30 id
+NULL NULL 1
+ 2
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 145 OR select_id IS NULL) order by id;
+LEFT(my_char_30, 2) my_char_30 id
+NULL NULL 1
+ 2
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LCASE(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LCASE(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 144 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 144 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT INSTR(my_char_30, 'char'),
+my_char_30, id FROM t1_values;
+SELECT INSTR(my_char_30, 'char'),
+my_char_30, id FROM t1_values
+WHERE select_id = 143 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 143 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT BIT_LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 142 OR select_id IS NULL order by id;
+BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 142 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT BIT_LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 141 OR select_id IS NULL order by id;
+BIT_LENGTH(my_binary_30) my_binary_30 id
+NULL NULL 1
+240 2
+240 <--------30 characters-------> 3
+240 ---äÖüß@µ*$-- 4
+240 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 141 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_binary_30) my_binary_30 id
+NULL NULL 1
+240
+240 <--------30 characters-------> 3
+240 ---äÖüß@µ*$--
+240 -1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT BIT_LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 140 OR select_id IS NULL order by id;
+BIT_LENGTH(my_varchar_1000) my_varchar_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 140 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_varchar_1000) my_varchar_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT BIT_LENGTH(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 139 OR select_id IS NULL order by id;
+BIT_LENGTH(my_char_30) my_char_30 id
+NULL NULL 1
+0 2
+240 <--------30 characters-------> 3
+152 ---äÖüß@µ*$-- 4
+16 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 139 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_char_30) my_char_30 id
+NULL NULL 1
+0 2
+240 <--------30 characters-------> 3
+152 ---äÖüß@µ*$-- 4
+16 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_year,'IS_NULL'),
+my_year, id FROM t1_values;
+SELECT IFNULL(my_year,'IS_NULL'),
+my_year, id FROM t1_values
+WHERE select_id = 138 OR select_id IS NULL order by id;
+IFNULL(my_year,'IS_NULL') my_year id
+IS_NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 138 OR select_id IS NULL) order by id;
+IFNULL(my_year,'IS_NULL') my_year id
+IS_NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_time,'IS_NULL'),
+my_time, id FROM t1_values;
+SELECT IFNULL(my_time,'IS_NULL'),
+my_time, id FROM t1_values
+WHERE select_id = 137 OR select_id IS NULL order by id;
+IFNULL(my_time,'IS_NULL') my_time id
+IS_NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 137 OR select_id IS NULL) order by id;
+IFNULL(my_time,'IS_NULL') my_time id
+IS_NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_timestamp,'IS_NULL'),
+my_timestamp, id FROM t1_values;
+SELECT IFNULL(my_timestamp,'IS_NULL'),
+my_timestamp, id FROM t1_values
+WHERE select_id = 136 OR select_id IS NULL order by id;
+IFNULL(my_timestamp,'IS_NULL') my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 136 OR select_id IS NULL) order by id;
+IFNULL(my_timestamp,'IS_NULL') my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_date,'IS_NULL'),
+my_date, id FROM t1_values;
+SELECT IFNULL(my_date,'IS_NULL'),
+my_date, id FROM t1_values
+WHERE select_id = 135 OR select_id IS NULL order by id;
+IFNULL(my_date,'IS_NULL') my_date id
+IS_NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 135 OR select_id IS NULL) order by id;
+IFNULL(my_date,'IS_NULL') my_date id
+IS_NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_datetime,'IS_NULL'),
+my_datetime, id FROM t1_values;
+SELECT IFNULL(my_datetime,'IS_NULL'),
+my_datetime, id FROM t1_values
+WHERE select_id = 134 OR select_id IS NULL order by id;
+IFNULL(my_datetime,'IS_NULL') my_datetime id
+IS_NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 134 OR select_id IS NULL) order by id;
+IFNULL(my_datetime,'IS_NULL') my_datetime id
+IS_NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_double,'IS_NULL'),
+my_double, id FROM t1_values;
+SELECT IFNULL(my_double,'IS_NULL'),
+my_double, id FROM t1_values
+WHERE select_id = 133 OR select_id IS NULL order by id;
+IFNULL(my_double,'IS_NULL') my_double id
+IS_NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 133 OR select_id IS NULL) order by id;
+IFNULL(my_double,'IS_NULL') my_double id
+IS_NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_decimal,'IS_NULL'),
+my_decimal, id FROM t1_values;
+SELECT IFNULL(my_decimal,'IS_NULL'),
+my_decimal, id FROM t1_values
+WHERE select_id = 132 OR select_id IS NULL order by id;
+IFNULL(my_decimal,'IS_NULL') my_decimal id
+IS_NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 132 OR select_id IS NULL) order by id;
+IFNULL(my_decimal,'IS_NULL') my_decimal id
+IS_NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_bigint,'IS_NULL'),
+my_bigint, id FROM t1_values;
+SELECT IFNULL(my_bigint,'IS_NULL'),
+my_bigint, id FROM t1_values
+WHERE select_id = 131 OR select_id IS NULL order by id;
+IFNULL(my_bigint,'IS_NULL') my_bigint id
+IS_NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 131 OR select_id IS NULL) order by id;
+IFNULL(my_bigint,'IS_NULL') my_bigint id
+IS_NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_varbinary_1000,'IS_NULL'),
+my_varbinary_1000, id FROM t1_values;
+SELECT IFNULL(my_varbinary_1000,'IS_NULL'),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 130 OR select_id IS NULL order by id;
+IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 130 OR select_id IS NULL) order by id;
+IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_binary_30,'IS_NULL'),
+my_binary_30, id FROM t1_values;
+SELECT IFNULL(my_binary_30,'IS_NULL'),
+my_binary_30, id FROM t1_values
+WHERE select_id = 129 OR select_id IS NULL order by id;
+IFNULL(my_binary_30,'IS_NULL') my_binary_30 id
+IS_NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 129 OR select_id IS NULL) order by id;
+IFNULL(my_binary_30,'IS_NULL') my_binary_30 id
+IS_NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_varchar_1000,'IS_NULL'),
+my_varchar_1000, id FROM t1_values;
+SELECT IFNULL(my_varchar_1000,'IS_NULL'),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 128 OR select_id IS NULL order by id;
+IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 128 OR select_id IS NULL) order by id;
+IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_char_30,'IS_NULL'),
+my_char_30, id FROM t1_values;
+SELECT IFNULL(my_char_30,'IS_NULL'),
+my_char_30, id FROM t1_values
+WHERE select_id = 127 OR select_id IS NULL order by id;
+IFNULL(my_char_30,'IS_NULL') my_char_30 id
+IS_NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 127 OR select_id IS NULL) order by id;
+IFNULL(my_char_30,'IS_NULL') my_char_30 id
+IS_NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL'), my_year, id FROM t1_values;
+SELECT IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL'), my_year, id FROM t1_values
+WHERE select_id = 126 OR select_id IS NULL order by id;
+IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL') my_year id
+IS NULL NULL 1
+IS NOT NULL 1901 2
+IS NOT NULL 2155 3
+IS NOT NULL 2000 4
+IS NOT NULL 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year` is null,'IS NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 126 OR select_id IS NULL) order by id;
+IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL') my_year id
+IS NULL NULL 1
+IS NOT NULL 1901 2
+IS NOT NULL 2155 3
+IS NOT NULL 2000 4
+IS NOT NULL 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL'), my_time, id FROM t1_values;
+SELECT IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL'), my_time, id FROM t1_values
+WHERE select_id = 125 OR select_id IS NULL order by id;
+IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL') my_time id
+IS NULL NULL 1
+IS NOT NULL -838:59:59 2
+IS NOT NULL 838:59:59 3
+IS NOT NULL 13:00:00 4
+IS NOT NULL 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time` is null,'IS NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 125 OR select_id IS NULL) order by id;
+IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL') my_time id
+IS NULL NULL 1
+IS NOT NULL -838:59:59 2
+IS NOT NULL 838:59:59 3
+IS NOT NULL 13:00:00 4
+IS NOT NULL 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL'), my_timestamp, id FROM t1_values;
+SELECT IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL'), my_timestamp, id FROM t1_values
+WHERE select_id = 124 OR select_id IS NULL order by id;
+IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL') my_timestamp id
+IS NOT NULL 2001-01-01 10:20:30 1
+IS NOT NULL 1970-01-01 14:00:01 2
+IS NOT NULL 2038-01-01 02:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp` is null,'IS NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 124 OR select_id IS NULL) order by id;
+IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL') my_timestamp id
+IS NOT NULL 2001-01-01 10:20:30 1
+IS NOT NULL 1970-01-01 14:00:01 2
+IS NOT NULL 2038-01-01 02:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL'), my_date, id FROM t1_values;
+SELECT IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL'), my_date, id FROM t1_values
+WHERE select_id = 123 OR select_id IS NULL order by id;
+IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL') my_date id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 2
+IS NOT NULL 9999-12-31 3
+IS NOT NULL 2004-02-29 4
+IS NOT NULL 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date` is null,'IS NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 123 OR select_id IS NULL) order by id;
+IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL') my_date id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 2
+IS NOT NULL 9999-12-31 3
+IS NOT NULL 2004-02-29 4
+IS NOT NULL 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL'), my_datetime, id FROM t1_values;
+SELECT IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL'), my_datetime, id FROM t1_values
+WHERE select_id = 122 OR select_id IS NULL order by id;
+IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL') my_datetime id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 00:00:00 2
+IS NOT NULL 9999-12-31 23:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime` is null,'IS NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 122 OR select_id IS NULL) order by id;
+IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL') my_datetime id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 00:00:00 2
+IS NOT NULL 9999-12-31 23:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL'), my_double, id FROM t1_values;
+SELECT IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL'), my_double, id FROM t1_values
+WHERE select_id = 121 OR select_id IS NULL order by id;
+IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL') my_double id
+IS NULL NULL 1
+IS NOT NULL -1.7976931348623e308 2
+IS NOT NULL 1.7976931348623e308 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double` is null,'IS NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 121 OR select_id IS NULL) order by id;
+IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL') my_double id
+IS NULL NULL 1
+IS NOT NULL -1.7976931348623e308 2
+IS NOT NULL 1.7976931348623e308 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL'), my_decimal, id FROM t1_values;
+SELECT IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL'), my_decimal, id FROM t1_values
+WHERE select_id = 120 OR select_id IS NULL order by id;
+IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL') my_decimal id
+IS NULL NULL 1
+IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT NULL 0.000000000000000000000000000000 4
+IS NOT NULL -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal` is null,'IS NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 120 OR select_id IS NULL) order by id;
+IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL') my_decimal id
+IS NULL NULL 1
+IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT NULL 0.000000000000000000000000000000 4
+IS NOT NULL -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL'), my_bigint, id FROM t1_values;
+SELECT IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL'), my_bigint, id FROM t1_values
+WHERE select_id = 119 OR select_id IS NULL order by id;
+IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL') my_bigint id
+IS NULL NULL 1
+IS NOT NULL -9223372036854775808 2
+IS NOT NULL 9223372036854775807 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint` is null,'IS NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 119 OR select_id IS NULL) order by id;
+IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL') my_bigint id
+IS NULL NULL 1
+IS NOT NULL -9223372036854775808 2
+IS NOT NULL 9223372036854775807 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varbinary_1000, id FROM t1_values;
+SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varbinary_1000, id FROM t1_values
+WHERE select_id = 118 OR select_id IS NULL order by id;
+IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varbinary_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000` is null,'IS NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 118 OR select_id IS NULL) order by id;
+IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varbinary_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_binary_30, id FROM t1_values;
+SELECT IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_binary_30, id FROM t1_values
+WHERE select_id = 117 OR select_id IS NULL order by id;
+IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_binary_30 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30` is null,'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 117 OR select_id IS NULL) order by id;
+IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_binary_30 id
+IS NULL NULL 1
+IS NOT NULL
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$--
+IS NOT NULL -1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varchar_1000, id FROM t1_values;
+SELECT IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varchar_1000, id FROM t1_values
+WHERE select_id = 116 OR select_id IS NULL order by id;
+IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varchar_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000` is null,'IS NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 116 OR select_id IS NULL) order by id;
+IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varchar_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_char_30, id FROM t1_values;
+SELECT IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_char_30, id FROM t1_values
+WHERE select_id = 115 OR select_id IS NULL order by id;
+IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_char_30 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30` is null,'IS NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 115 OR select_id IS NULL) order by id;
+IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_char_30 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'),
+my_year, id FROM t1_values;
+SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'),
+my_year, id FROM t1_values
+WHERE select_id = 114 OR select_id IS NULL order by id;
+IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id
+IS NOT TRUE NULL 1
+IS TRUE 1901 2
+IS TRUE 2155 3
+IS TRUE 2000 4
+IS TRUE 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,'IS TRUE','IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 114 OR select_id IS NULL) order by id;
+IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id
+IS NOT TRUE NULL 1
+IS TRUE 1901 2
+IS TRUE 2155 3
+IS TRUE 2000 4
+IS TRUE 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'),
+my_time, id FROM t1_values;
+SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'),
+my_time, id FROM t1_values
+WHERE select_id = 113 OR select_id IS NULL order by id;
+IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id
+IS NOT TRUE NULL 1
+IS TRUE -838:59:59 2
+IS TRUE 838:59:59 3
+IS TRUE 13:00:00 4
+IS TRUE 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,'IS TRUE','IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 113 OR select_id IS NULL) order by id;
+IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id
+IS NOT TRUE NULL 1
+IS TRUE -838:59:59 2
+IS TRUE 838:59:59 3
+IS TRUE 13:00:00 4
+IS TRUE 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'),
+my_timestamp, id FROM t1_values;
+SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'),
+my_timestamp, id FROM t1_values
+WHERE select_id = 112 OR select_id IS NULL order by id;
+IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id
+IS TRUE 2001-01-01 10:20:30 1
+IS TRUE 1970-01-01 14:00:01 2
+IS TRUE 2038-01-01 02:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,'IS TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 112 OR select_id IS NULL) order by id;
+IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id
+IS TRUE 2001-01-01 10:20:30 1
+IS TRUE 1970-01-01 14:00:01 2
+IS TRUE 2038-01-01 02:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'),
+my_date, id FROM t1_values;
+SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'),
+my_date, id FROM t1_values
+WHERE select_id = 111 OR select_id IS NULL order by id;
+IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 2
+IS TRUE 9999-12-31 3
+IS TRUE 2004-02-29 4
+IS TRUE 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,'IS TRUE','IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 111 OR select_id IS NULL) order by id;
+IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 2
+IS TRUE 9999-12-31 3
+IS TRUE 2004-02-29 4
+IS TRUE 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'),
+my_datetime, id FROM t1_values;
+SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'),
+my_datetime, id FROM t1_values
+WHERE select_id = 110 OR select_id IS NULL order by id;
+IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 00:00:00 2
+IS TRUE 9999-12-31 23:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,'IS TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 110 OR select_id IS NULL) order by id;
+IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 00:00:00 2
+IS TRUE 9999-12-31 23:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'),
+my_double, id FROM t1_values;
+SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'),
+my_double, id FROM t1_values
+WHERE select_id = 109 OR select_id IS NULL order by id;
+IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id
+IS NOT TRUE NULL 1
+IS TRUE -1.7976931348623e308 2
+IS TRUE 1.7976931348623e308 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,'IS TRUE','IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 109 OR select_id IS NULL) order by id;
+IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id
+IS NOT TRUE NULL 1
+IS TRUE -1.7976931348623e308 2
+IS TRUE 1.7976931348623e308 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'),
+my_decimal, id FROM t1_values;
+SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'),
+my_decimal, id FROM t1_values
+WHERE select_id = 108 OR select_id IS NULL order by id;
+IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id
+IS NOT TRUE NULL 1
+IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT TRUE 0.000000000000000000000000000000 4
+IS TRUE -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,'IS TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 108 OR select_id IS NULL) order by id;
+IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id
+IS NOT TRUE NULL 1
+IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT TRUE 0.000000000000000000000000000000 4
+IS TRUE -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'),
+my_bigint, id FROM t1_values;
+SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'),
+my_bigint, id FROM t1_values
+WHERE select_id = 107 OR select_id IS NULL order by id;
+IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id
+IS NOT TRUE NULL 1
+IS TRUE -9223372036854775808 2
+IS TRUE 9223372036854775807 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,'IS TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 107 OR select_id IS NULL) order by id;
+IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id
+IS NOT TRUE NULL 1
+IS TRUE -9223372036854775808 2
+IS TRUE 9223372036854775807 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varbinary_1000, id FROM t1_values;
+SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 106 OR select_id IS NULL order by id;
+IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 106 OR select_id IS NULL) order by id;
+IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'),
+my_binary_30, id FROM t1_values;
+SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'),
+my_binary_30, id FROM t1_values
+WHERE select_id = 105 OR select_id IS NULL order by id;
+IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 105 OR select_id IS NULL) order by id;
+IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$--
+IS TRUE -1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varchar_1000, id FROM t1_values;
+SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 104 OR select_id IS NULL order by id;
+IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 104 OR select_id IS NULL) order by id;
+IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'),
+my_char_30, id FROM t1_values;
+SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'),
+my_char_30, id FROM t1_values
+WHERE select_id = 103 OR select_id IS NULL order by id;
+IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ' '
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 103 OR select_id IS NULL) order by id;
+IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ' '
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r),
+my_varbinary_1000, id FROM t1_values;
+SELECT CONVERT(my_varbinary_1000 USING koi8r),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 102 OR select_id IS NULL order by id;
+CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---???????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 102 OR select_id IS NULL) order by id;
+CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---???????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r),
+my_binary_30, id FROM t1_values;
+SELECT CONVERT(my_binary_30 USING koi8r),
+my_binary_30, id FROM t1_values
+WHERE select_id = 101 OR select_id IS NULL order by id;
+CONVERT(my_binary_30 USING koi8r) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---???????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 101 OR select_id IS NULL) order by id;
+CONVERT(my_binary_30 USING koi8r) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---???????@??*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r),
+my_varchar_1000, id FROM t1_values;
+SELECT CONVERT(my_varchar_1000 USING koi8r),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 100 OR select_id IS NULL order by id;
+CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 100 OR select_id IS NULL) order by id;
+CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r),
+my_char_30, id FROM t1_values;
+SELECT CONVERT(my_char_30 USING koi8r),
+my_char_30, id FROM t1_values
+WHERE select_id = 99 OR select_id IS NULL order by id;
+CONVERT(my_char_30 USING koi8r) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 99 OR select_id IS NULL) order by id;
+CONVERT(my_char_30 USING koi8r) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8),
+my_varbinary_1000, id FROM t1_values;
+SELECT CONVERT(my_varbinary_1000 USING utf8),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 98 OR select_id IS NULL order by id;
+CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---@*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8mb3) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 98 OR select_id IS NULL) order by id;
+CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---@*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8),
+my_binary_30, id FROM t1_values;
+SELECT CONVERT(my_binary_30 USING utf8),
+my_binary_30, id FROM t1_values
+WHERE select_id = 97 OR select_id IS NULL order by id;
+CONVERT(my_binary_30 USING utf8) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---@*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8mb3) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 97 OR select_id IS NULL) order by id;
+CONVERT(my_binary_30 USING utf8) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---@*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8),
+my_varchar_1000, id FROM t1_values;
+SELECT CONVERT(my_varchar_1000 USING utf8),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 96 OR select_id IS NULL order by id;
+CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8mb3) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 96 OR select_id IS NULL) order by id;
+CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8),
+my_char_30, id FROM t1_values;
+SELECT CONVERT(my_char_30 USING utf8),
+my_char_30, id FROM t1_values
+WHERE select_id = 95 OR select_id IS NULL order by id;
+CONVERT(my_char_30 USING utf8) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8mb3) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 95 OR select_id IS NULL) order by id;
+CONVERT(my_char_30 USING utf8) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS UNSIGNED INTEGER),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS UNSIGNED INTEGER),
+my_year, id FROM t1_values
+WHERE select_id = 94 OR select_id IS NULL order by id;
+CAST(my_year AS UNSIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 94 OR select_id IS NULL) order by id;
+CAST(my_year AS UNSIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS UNSIGNED INTEGER),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS UNSIGNED INTEGER),
+my_time, id FROM t1_values
+WHERE select_id = 93 OR select_id IS NULL order by id;
+CAST(my_time AS UNSIGNED INTEGER) my_time id
+NULL NULL 1
+0 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+Warnings:
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 93 OR select_id IS NULL) order by id;
+CAST(my_time AS UNSIGNED INTEGER) my_time id
+NULL NULL 1
+0 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+Warnings:
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS UNSIGNED INTEGER),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS UNSIGNED INTEGER),
+my_timestamp, id FROM t1_values
+WHERE select_id = 92 OR select_id IS NULL order by id;
+CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 92 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS UNSIGNED INTEGER),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS UNSIGNED INTEGER),
+my_date, id FROM t1_values
+WHERE select_id = 91 OR select_id IS NULL order by id;
+CAST(my_date AS UNSIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 91 OR select_id IS NULL) order by id;
+CAST(my_date AS UNSIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS UNSIGNED INTEGER),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS UNSIGNED INTEGER),
+my_datetime, id FROM t1_values
+WHERE select_id = 90 OR select_id IS NULL order by id;
+CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 90 OR select_id IS NULL) order by id;
+CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS UNSIGNED INTEGER),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS UNSIGNED INTEGER),
+my_double, id FROM t1_values
+WHERE select_id = 89 OR select_id IS NULL order by id;
+CAST(my_double AS UNSIGNED INTEGER) my_double id
+NULL NULL 1
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
+0 0 4
+0 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 89 OR select_id IS NULL) order by id;
+CAST(my_double AS UNSIGNED INTEGER) my_double id
+NULL NULL 1
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
+0 0 4
+0 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS UNSIGNED INTEGER),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS UNSIGNED INTEGER),
+my_decimal, id FROM t1_values
+WHERE select_id = 88 OR select_id IS NULL order by id;
+CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id
+NULL NULL 1
+0 -9999999999999999999999999999999999.999999999999999999999999999999 2
+18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+0 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '-1.000000000000000000000000000000' to UNSIGNED INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 88 OR select_id IS NULL) order by id;
+CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id
+NULL NULL 1
+0 -9999999999999999999999999999999999.999999999999999999999999999999 2
+18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+0 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '-1.000000000000000000000000000000' to UNSIGNED INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS UNSIGNED INTEGER),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS UNSIGNED INTEGER),
+my_bigint, id FROM t1_values
+WHERE select_id = 87 OR select_id IS NULL order by id;
+CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id
+NULL NULL 1
+9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+18446744073709551615 -1 5
+Warnings:
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 87 OR select_id IS NULL) order by id;
+CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id
+NULL NULL 1
+9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+18446744073709551615 -1 5
+Warnings:
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 86 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 86 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS UNSIGNED INTEGER),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS UNSIGNED INTEGER),
+my_binary_30, id FROM t1_values
+WHERE select_id = 85 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 85 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$--
+18446744073709551615 -1
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 84 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 84 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS UNSIGNED INTEGER),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS UNSIGNED INTEGER),
+my_char_30, id FROM t1_values
+WHERE select_id = 83 OR select_id IS NULL order by id;
+CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 83 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS SIGNED INTEGER),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS SIGNED INTEGER),
+my_year, id FROM t1_values
+WHERE select_id = 82 OR select_id IS NULL order by id;
+CAST(my_year AS SIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 82 OR select_id IS NULL) order by id;
+CAST(my_year AS SIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS SIGNED INTEGER),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS SIGNED INTEGER),
+my_time, id FROM t1_values
+WHERE select_id = 81 OR select_id IS NULL order by id;
+CAST(my_time AS SIGNED INTEGER) my_time id
+NULL NULL 1
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 81 OR select_id IS NULL) order by id;
+CAST(my_time AS SIGNED INTEGER) my_time id
+NULL NULL 1
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS SIGNED INTEGER),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS SIGNED INTEGER),
+my_timestamp, id FROM t1_values
+WHERE select_id = 80 OR select_id IS NULL order by id;
+CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 80 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS SIGNED INTEGER),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS SIGNED INTEGER),
+my_date, id FROM t1_values
+WHERE select_id = 79 OR select_id IS NULL order by id;
+CAST(my_date AS SIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 79 OR select_id IS NULL) order by id;
+CAST(my_date AS SIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS SIGNED INTEGER),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS SIGNED INTEGER),
+my_datetime, id FROM t1_values
+WHERE select_id = 78 OR select_id IS NULL order by id;
+CAST(my_datetime AS SIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 78 OR select_id IS NULL) order by id;
+CAST(my_datetime AS SIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS SIGNED INTEGER),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS SIGNED INTEGER),
+my_double, id FROM t1_values
+WHERE select_id = 77 OR select_id IS NULL order by id;
+CAST(my_double AS SIGNED INTEGER) my_double id
+NULL NULL 1
+-9223372036854775808 -1.7976931348623e308 2
+9223372036854775807 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 77 OR select_id IS NULL) order by id;
+CAST(my_double AS SIGNED INTEGER) my_double id
+NULL NULL 1
+-9223372036854775808 -1.7976931348623e308 2
+9223372036854775807 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS SIGNED INTEGER),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS SIGNED INTEGER),
+my_decimal, id FROM t1_values
+WHERE select_id = 76 OR select_id IS NULL order by id;
+CAST(my_decimal AS SIGNED INTEGER) my_decimal id
+NULL NULL 1
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+-1 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 76 OR select_id IS NULL) order by id;
+CAST(my_decimal AS SIGNED INTEGER) my_decimal id
+NULL NULL 1
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+-1 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS SIGNED INTEGER),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS SIGNED INTEGER),
+my_bigint, id FROM t1_values
+WHERE select_id = 75 OR select_id IS NULL order by id;
+CAST(my_bigint AS SIGNED INTEGER) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 75 OR select_id IS NULL) order by id;
+CAST(my_bigint AS SIGNED INTEGER) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 74 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 74 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS SIGNED INTEGER),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS SIGNED INTEGER),
+my_binary_30, id FROM t1_values
+WHERE select_id = 73 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 73 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$--
+-1 -1
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS SIGNED INTEGER),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS SIGNED INTEGER),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 72 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 72 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS SIGNED INTEGER),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS SIGNED INTEGER),
+my_char_30, id FROM t1_values
+WHERE select_id = 71 OR select_id IS NULL order by id;
+CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 71 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS DECIMAL(37,2)),
+my_year, id FROM t1_values
+WHERE select_id = 70 OR select_id IS NULL order by id;
+CAST(my_year AS DECIMAL(37,2)) my_year id
+NULL NULL 1
+1901.00 1901 2
+2155.00 2155 3
+2000.00 2000 4
+2005.00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 70 OR select_id IS NULL) order by id;
+CAST(my_year AS DECIMAL(37,2)) my_year id
+NULL NULL 1
+1901.00 1901 2
+2155.00 2155 3
+2000.00 2000 4
+2005.00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS DECIMAL(37,2)),
+my_time, id FROM t1_values
+WHERE select_id = 69 OR select_id IS NULL order by id;
+CAST(my_time AS DECIMAL(37,2)) my_time id
+NULL NULL 1
+-8385959.00 -838:59:59 2
+8385959.00 838:59:59 3
+130000.00 13:00:00 4
+100000.00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 69 OR select_id IS NULL) order by id;
+CAST(my_time AS DECIMAL(37,2)) my_time id
+NULL NULL 1
+-8385959.00 -838:59:59 2
+8385959.00 838:59:59 3
+130000.00 13:00:00 4
+100000.00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS DECIMAL(37,2)),
+my_timestamp, id FROM t1_values
+WHERE select_id = 68 OR select_id IS NULL order by id;
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
+20010101102030.00 2001-01-01 10:20:30 1
+19700101140001.00 1970-01-01 14:00:01 2
+20380101025959.00 2038-01-01 02:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 68 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
+20010101102030.00 2001-01-01 10:20:30 1
+19700101140001.00 1970-01-01 14:00:01 2
+20380101025959.00 2038-01-01 02:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS DECIMAL(37,2)),
+my_date, id FROM t1_values
+WHERE select_id = 67 OR select_id IS NULL order by id;
+CAST(my_date AS DECIMAL(37,2)) my_date id
+NULL NULL 1
+10101.00 0001-01-01 2
+99991231.00 9999-12-31 3
+20040229.00 2004-02-29 4
+20050628.00 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 67 OR select_id IS NULL) order by id;
+CAST(my_date AS DECIMAL(37,2)) my_date id
+NULL NULL 1
+10101.00 0001-01-01 2
+99991231.00 9999-12-31 3
+20040229.00 2004-02-29 4
+20050628.00 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS DECIMAL(37,2)),
+my_datetime, id FROM t1_values
+WHERE select_id = 66 OR select_id IS NULL order by id;
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
+NULL NULL 1
+10101000000.00 0001-01-01 00:00:00 2
+99991231235959.00 9999-12-31 23:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 66 OR select_id IS NULL) order by id;
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
+NULL NULL 1
+10101000000.00 0001-01-01 00:00:00 2
+99991231235959.00 9999-12-31 23:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS DECIMAL(37,2)),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS DECIMAL(37,2)),
+my_double, id FROM t1_values
+WHERE select_id = 65 OR select_id IS NULL order by id;
+CAST(my_double AS DECIMAL(37,2)) my_double id
+NULL NULL 1
+-99999999999999999999999999999999999.99 -1.7976931348623e308 2
+99999999999999999999999999999999999.99 1.7976931348623e308 3
+0.00 0 4
+-1.00 -1 5
+-3333.33 -3333.3333 30
+Warnings:
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 2
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 3
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 65 OR select_id IS NULL) order by id;
+CAST(my_double AS DECIMAL(37,2)) my_double id
+NULL NULL 1
+-99999999999999999999999999999999999.99 -1.7976931348623e308 2
+99999999999999999999999999999999999.99 1.7976931348623e308 3
+0.00 0 4
+-1.00 -1 5
+-3333.33 -3333.3333 30
+Warnings:
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS DECIMAL(37,2)),
+my_decimal, id FROM t1_values
+WHERE select_id = 64 OR select_id IS NULL order by id;
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
+NULL NULL 1
+-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
+10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.00 0.000000000000000000000000000000 4
+-1.00 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 64 OR select_id IS NULL) order by id;
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
+NULL NULL 1
+-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
+10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.00 0.000000000000000000000000000000 4
+-1.00 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS DECIMAL(37,2)),
+my_bigint, id FROM t1_values
+WHERE select_id = 63 OR select_id IS NULL order by id;
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
+NULL NULL 1
+-9223372036854775808.00 -9223372036854775808 2
+9223372036854775807.00 9223372036854775807 3
+0.00 0 4
+-1.00 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 63 OR select_id IS NULL) order by id;
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
+NULL NULL 1
+-9223372036854775808.00 -9223372036854775808 2
+9223372036854775807.00 9223372036854775807 3
+0.00 0 4
+-1.00 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 62 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 29
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 62 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 29
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
+my_binary_30, id FROM t1_values
+WHERE select_id = 61 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
+NULL NULL 1
+0.00 2
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 28
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 61 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
+NULL NULL 1
+0.00
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$--
+-1.00 -1
+-3333.33 -3333.3333
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 60 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 27
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 60 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 27
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS DECIMAL(37,2)),
+my_char_30, id FROM t1_values
+WHERE select_id = 59 OR select_id IS NULL order by id;
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
+NULL NULL 1
+0.00 2
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 26
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ' '
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 59 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
+NULL NULL 1
+0.00 2
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 26
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ' '
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS TIME),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS TIME),
+my_year, id FROM t1_values
+WHERE select_id = 58 OR select_id IS NULL order by id;
+CAST(my_year AS TIME) my_year id
+NULL NULL 1
+00:00:00 1901 2
+00:00:00 2155 3
+00:00:00 2000 4
+00:00:00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 58 OR select_id IS NULL) order by id;
+CAST(my_year AS TIME) my_year id
+NULL NULL 1
+00:00:00 1901 2
+00:00:00 2155 3
+00:00:00 2000 4
+00:00:00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS TIME),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS TIME),
+my_time, id FROM t1_values
+WHERE select_id = 57 OR select_id IS NULL order by id;
+CAST(my_time AS TIME) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 57 OR select_id IS NULL) order by id;
+CAST(my_time AS TIME) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS TIME),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS TIME),
+my_timestamp, id FROM t1_values
+WHERE select_id = 56 OR select_id IS NULL order by id;
+CAST(my_timestamp AS TIME) my_timestamp id
+10:20:30 2001-01-01 10:20:30 1
+14:00:01 1970-01-01 14:00:01 2
+02:59:59 2038-01-01 02:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 56 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS TIME) my_timestamp id
+10:20:30 2001-01-01 10:20:30 1
+14:00:01 1970-01-01 14:00:01 2
+02:59:59 2038-01-01 02:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS TIME),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS TIME),
+my_date, id FROM t1_values
+WHERE select_id = 55 OR select_id IS NULL order by id;
+CAST(my_date AS TIME) my_date id
+NULL NULL 1
+00:00:00 0001-01-01 2
+00:00:00 9999-12-31 3
+00:00:00 2004-02-29 4
+00:00:00 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 55 OR select_id IS NULL) order by id;
+CAST(my_date AS TIME) my_date id
+NULL NULL 1
+00:00:00 0001-01-01 2
+00:00:00 9999-12-31 3
+00:00:00 2004-02-29 4
+00:00:00 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS TIME),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS TIME),
+my_datetime, id FROM t1_values
+WHERE select_id = 54 OR select_id IS NULL order by id;
+CAST(my_datetime AS TIME) my_datetime id
+NULL NULL 1
+00:00:00 0001-01-01 00:00:00 2
+23:59:59 9999-12-31 23:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 54 OR select_id IS NULL) order by id;
+CAST(my_datetime AS TIME) my_datetime id
+NULL NULL 1
+00:00:00 0001-01-01 00:00:00 2
+23:59:59 9999-12-31 23:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS TIME),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS TIME),
+my_double, id FROM t1_values
+WHERE select_id = 53 OR select_id IS NULL order by id;
+CAST(my_double AS TIME) my_double id
+NULL NULL 1
+-838:59:59 -1.7976931348623e308 2
+838:59:59 1.7976931348623e308 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 25
+Warnings:
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 53 OR select_id IS NULL) order by id;
+CAST(my_double AS TIME) my_double id
+NULL NULL 1
+-838:59:59 -1.7976931348623e308 2
+838:59:59 1.7976931348623e308 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 25
+Warnings:
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS TIME),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS TIME),
+my_bigint, id FROM t1_values
+WHERE select_id = 52 OR select_id IS NULL order by id;
+CAST(my_bigint AS TIME) my_bigint id
+NULL NULL 1
+-838:59:59 -9223372036854775808 2
+838:59:59 9223372036854775807 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 24
+Warnings:
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 52 OR select_id IS NULL) order by id;
+CAST(my_bigint AS TIME) my_bigint id
+NULL NULL 1
+-838:59:59 -9223372036854775808 2
+838:59:59 9223372036854775807 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 24
+Warnings:
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS TIME),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS TIME),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 51 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 23
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 51 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 23
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS TIME),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS TIME),
+my_binary_30, id FROM t1_values
+WHERE select_id = 50 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS TIME) my_binary_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 22
+Warnings:
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 50 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS TIME) my_binary_30 id
+NULL NULL 1
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
+-00:00:01 -1
+41:58:00 1 17:58
+Warnings:
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS TIME),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS TIME),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 49 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 21
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 49 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 21
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS TIME),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS TIME),
+my_char_30, id FROM t1_values
+WHERE select_id = 48 OR select_id IS NULL order by id;
+CAST(my_char_30 AS TIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 20
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 48 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS TIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 20
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS DATETIME),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS DATETIME),
+my_year, id FROM t1_values
+WHERE select_id = 47 OR select_id IS NULL order by id;
+CAST(my_year AS DATETIME) my_year id
+NULL NULL 1
+1901-00-00 00:00:00 1901 2
+2155-00-00 00:00:00 2155 3
+2000-00-00 00:00:00 2000 4
+2005-00-00 00:00:00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 47 OR select_id IS NULL) order by id;
+CAST(my_year AS DATETIME) my_year id
+NULL NULL 1
+1901-00-00 00:00:00 1901 2
+2155-00-00 00:00:00 2155 3
+2000-00-00 00:00:00 2000 4
+2005-00-00 00:00:00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS DATETIME),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS DATETIME),
+my_time, id FROM t1_values
+WHERE select_id = 46 OR select_id IS NULL order by id;
+CAST(my_time AS DATETIME) my_time id
+NULL NULL 1
+2000-12-30 01:00:01 -838:59:59 2
+2001-03-09 22:59:59 838:59:59 3
+2001-02-03 13:00:00 13:00:00 4
+2001-02-03 10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 46 OR select_id IS NULL) order by id;
+CAST(my_time AS DATETIME) my_time id
+NULL NULL 1
+2000-12-30 01:00:01 -838:59:59 2
+2001-03-09 22:59:59 838:59:59 3
+2001-02-03 13:00:00 13:00:00 4
+2001-02-03 10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATETIME),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS DATETIME),
+my_timestamp, id FROM t1_values
+WHERE select_id = 45 OR select_id IS NULL order by id;
+CAST(my_timestamp AS DATETIME) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 45 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS DATETIME) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS DATETIME),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS DATETIME),
+my_date, id FROM t1_values
+WHERE select_id = 44 OR select_id IS NULL order by id;
+CAST(my_date AS DATETIME) my_date id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 2
+9999-12-31 00:00:00 9999-12-31 3
+2004-02-29 00:00:00 2004-02-29 4
+2005-06-28 00:00:00 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 44 OR select_id IS NULL) order by id;
+CAST(my_date AS DATETIME) my_date id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 2
+9999-12-31 00:00:00 9999-12-31 3
+2004-02-29 00:00:00 2004-02-29 4
+2005-06-28 00:00:00 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATETIME),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS DATETIME),
+my_datetime, id FROM t1_values
+WHERE select_id = 43 OR select_id IS NULL order by id;
+CAST(my_datetime AS DATETIME) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 43 OR select_id IS NULL) order by id;
+CAST(my_datetime AS DATETIME) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS DATETIME),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS DATETIME),
+my_double, id FROM t1_values
+WHERE select_id = 42 OR select_id IS NULL order by id;
+CAST(my_double AS DATETIME) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 19
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 19
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 42 OR select_id IS NULL) order by id;
+CAST(my_double AS DATETIME) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 19
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATETIME),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS DATETIME),
+my_bigint, id FROM t1_values
+WHERE select_id = 41 OR select_id IS NULL order by id;
+CAST(my_bigint AS DATETIME) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 18
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 18
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 41 OR select_id IS NULL) order by id;
+CAST(my_bigint AS DATETIME) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 18
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATETIME),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS DATETIME),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 40 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 17
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 40 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 17
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATETIME),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS DATETIME),
+my_binary_30, id FROM t1_values
+WHERE select_id = 39 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS DATETIME) my_binary_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 16
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 39 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS DATETIME) my_binary_30 id
+NULL NULL 1
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
+NULL -1
+2005-06-27 17:58:00 2005-06-27 17:58
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATETIME),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS DATETIME),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 38 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 15
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 38 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 15
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATETIME),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS DATETIME),
+my_char_30, id FROM t1_values
+WHERE select_id = 37 OR select_id IS NULL order by id;
+CAST(my_char_30 AS DATETIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 14
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 37 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS DATETIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 14
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS DATE),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS DATE),
+my_year, id FROM t1_values
+WHERE select_id = 36 OR select_id IS NULL order by id;
+CAST(my_year AS DATE) my_year id
+NULL NULL 1
+1901-00-00 1901 2
+2155-00-00 2155 3
+2000-00-00 2000 4
+2005-00-00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 36 OR select_id IS NULL) order by id;
+CAST(my_year AS DATE) my_year id
+NULL NULL 1
+1901-00-00 1901 2
+2155-00-00 2155 3
+2000-00-00 2000 4
+2005-00-00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS DATE),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS DATE),
+my_time, id FROM t1_values
+WHERE select_id = 35 OR select_id IS NULL order by id;
+CAST(my_time AS DATE) my_time id
+NULL NULL 1
+2000-12-30 -838:59:59 2
+2001-03-09 838:59:59 3
+2001-02-03 13:00:00 4
+2001-02-03 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 35 OR select_id IS NULL) order by id;
+CAST(my_time AS DATE) my_time id
+NULL NULL 1
+2000-12-30 -838:59:59 2
+2001-03-09 838:59:59 3
+2001-02-03 13:00:00 4
+2001-02-03 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATE),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS DATE),
+my_timestamp, id FROM t1_values
+WHERE select_id = 34 OR select_id IS NULL order by id;
+CAST(my_timestamp AS DATE) my_timestamp id
+2001-01-01 2001-01-01 10:20:30 1
+1970-01-01 1970-01-01 14:00:01 2
+2038-01-01 2038-01-01 02:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 34 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS DATE) my_timestamp id
+2001-01-01 2001-01-01 10:20:30 1
+1970-01-01 1970-01-01 14:00:01 2
+2038-01-01 2038-01-01 02:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS DATE),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS DATE),
+my_date, id FROM t1_values
+WHERE select_id = 33 OR select_id IS NULL order by id;
+CAST(my_date AS DATE) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 33 OR select_id IS NULL) order by id;
+CAST(my_date AS DATE) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATE),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS DATE),
+my_datetime, id FROM t1_values
+WHERE select_id = 32 OR select_id IS NULL order by id;
+CAST(my_datetime AS DATE) my_datetime id
+NULL NULL 1
+0001-01-01 0001-01-01 00:00:00 2
+9999-12-31 9999-12-31 23:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 32 OR select_id IS NULL) order by id;
+CAST(my_datetime AS DATE) my_datetime id
+NULL NULL 1
+0001-01-01 0001-01-01 00:00:00 2
+9999-12-31 9999-12-31 23:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS DATE),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS DATE),
+my_double, id FROM t1_values
+WHERE select_id = 31 OR select_id IS NULL order by id;
+CAST(my_double AS DATE) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 13
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 31 OR select_id IS NULL) order by id;
+CAST(my_double AS DATE) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 13
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATE),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS DATE),
+my_bigint, id FROM t1_values
+WHERE select_id = 30 OR select_id IS NULL order by id;
+CAST(my_bigint AS DATE) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 12
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 30 OR select_id IS NULL) order by id;
+CAST(my_bigint AS DATE) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 12
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATE),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS DATE),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 29 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 11
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 29 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 11
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATE),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS DATE),
+my_binary_30, id FROM t1_values
+WHERE select_id = 28 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS DATE) my_binary_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 10
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect date value: '2005-06-27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 28 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS DATE) my_binary_30 id
+NULL NULL 1
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
+NULL -1
+2005-06-27 2005-06-27
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect date value: '2005-06-27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATE),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS DATE),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 27 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS DATE) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 9
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 27 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS DATE) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 9
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATE),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS DATE),
+my_char_30, id FROM t1_values
+WHERE select_id = 26 OR select_id IS NULL order by id;
+CAST(my_char_30 AS DATE) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 8
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 26 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS DATE) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 8
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS CHAR),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS CHAR),
+my_year, id FROM t1_values
+WHERE select_id = 25 OR select_id IS NULL order by id;
+CAST(my_year AS CHAR) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 25 OR select_id IS NULL) order by id;
+CAST(my_year AS CHAR) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS CHAR),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS CHAR),
+my_time, id FROM t1_values
+WHERE select_id = 24 OR select_id IS NULL order by id;
+CAST(my_time AS CHAR) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 24 OR select_id IS NULL) order by id;
+CAST(my_time AS CHAR) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS CHAR),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS CHAR),
+my_timestamp, id FROM t1_values
+WHERE select_id = 23 OR select_id IS NULL order by id;
+CAST(my_timestamp AS CHAR) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 23 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS CHAR) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS CHAR),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS CHAR),
+my_date, id FROM t1_values
+WHERE select_id = 22 OR select_id IS NULL order by id;
+CAST(my_date AS CHAR) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 22 OR select_id IS NULL) order by id;
+CAST(my_date AS CHAR) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS CHAR),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS CHAR),
+my_datetime, id FROM t1_values
+WHERE select_id = 21 OR select_id IS NULL order by id;
+CAST(my_datetime AS CHAR) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 21 OR select_id IS NULL) order by id;
+CAST(my_datetime AS CHAR) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS CHAR),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS CHAR),
+my_double, id FROM t1_values
+WHERE select_id = 20 OR select_id IS NULL order by id;
+CAST(my_double AS CHAR) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 20 OR select_id IS NULL) order by id;
+CAST(my_double AS CHAR) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS CHAR),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS CHAR),
+my_decimal, id FROM t1_values
+WHERE select_id = 19 OR select_id IS NULL order by id;
+CAST(my_decimal AS CHAR) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 19 OR select_id IS NULL) order by id;
+CAST(my_decimal AS CHAR) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS CHAR),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS CHAR),
+my_bigint, id FROM t1_values
+WHERE select_id = 18 OR select_id IS NULL order by id;
+CAST(my_bigint AS CHAR) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 18 OR select_id IS NULL) order by id;
+CAST(my_bigint AS CHAR) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS CHAR),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS CHAR),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 17 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 17 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS CHAR),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS CHAR),
+my_binary_30, id FROM t1_values
+WHERE select_id = 16 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS CHAR) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 16 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS CHAR) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS CHAR),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS CHAR),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 15 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 15 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS CHAR),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS CHAR),
+my_char_30, id FROM t1_values
+WHERE select_id = 14 OR select_id IS NULL order by id;
+CAST(my_char_30 AS CHAR) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 14 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS CHAR) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS BINARY),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS BINARY),
+my_year, id FROM t1_values
+WHERE select_id = 13 OR select_id IS NULL order by id;
+CAST(my_year AS BINARY) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 13 OR select_id IS NULL) order by id;
+CAST(my_year AS BINARY) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS BINARY),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS BINARY),
+my_time, id FROM t1_values
+WHERE select_id = 12 OR select_id IS NULL order by id;
+CAST(my_time AS BINARY) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 12 OR select_id IS NULL) order by id;
+CAST(my_time AS BINARY) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS BINARY),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS BINARY),
+my_timestamp, id FROM t1_values
+WHERE select_id = 11 OR select_id IS NULL order by id;
+CAST(my_timestamp AS BINARY) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 11 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS BINARY) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS BINARY),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS BINARY),
+my_date, id FROM t1_values
+WHERE select_id = 10 OR select_id IS NULL order by id;
+CAST(my_date AS BINARY) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 10 OR select_id IS NULL) order by id;
+CAST(my_date AS BINARY) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS BINARY),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS BINARY),
+my_datetime, id FROM t1_values
+WHERE select_id = 9 OR select_id IS NULL order by id;
+CAST(my_datetime AS BINARY) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 9 OR select_id IS NULL) order by id;
+CAST(my_datetime AS BINARY) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS BINARY),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS BINARY),
+my_double, id FROM t1_values
+WHERE select_id = 8 OR select_id IS NULL order by id;
+CAST(my_double AS BINARY) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 8 OR select_id IS NULL) order by id;
+CAST(my_double AS BINARY) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS BINARY),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS BINARY),
+my_decimal, id FROM t1_values
+WHERE select_id = 7 OR select_id IS NULL order by id;
+CAST(my_decimal AS BINARY) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 7 OR select_id IS NULL) order by id;
+CAST(my_decimal AS BINARY) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS BINARY),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS BINARY),
+my_bigint, id FROM t1_values
+WHERE select_id = 6 OR select_id IS NULL order by id;
+CAST(my_bigint AS BINARY) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 6 OR select_id IS NULL) order by id;
+CAST(my_bigint AS BINARY) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS BINARY),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS BINARY),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 5 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 5 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS BINARY),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS BINARY),
+my_binary_30, id FROM t1_values
+WHERE select_id = 4 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS BINARY) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 4 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS BINARY) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS BINARY),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS BINARY),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 3 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 3 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS BINARY),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS BINARY),
+my_char_30, id FROM t1_values
+WHERE select_id = 2 OR select_id IS NULL order by id;
+CAST(my_char_30 AS BINARY) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 2 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS BINARY) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT sqrt(my_bigint), my_bigint, id FROM t1_values;
+SELECT sqrt(my_bigint), my_bigint, id FROM t1_values
+WHERE select_id = 1 OR select_id IS NULL order by id;
+sqrt(my_bigint) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+3037000499.97605 9223372036854775807 3
+0 0 4
+NULL -1 5
+2 4 6
+NULL -25 7
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 1 OR select_id IS NULL) order by id;
+sqrt(my_bigint) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+3037000499.97605 9223372036854775807 3
+0 0 4
+NULL -1 5
+2 4 6
+NULL -25 7
+DROP VIEW v1;
+
+
+DROP TABLE t1_selects, t1_modes, t1_values;
+SET timestamp=DEFAULT;
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
new file mode 100644
index 00000000..33778d60
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
@@ -0,0 +1,1402 @@
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.2 - Syntax checks for the stored procedure-specific
+programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE:
+--------------------------------------------------------------------------------
+
+Testcase 3.1.2.8:
+-----------------
+
+Ensure that the scope of each BEGIN/END compound statement within a stored
+procedure definition is properly applied
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp1( )
+begin_label: BEGIN
+declare x char DEFAULT 'x';
+declare y char DEFAULT 'y';
+set x = '1';
+set y = '2';
+label1: BEGIN
+declare x char DEFAULT 'X';
+declare y char DEFAULT 'Y';
+SELECT f1, f2 into x, y from t2 limit 1;
+SELECT '1.1', x, y;
+label2: BEGIN
+declare x char default 'a';
+declare y char default 'b';
+label3: BEGIN
+declare x char default 'c';
+declare y char default 'd';
+label4: BEGIN
+declare x char default 'e';
+declare y char default 'f';
+label5: BEGIN
+declare x char default 'g';
+declare y char default 'h';
+SELECT 5, x, y;
+END label5;
+SELECT 4, x, y;
+END label4;
+SELECT 3, x, y;
+END label3;
+SELECT 2, x, y;
+END label2;
+END label1;
+set @v1 = x;
+set @v2 = y;
+SELECT '1.2', @v1, @v2;
+END begin_label//
+CALL sp1();
+1.1 x y
+1.1 a a
+5 x y
+5 g h
+4 x y
+4 e f
+3 x y
+3 c d
+2 x y
+2 a b
+1.2 @v1 @v2
+1.2 1 2
+Warnings:
+Warning 1265 Data truncated for column 'x' at row 1
+Warning 1265 Data truncated for column 'y' at row 1
+DROP PROCEDURE IF EXISTS sp1;
+
+Testcase 3.1.2.26:
+------------------
+
+Ensure that the initial value of every variable declared for a stored procedure
+is either NULL or its DEFAULT value, as appropriate.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+set @v1=0;
+set @v2=0;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x1 char default 'x';
+declare y1 char;
+declare x2 tinytext default 'tinytext';
+declare y2 tinytext;
+declare x3 datetime default '2005-10-03 12:13:14';
+declare y3 datetime;
+declare x4 float default 1.2;
+declare y4 float;
+declare x5 blob default 'b';
+declare y5 blob;
+declare x6 smallint default 127;
+declare y6 smallint;
+SELECT x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6;
+END//
+CALL sp1();
+x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6
+x tinytext 2005-10-03 12:13:14 1.2 b 127 NULL NULL NULL NULL NULL NULL
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.30:
+------------------
+
+Ensure that, when a stored procedure is called/executed, every variable always
+uses the correct value: either the value with which it is initialized or the
+value to which it is subsequently SET or otherwise assigned, as appropriate.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( IN invar INT, OUT outvar INT )
+BEGIN
+declare x integer;
+declare y integer default 1;
+set @x = x;
+set @y = y;
+set @z = 234;
+SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1;
+SELECT @x, @y, @z, invar;
+BEGIN
+set @x = 2;
+SELECT @x, @y, @z;
+SET outvar = @x * invar + @z * @f;
+SET invar = outvar;
+BEGIN
+set @y = null, @z = 'abcd';
+SELECT @x, @y, @z;
+END;
+END;
+END//
+SET @invar = 100;
+SET @outvar = @invar;
+SET @f = 10;
+SELECT @x, @y, @z, @invar, @outvar;
+@x @y @z @invar @outvar
+NULL NULL NULL 100 100
+CALL sp1( @invar, @outvar );
+@x @y @z invar
+a` a` 234 100
+@x @y @z
+2 a` 234
+@x @y @z
+2 NULL abcd
+SELECT @x, @y, @z, @invar, @outvar;
+@x @y @z @invar @outvar
+2 NULL abcd 100 2540
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.31:
+------------------
+
+Ensure that the SELECT ... INTO statement properly assigns values to the
+variables in its variable list.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+set @x=x;
+set @y=y;
+SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1;
+SELECT @x, @y;
+END//
+CALL sp1();
+@x @y
+-5000 1000-01-01
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.32:
+------------------
+
+Ensure that a SELECT ... INTO statement that retrieves multiple rows is
+rejected, with an appropriate error message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+set @x=x;
+set @y=y;
+SELECT f4, f3 into @x, @y from t2;
+END//
+CALL sp1();
+ERROR 42000: Result consisted of more than one row
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.33:
+------------------
+
+Ensure that a SELECT ... INTO statement that retrieves too many columns for the
+number of variables in its variable list is rejected, with an appropriate error
+message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+set @x=x;
+set @y=y;
+SELECT f4, f3, f2, f1 into @x, @y from t2;
+END//
+CALL sp1();
+ERROR 21000: The used SELECT statements have a different number of columns
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.34:
+------------------
+
+Ensure that a SELECT ... INTO statement that retrieves too few columns for the
+number of variables in its variable list is rejected, with an appropriate error
+message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer; declare z integer;
+set @x=x;
+set @y=y;
+set @z=z;
+SELECT f4 into @x, @y, @z from t2;
+END//
+CALL sp1();
+ERROR 21000: The used SELECT statements have a different number of columns
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.38:
+------------------
+
+Ensure that the scope of every condition declared is properly applied.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+create table res_t1(w char unique, x char);
+insert into res_t1 values('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+SELECT '-1-', x1, x2, x3, x4, x5, x6;
+BEGIN
+declare condname condition for sqlstate '23000';
+declare continue handler for condname set x5 = 1;
+set x6 = 0;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+SELECT '-2-', x1, x2, x3, x4, x5, x6;
+END;
+begin1_label: BEGIN
+BEGIN
+declare condname condition for sqlstate '20000';
+declare continue handler for condname set x1 = 1;
+set x2 = 0;
+case x2
+when 1 then set x2=10;
+when 2 then set x2=11;
+END case;
+set x2 = 1;
+SELECT '-3-', x1, x2, x3, x4, x5, x6;
+begin2_label: BEGIN
+BEGIN
+declare condname condition for sqlstate '23000';
+declare exit handler for condname set x3 = 1;
+set x4= 1;
+SELECT '-4a', x1, x2, x3, x4, x5, x6;
+insert into res_t1 values ('a', 'b');
+set x4= 2;
+SELECT '-4b', x1, x2, x3, x4, x5, x6;
+END;
+SELECT '-5-', x1, x2, x3, x4, x5, x6;
+END begin2_label;
+SELECT '-6-', x1, x2, x3, x4, x5, x6;
+END;
+SELECT '-7-', x1, x2, x3, x4, x5, x6;
+END begin1_label;
+SELECT 'END', x1, x2, x3, x4, x5, x6;
+END//
+CALL h1();
+-1- x1 x2 x3 x4 x5 x6
+-1- 0 0 0 0 0 0
+-2- x1 x2 x3 x4 x5 x6
+-2- 0 0 0 0 1 1
+-3- x1 x2 x3 x4 x5 x6
+-3- 1 1 0 0 1 1
+-4a x1 x2 x3 x4 x5 x6
+-4a 1 1 0 1 1 1
+-5- x1 x2 x3 x4 x5 x6
+-5- 1 1 1 1 1 1
+-6- x1 x2 x3 x4 x5 x6
+-6- 1 1 1 1 1 1
+-7- x1 x2 x3 x4 x5 x6
+-7- 1 1 1 1 1 1
+END x1 x2 x3 x4 x5 x6
+END 1 1 1 1 1 1
+DROP TABLE IF EXISTS tnull;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE TABLE tnull(f1 int);
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '42S02';
+declare continue handler for cond1 set @var2 = 1;
+BEGIN
+declare cond1 condition for sqlstate '23000';
+declare continue handler for cond1 set @var2 = 1;
+END;
+insert into tnull values(1);
+END//
+CALL sp1();
+DROP PROCEDURE h1;
+drop table res_t1;
+DROP PROCEDURE sp1;
+DROP TABLE tnull;
+
+Testcase 3.1.2.43:
+------------------
+
+Ensure that the DECLARE ... HANDLER FOR statement can not declare any handler
+for a condition declared outside of the scope of the handler.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS h2;
+drop table IF EXISTS res_t1;
+create table res_t1(w char unique, x char);
+insert into res_t1 values ('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare cond_1 condition for sqlstate '23000';
+declare continue handler for cond_1 set x5 = 1;
+BEGIN
+declare cond_2 condition for sqlstate '20000';
+declare continue handler for cond_1 set x1 = 1;
+BEGIN
+declare continue handler for cond_2 set x3 = 1;
+set x2 = 1;
+END;
+set x6 = 0;
+END;
+BEGIN
+declare continue handler for cond_1 set x1 = 1;
+BEGIN
+declare continue handler for cond_2 set x3 = 1;
+set x2 = 1;
+END;
+set x6 = 0;
+END;
+END;
+SELECT x1, x2, x3, x4, x5, x6;
+END//
+ERROR 42000: Undefined CONDITION: cond_2
+CREATE PROCEDURE h2 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare condname condition for sqlstate '23000';
+declare continue handler for condname set x5 = 1;
+BEGIN
+declare condname condition for sqlstate '20000';
+declare continue handler for condname set x1 = 1;
+BEGIN
+declare condname condition for sqlstate '42000';
+declare continue handler for condname set x3 = 1;
+set x6 = 0;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+set x4= 0;
+CALL sp1();
+set x4= 1;
+set x2 = 0;
+case x2
+when 1 then set x2=10;
+when 2 then set x2=11;
+END case;
+set x2 = 1;
+END;
+set x2 = 0;
+case x2
+when 1 then set x2=10;
+when 2 then set x2=11;
+END case;
+set x2 = 1;
+set x6 = 0;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+END;
+END;
+SELECT x1, x2, x3, x4, x5, x6;
+END//
+CALL h2();
+x1 x2 x3 x4 x5 x6
+1 1 1 1 1 1
+SELECT * FROM res_t1;
+w x
+a b
+DROP PROCEDURE h2;
+drop table res_t1;
+
+Testcase 3.1.2.44:
+------------------
+
+Ensure that the DECLARE ... HANDLER FOR statement cannot declare a handler for
+any invalid, or undeclared, condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare condname1 condition for sqlstate '23000';
+BEGIN
+declare condname2 condition for sqlstate '20000';
+declare continue handler for condname1 set x3 = 1;
+declare continue handler for condname2 set x1 = 1;
+END;
+END;
+BEGIN
+declare condname3 condition for sqlstate '42000';
+declare continue handler for condname1 set x3 = 1;
+declare continue handler for condname2 set x5 = 1;
+declare continue handler for condname3 set x1 = 1;
+END;
+END//
+ERROR 42000: Undefined CONDITION: condname1
+CREATE PROCEDURE h1 ()
+BEGIN
+DECLARE x1 INT DEFAULT 0;
+BEGIN
+DECLARE condname1 CONDITION CHECK SQLSTATE '23000';
+END;
+DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
+END//
+ERROR 42000: 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 'CHECK SQLSTATE '23000';
+END;
+DECLARE CONTINUE HANDLER FOR condname1 SET x1 = ...' at line 5
+CREATE PROCEDURE h1 ()
+BEGIN
+DECLARE x1 INT DEFAULT 0;
+BEGIN
+DECLARE condname1 CONDITION FOR SQLSTATE 'qwert';
+END;
+DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
+END//
+ERROR 42000: Bad SQLSTATE: 'qwert'
+
+Testcase 3.1.2.45 + 3.1.2.50:
+-----------------------------
+
+45. Ensure that the scope of every handler declared is properly applied.
+50. Ensure that a CONTINUE handler allows the execution of the stored procedure
+. to continue once the handler statement has completed its own execution (that
+. is, once the handler action statement has been executed).
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p1undo;
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+drop table IF EXISTS res_t1;
+==> 'UNDO' is still not supported.
+create procedure p1undo ()
+begin
+declare undo handler for sqlexception select '1';
+select * from tqq;
+SELECT 'end of 1';
+end;//
+ERROR 42000: 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 'undo handler for sqlexception select '1';
+select * from tqq;
+SELECT 'end of 1...' at line 3
+create procedure p1 ()
+begin
+declare exit handler for sqlexception select 'exit handler 1';
+begin
+declare exit handler for sqlexception select 'exit handler 2';
+begin
+declare continue handler for sqlexception select 'continue handler 3';
+drop table if exists tqq;
+select * from tqq;
+SELECT 'end of BEGIN/END 3';
+end;
+drop table if exists tqq;
+select * from tqq;
+SELECT 'end of BEGIN/END 2';
+end;
+select * from tqq;
+SELECT 'end of BEGIN/END 1';
+end;//
+call p1()//
+continue handler 3
+continue handler 3
+end of BEGIN/END 3
+end of BEGIN/END 3
+exit handler 2
+exit handler 2
+exit handler 1
+exit handler 1
+create table res_t1(w char unique, x char);
+insert into res_t1 values ('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare continue handler for sqlstate '23000' set x5 = 1;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+END;
+begin1_label: BEGIN
+BEGIN
+declare continue handler for sqlstate '23000' set x1 = 1;
+insert into res_t1 values ('a', 'b');
+set x2 = 1;
+begin2_label: BEGIN
+BEGIN
+declare exit handler for sqlstate '23000' set x3 = 1;
+set x4= 1;
+insert into res_t1 values ('a', 'b');
+set x4= 0;
+END;
+END begin2_label;
+END;
+END begin1_label;
+SELECT x1, x2, x3, x4, x5, x6;
+END//
+CALL h1();
+x1 x2 x3 x4 x5 x6
+1 1 1 1 1 1
+This will fail, SQLSTATE 00000 is not allowed
+CREATE PROCEDURE sp1()
+begin1_label:BEGIN
+declare exit handler for sqlstate '00000' set @var1 = 5;
+set @var2 = 6;
+begin2_label:BEGIN
+declare continue handler for sqlstate '00000' set @var3 = 7;
+set @var4 = 8;
+SELECT @var3, @var4;
+END begin2_label;
+SELECT @var1, @var2;
+END begin1_label//
+ERROR 42000: Bad SQLSTATE: '00000'
+Verify SP wasn't created
+CALL sp1();
+ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
+DROP PROCEDURE p1;
+DROP PROCEDURE h1;
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE res_t1;
+
+Testcase 3.1.2.50:
+------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @y=0;
+END//
+CREATE PROCEDURE sp2 ()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 1;
+set @x=1;
+SELECT @x2;
+CALL sp1(1);
+set @x=2;
+SELECT @x2, @x;
+END//
+CALL sp2();
+@x2
+NULL
+@x2 @x
+1 2
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.2.2.51:
+------------------
+
+Ensure that an EXIT handler causes the execution of the stored procedure to
+terminate, within its scope, once the handler action statement has been
+executed.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @x=0;
+END//
+CREATE PROCEDURE sp2 ()
+BEGIN
+declare exit handler for sqlstate '42000' set @x2 = 1;
+set @x2=0;
+set @x=1;
+SELECT '-1-', @x2, @x;
+CALL sp1(1);
+SELECT '-2-', @x2, @x;
+set @x=2;
+END//
+CALL sp1(1);
+ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
+CALL sp2();
+-1- @x2 @x
+-1- 0 1
+SELECT '-3-', @x2, @x;
+-3- @x2 @x
+-3- 1 1
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.1.2.52:
+------------------
+
+Ensure that an EXIT handler does not cause the execution of the stored procedure
+to terminate outside of its scope.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @x=0;
+END//
+CREATE PROCEDURE sp2()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 2;
+set @x2 = 1;
+set @x =20;
+SELECT '-1-', @x2, @x;
+BEGIN
+declare exit handler for sqlstate '42000' set @x2 = 11;
+SELECT '-2-', @x2, @x;
+CALL sp1(1);
+SELECT '-3a', @x2, @x;
+set @x=21;
+SELECT '-3b', @x2, @x;
+END;
+set @x=22;
+SELECT '-4-', @x2, @x;
+END//
+CALL sp2();
+-1- @x2 @x
+-1- 1 20
+-2- @x2 @x
+-2- 1 20
+-4- @x2 @x
+-4- 11 22
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.1.2.54:
+------------------
+
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+“01“ is always exactly equivalent in action to a handler with an SQLWARNING
+condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+DROP TABLE IF EXISTS temp;
+CREATE TABLE temp( f1 CHAR, f2 CHAR);
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp0()
+BEGIN
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '01000' set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp2()
+BEGIN
+declare continue handler for sqlwarning set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp3()
+BEGIN
+declare exit handler for sqlstate '01000' set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp4()
+BEGIN
+declare exit handler for sqlwarning set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+INSERT INTO temp VALUES('0', NULL);
+CALL sp0();
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
+Warning 1265 Data truncated for column 'f2' at row 1
+SELECT @done, @x;
+@done @x
+0 1
+INSERT INTO temp VALUES('1', NULL);
+CALL sp1();
+SELECT @done, @x;
+@done @x
+1 1
+INSERT INTO temp VALUES('2', NULL);
+CALL sp2();
+SELECT @done, @x;
+@done @x
+1 1
+INSERT INTO temp VALUES('3', NULL);
+CALL sp3();
+SELECT @done, @x;
+@done @x
+1 0
+INSERT INTO temp VALUES('4', NULL);
+CALL sp4();
+SELECT @done, @x;
+@done @x
+1 0
+SELECT * FROM temp;
+f1 f2
+0 NULL
+x y
+1 NULL
+x y
+2 NULL
+x y
+3 NULL
+x y
+4 NULL
+x y
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+DROP TABLE temp;
+
+Testcase 3.1.2.56:
+------------------
+
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+“02“ is always exactly equivalent in action to a handler with a NOT FOUND
+condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp0()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp1()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare continue handler for sqlstate '02000' set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp2()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare continue handler for not found set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp3()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare exit handler for sqlstate '02000' set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp4()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare exit handler for not found set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CALL sp0();
+ERROR 02000: No data - zero rows fetched, selected, or processed
+SELECT @done, @x;
+@done @x
+0 1
+CALL sp1();
+SELECT @done, @x;
+@done @x
+1 2
+CALL sp2();
+SELECT @done, @x;
+@done @x
+1 2
+CALL sp3();
+SELECT @done, @x;
+@done @x
+1 1
+CALL sp4();
+SELECT @done, @x;
+@done @x
+1 1
+DROP PROCEDURE sp0;
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+
+Testcase 3.1.2.58:
+------------------
+
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+anything other that “01“ or “02“ is always exactly equivalent in action to a
+handler with an SQLEXCEPTION condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp0()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp1()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE continue HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE';
+DECLARE continue HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE';
+DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp2()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE continue HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE';
+DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp3()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE EXIT HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE';
+DECLARE EXIT HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE';
+DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp4()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE EXIT HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE';
+DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+CLOSE cur1;
+END//
+CALL sp0();
+ERROR 20000: Case not found for CASE statement
+SELECT '-0-', @x;
+-0- @x
+-0- 1
+CALL sp1();
+SQLSTATE
+20000
+SQLSTATE
+21000
+SQLSTATE
+24000
+SELECT '-1-', @x;
+-1- @x
+-1- 6
+CALL sp2();
+SQLSTATE
+SQLEXCEPTION
+SQLSTATE
+SQLEXCEPTION
+SQLSTATE
+24000
+SELECT '-2-', @x;
+-2- @x
+-2- 6
+CALL sp3();
+SQLSTATE
+20000
+SELECT '-3-', @x;
+-3- @x
+-3- 1
+CALL sp4();
+SQLSTATE
+SQLEXCEPTION
+SELECT '-4-', @x;
+-4- @x
+-4- 1
+DROP PROCEDURE sp0;
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+
+Testcase 3.1.2.65:
+------------------
+
+Ensure that FETCH <cursor name> returns the first row of the cursor_s result set
+the first time FETCH is executed, that it returns each subsequent row of the
+cursor_s result set each of the subsequent times FETCH is executed, and that it
+returns a NOT FOUND warning if it is executed after the last row of the cursor_s
+result set has already been fetched.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS temp;
+CREATE TABLE temp(
+cnt INT,
+f1 CHAR(20),
+f2 CHAR(20),
+f3 INT,
+f4 CHAR(20),
+f5 INT);
+INSERT INTO temp VALUES(0, 'onip', 'abc', 8760, 'xyz', 10);
+CREATE PROCEDURE sp1( )
+BEGIN
+declare proceed int default 1;
+declare count integer default 1;
+declare f1_value char(20);
+declare f2_value char(20);
+declare f5_value char(20);
+declare f4_value integer;
+declare f6_value integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2
+where f4 >=-5000 order by f4 limit 3;
+open cur1;
+while proceed do
+SELECT count AS 'loop';
+fetch cur1 into f1_value, f2_value, f4_value, f5_value, f6_value;
+insert into temp values (count, f1_value, f2_value, f4_value, f5_value, f6_value);
+set count = count + 1;
+END while;
+END//
+CALL sp1();
+loop
+1
+loop
+2
+loop
+3
+loop
+4
+ERROR 02000: No data - zero rows fetched, selected, or processed
+SELECT * FROM temp;
+cnt f1 f2 f3 f4 f5
+0 onip abc 8760 xyz 10
+1 a` a` -5000 a` -5000
+2 aaa aaa -4999 aaa -4999
+3 abaa abaa -4998 abaa -4998
+DROP TABLE temp;
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.68:
+------------------
+
+Ensure that FETCH <cursor name> fails with an appropriate error message if the
+number of columns to be fetched does not match the number of variables specified
+by the FETCH statement.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+--> not enough columns in FETCH statement
+CREATE PROCEDURE sp1( )
+BEGIN
+declare newf1 char(20);
+declare cur1 cursor for SELECT f1, f2 from t2 limit 10;
+declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS '';
+BEGIN
+open cur1;
+fetch cur1 into newf1;
+SELECT newf1;
+close cur1;
+END;
+END//
+--> too many columns in FETCH statement
+CREATE PROCEDURE sp2( )
+BEGIN
+declare newf1 char(20);
+declare newf2 char(20);
+declare cur1 cursor for SELECT f1 from t2 limit 10;
+declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS '';
+BEGIN
+open cur1;
+fetch cur1 into newf1, newf2;
+SELECT newf1, newf2;
+close cur1;
+END;
+END//
+--> not enough columns in FETCH statement
+CALL sp1();
+ERROR HY000: Incorrect number of FETCH variables
+--> too many columns in FETCH statement
+CALL sp2();
+ERROR HY000: Incorrect number of FETCH variables
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.1.2.75:
+------------------
+
+Ensure that, for nested compound statements, a cursor that was declared and
+opened during an outer level of the statement is not closed when an inner level
+of a compound statement ends.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS temp1;
+DROP PROCEDURE IF EXISTS sp1;
+create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) );
+SELECT f1, f2, f4, f5 from t2 order by f4;
+f1 f2 f4 f5
+a` a` -5000 a`
+aaa aaa -4999 aaa
+abaa abaa -4998 abaa
+acaaa acaaa -4997 acaaa
+adaaaa adaaaa -4996 adaaaa
+aeaaaaa aeaaaaa -4995 aeaaaaa
+afaaaaaa afaaaaaa -4994 afaaaaaa
+agaaaaaaa agaaaaaaa -4993 agaaaaaaa
+a^aaaaaaaa a^aaaaaaaa -4992 a^aaaaaaaa
+a_aaaaaaaaa a_aaaaaaaaa -4991 a_aaaaaaaaa
+CREATE PROCEDURE sp1( )
+BEGIN
+declare count integer;
+declare from0 char(20);
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf5 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
+declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
+open cur1;
+open cur2;
+BEGIN
+declare continue handler for sqlstate '02000' set count = 1;
+fetch cur1 into newf1, newf2, newf4, newf5;
+SELECT '-1-', count, newf1, newf2, newf4, newf5;
+insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
+set count = 4;
+BEGIN
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf5;
+SELECT '-2-', count, newf1, newf2, newf4, newf5;
+set count = count - 1;
+END while;
+SELECT '-3-', count, newf1, newf2, newf4, newf4;
+END;
+BEGIN
+fetch cur1 into newf1, newf2, newf4, newf5;
+SELECT '-4-', newf1, newf2, newf4, newf5;
+insert into temp1 values ('cur1_in', newf1, newf2, newf4, newf5);
+END;
+fetch cur2 into newf1, newf2, newf4, newf5;
+SELECT '-5-', newf1, newf2, newf4, newf5;
+insert into temp1 values ('cur2', newf1, newf2, newf4, newf5);
+close cur1;
+END;
+fetch cur2 into newf1, newf2, newf4, newf5;
+SELECT '-6-', newf1, newf2, newf4, newf5;
+close cur2;
+END//
+CALL sp1();
+-1- count newf1 newf2 newf4 newf5
+-1- NULL a` a` -5000 a`
+-2- count newf1 newf2 newf4 newf5
+-2- 4 aaa aaa -4999 aaa
+-2- count newf1 newf2 newf4 newf5
+-2- 3 abaa abaa -4998 abaa
+-2- count newf1 newf2 newf4 newf5
+-2- 2 acaaa acaaa -4997 acaaa
+-2- count newf1 newf2 newf4 newf5
+-2- 1 adaaaa adaaaa -4996 adaaaa
+-3- count newf1 newf2 newf4 newf4
+-3- 0 adaaaa adaaaa -4996 -4996
+-4- newf1 newf2 newf4 newf5
+-4- adaaaa adaaaa -4996 adaaaa
+-5- newf1 newf2 newf4 newf5
+-5- a` a` -5000 a`
+-6- newf1 newf2 newf4 newf5
+-6- aaa aaa -4999 aaa
+SELECT * from temp1;
+f0 f1 f2 f3 f4
+cur1_out a` a` -5000 a`
+cur1_in adaaaa adaaaa -4996 adaaaa
+cur2 a` a` -5000 a`
+DROP PROCEDURE sp1;
+drop table temp1;
+
+Testcase 3.1.2.76:
+------------------
+
+Ensure that all cursors operate asensitively, so that there is no concurrency
+conflict between cursors operating on the same, or similar, sets of results
+during execution of one or more stored procedures.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+drop table IF EXISTS temp1;
+drop table IF EXISTS temp2;
+create table temp1( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer );
+create table temp2( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer );
+CREATE PROCEDURE sp_inner( )
+BEGIN
+declare proceed int default 1;
+declare i_count integer default 20;
+declare i_newf1 char(20);
+declare i_newf2 char(20);
+declare i_newf3 date;
+declare i_newf4 integer;
+declare i_newf11 char(20);
+declare i_newf12 char(20);
+declare i_newf13 date;
+declare i_newf14 integer;
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2
+where f4>=-5000 order by f4 limit 4;
+declare cur2 cursor for SELECT f1, f2, f3, f4 from t2
+where f4>=-5000 order by f4 limit 3;
+declare continue handler for sqlstate '02000' set proceed=0;
+open cur1;
+open cur2;
+set i_count = 10;
+while proceed do
+fetch cur1 into i_newf1, i_newf2, i_newf3, i_newf4;
+IF proceed THEN
+insert into temp1 values ('sp_inner', i_count, i_newf1, i_newf2, i_newf3, i_newf4);
+fetch cur2 into i_newf11, i_newf12, i_newf13, i_newf14;
+IF proceed THEN
+insert into temp2 values ('sp_inner', i_count, i_newf11, i_newf12, i_newf13, i_newf14);
+END IF;
+END IF;
+set i_count = i_count - 1;
+END while;
+close cur1;
+close cur2;
+END//
+CREATE PROCEDURE sp_outer( )
+BEGIN
+DECLARE proceed INT DEFAULT 1;
+DECLARE o_count INTEGER DEFAULT 20;
+DECLARE o_newf1 CHAR(20);
+DECLARE o_newf2 CHAR(20);
+DECLARE o_newf3 DATE;
+DECLARE o_newf4 INTEGER;
+DECLARE o_newf11 CHAR(20);
+DECLARE o_newf12 CHAR(20);
+DECLARE o_newf13 DATE;
+DECLARE o_newf14 INTEGER;
+DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
+WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
+DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
+WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0;
+OPEN cur1;
+OPEN cur2;
+SET o_count = 1;
+WHILE proceed DO
+FETCH cur1 INTO o_newf1, o_newf2, o_newf3, o_newf4;
+IF proceed THEN
+INSERT INTO temp1 VALUES ('_sp_out_', o_count, o_newf1, o_newf2, o_newf3, o_newf4);
+CALL sp_inner();
+FETCH cur2 INTO o_newf11, o_newf12, o_newf13, o_newf14;
+IF proceed THEN
+INSERT INTO temp2 VALUES ('_sp_out_', o_count, o_newf11, o_newf12, o_newf13, o_newf14);
+END IF;
+END IF;
+SET o_count = o_count + 1;
+END WHILE;
+CLOSE cur1;
+CLOSE cur2;
+END//
+CALL sp_outer();
+SELECT * FROM temp1;
+f0 cnt f1 f2 f3 f4
+_sp_out_ 1 a` a` 1000-01-01 -5000
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 2 aaa aaa 1000-01-02 -4999
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 3 abaa abaa 1000-01-03 -4998
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 4 acaaa acaaa 1000-01-04 -4997
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+SELECT * FROM temp2;
+f0 cnt f1 f2 f3 f4
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 1 a` a` 1000-01-01 -5000
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 2 aaa aaa 1000-01-02 -4999
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 3 abaa abaa 1000-01-03 -4998
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 4 acaaa acaaa 1000-01-04 -4997
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996
+DROP PROCEDURE sp_outer;
+DROP PROCEDURE sp_inner;
+DROP TABLE temp1;
+DROP TABLE temp2;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result
new file mode 100644
index 00000000..5f3de814
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result
@@ -0,0 +1,496 @@
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.3 - Syntax checks for the stored procedure-specific flow
+control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
+--------------------------------------------------------------------------------
+
+Testcase 3.1.3.7:
+-----------------
+
+Ensure that the IF statement acts correctly for all variants, including cases
+where statements are nested.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp9;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+CREATE PROCEDURE sp9( action char(20), subaction char(20) )
+BEGIN
+if action = 'action' then
+if subaction = 'subaction' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction' , 1);
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 2);
+END if;
+else
+if subaction = 'subaction'
+ then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction' , 3);
+elseif subaction = 'subaction1'
+ then
+BEGIN
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values ('none', 'subaction1', 4);
+END;
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 5);
+END if;
+END if;
+END//
+CALL sp9( 'action', 'subaction' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=1;
+f1 f2 f3
+action subaction 1
+CALL sp9( 'temp', 'subaction' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=3;
+f1 f2 f3
+none subaction 3
+CALL sp9( 'temp', 'subaction1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=4;
+f1 f2 f3
+none subaction1 4
+CALL sp9( 'action', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=2;
+f1 f2 f3
+action none 2
+CALL sp9( 'temp', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=5;
+f1 f2 f3
+none none 5
+DROP PROCEDURE sp9;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.8.:
+------------------
+
+Ensure that the CASE statement acts correctly for all variants, including cases
+where statements are nested.
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp10;
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+CREATE PROCEDURE sp10( action char(20), subaction char(20) )
+BEGIN
+case action
+when 'action' then
+case
+when subaction = 'subaction_1' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 1);
+when subaction = 'subaction_2' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 2);
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 3);
+END case;
+else
+case
+when subaction = 'subaction_1' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_1' , 4);
+when subaction = 'subaction_2' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_2' , 5);
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 6);
+END case;
+END case;
+END//
+CALL sp10( 'action', 'subaction_1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+action subaction_2 1
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'action', 'subaction_2' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+action subaction_2 2
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'temp', 'subaction_1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+none subaction_1 4
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'temp', 'subaction_2' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+none subaction_2 5
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'action', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+action none 3
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'temp', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+none none 6
+DROP PROCEDURE sp10;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.9 + 3.1.3.15:
+----------------------------
+
+09. Ensure that the LOOP statement acts correctly for all variants, including
+. cases where statements are nested.
+15. Ensure that the LEAVE statement acts correctly for all variants, including
+. cases where statements are nested.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp11;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+CREATE PROCEDURE sp11( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+label1: loop
+if count2 > 3 then leave label1;
+END if;
+set count1 = 1;
+label2: loop
+if count1 > 4 then leave label2;
+END if;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+set count1 = count1 + 1;
+iterate label2;
+END loop label2;
+set count2 = count2 + 1;
+iterate label1;
+END loop label1;
+END//
+CALL sp11();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+xyz pqr 1
+xyz pqr 2
+xyz pqr 3
+xyz pqr 4
+xyz pqr 1
+xyz pqr 2
+xyz pqr 3
+xyz pqr 4
+xyz pqr 1
+xyz pqr 2
+xyz pqr 3
+xyz pqr 4
+DROP PROCEDURE sp11;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.16:
+------------------
+
+Ensure that the ITERATE statement acts correctly for all variants, including
+cases where statements are nested.
+(tests for this testcase are also included in other testcases)
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp31316;
+CREATE PROCEDURE sp31316( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+label1: loop
+if count2 > 3 then leave label1;
+END if;
+set count1 = 1;
+label2: loop
+if count1 > 4 then leave label2;
+END if;
+insert into temp values( count1, count2);
+set count1 = count1 + 1;
+iterate label3;
+END loop label2;
+set count2 = count2 + 1;
+iterate label1;
+END loop label1;
+END//
+ERROR 42000: ITERATE with no matching label: label3
+
+Testcase 3.1.3.18:
+------------------
+
+Ensure that the REPEAT statement acts correctly for all variants, including
+cases where statements are nested.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp17;
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+CREATE PROCEDURE sp17( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+repeat
+set count1 = count1 + 1;
+set count2 = 1;
+label1: repeat
+set count2 = count2 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+until count2 > 3
+END repeat label1;
+until count1 > 3
+END repeat;
+END//
+CALL sp17();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+xyz pqr 2
+xyz pqr 2
+xyz pqr 2
+xyz pqr 3
+xyz pqr 3
+xyz pqr 3
+xyz pqr 4
+xyz pqr 4
+xyz pqr 4
+DROP PROCEDURE sp17;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.24:
+------------------
+
+Ensure that the WHILE statement acts correctly for all variants, including cases
+where statements are nested.
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t21;
+DROP PROCEDURE IF EXISTS sp21;
+create table res_t21(name text(10), surname blob(20), age_averylongfieldname_averylongname_1234569 smallint);
+insert into res_t21 values('ashwin', 'mokadam', 25);
+CREATE PROCEDURE sp21( )
+BEGIN
+declare count1 integer default 0;
+declare count2 integer default 0;
+while count1 < 3 do
+BEGIN
+declare ithisissamevariablename int default 100;
+SELECT ithisissamevariablename;
+BEGIN
+declare ithisissamevariablename int default 200;
+SELECT ithisissamevariablename;
+END;
+set count2 = 0;
+label1: while count2 < 3 do
+BEGIN
+declare count1 integer default 7;
+set count2 = count2 + 1;
+insert into res_t21 values( 'xyz' , 'pqr', count2);
+label2: while count1 < 10 do
+set count1 = count1 + 1;
+insert into res_t21 values( 'xyz' , 'pqr', count1);
+END while label2;
+END;
+END while label1;
+set count1 = count1 + 1;
+END;
+END while;
+END//
+CALL sp21();
+ithisissamevariablename
+100
+ithisissamevariablename
+200
+ithisissamevariablename
+100
+ithisissamevariablename
+200
+ithisissamevariablename
+100
+ithisissamevariablename
+200
+SELECT * from res_t21;
+name surname age_averylongfieldname_averylongname_1234569
+ashwin mokadam 25
+xyz pqr 1
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 2
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 3
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 1
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 2
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 3
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 1
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 2
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 3
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+DROP PROCEDURE sp21;
+drop table res_t21;
+
+Testcase 3.1.3.30:
+------------------
+
+Ensure that multiple cases of all possible combinations of the control flow
+statements, nested within multiple compound statements within a stored
+procedure, always act correctly and return the expected result.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS res_tbl;
+DROP PROCEDURE IF EXISTS sp31330;
+create table res_tbl (f1 int, f2 text, f3 blob, f4 date,
+f5 set('one', 'two', 'three', 'four', 'five') default 'one');
+CREATE PROCEDURE sp31330 (path int)
+BEGIN
+declare count int default 1;
+declare var1 text;
+declare var2 blob;
+declare var3 date;
+declare var4 set('one', 'two', 'three', 'four', 'five') DEFAULT 'five';
+case
+when path=1 then
+set var3 = '2000-11-09';
+set var1 = 'flowing through case 1';
+label1: loop
+if count > 5 then
+if var4=1000 then
+set var2 = 'exiting out of case 1 - invalid SET';
+END if;
+if var4='two' then
+set var2 = 'exiting out of case 1';
+END if;
+insert into res_tbl values (1, var1, var2, var3, (count-2));
+leave label1;
+elseif count = 5 then
+set count= count + 2;
+set var4='two';
+iterate label1;
+else
+set count= count + 1;
+END if;
+set var4='one';
+END loop label1;
+when path=2 then
+set var3 = '1989-11-09';
+set var1 = 'flowing through case 2';
+set @count3=0;
+label2: repeat
+set count=count + 1;
+set @count2=1;
+while @count2 <= 5 do
+set @count2 = @count2 + 1;
+END while;
+SELECT @count2;
+set @count3=@count3 + @count2;
+until count > 5
+END repeat label2;
+set var2 = 'exiting out of case 2';
+set var4 = count-3;
+SELECT @count3;
+insert into res_tbl values (2, var1, var2, var3, var4);
+ELSE BEGIN
+set @error_opt='undefined path specified';
+SELECT @error_opt;
+END;
+END case;
+END//
+CALL sp31330();
+ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp31330; expected 1, got 0
+CALL sp31330(1);
+SELECT * from res_tbl;
+f1 f2 f3 f4 f5
+1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
+CALL sp31330(2);
+@count2
+6
+@count2
+6
+@count2
+6
+@count2
+6
+@count2
+6
+@count3
+30
+SELECT * from res_tbl;
+f1 f2 f3 f4 f5
+1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
+2 flowing through case 2 exiting out of case 2 1989-11-09 one,two
+CALL sp31330(4);
+@error_opt
+undefined path specified
+DROP PROCEDURE sp31330;
+drop table res_tbl;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
new file mode 100644
index 00000000..88269f25
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
@@ -0,0 +1,436 @@
+set sql_mode="";
+set GLOBAL sql_mode="";
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.6 - Privilege Checks:
+--------------------------------------------------------------------------------
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+
+Testcase 3.1.6.1:
+-----------------
+Ensure that no user may create a stored procedure without the GRANT CREATE
+ROUTINE privilege.
+--------------------------------------------------------------------------------
+create user 'user_1'@'localhost';
+grant all on db_storedproc_1.* to 'user_1'@'localhost';
+revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+DROP PROCEDURE IF EXISTS sp1;
+connect user1a, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+USE db_storedproc_1;
+CREATE PROCEDURE sp1(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
+disconnect user1a;
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
+connect user1b, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+USE db_storedproc_1;
+CREATE PROCEDURE sp1(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+disconnect user1b;
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+DROP USER 'user_1'@'localhost';
+DROP PROCEDURE sp1;
+
+Testcase 3.1.6.2:
+-----------------
+Ensure that root always has the GRANT CREATE ROUTINE privilege.
+(checked by other testscases)
+--------------------------------------------------------------------------------
+grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+DROP PROCEDURE IF EXISTS db_storedproc_1.sp3;
+DROP FUNCTION IF EXISTS db_storedproc_1.fn1;
+connect user2, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+CREATE PROCEDURE sp3(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+CREATE FUNCTION fn1(v1 int) returns int
+BEGIN
+return v1;
+END//
+disconnect user2;
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+drop user 'user_1'@'localhost';
+DROP PROCEDURE sp3;
+DROP FUNCTION fn1;
+
+Testcase 3.1.6.4:
+-----------------
+Ensure that the default security provision of a stored procedure is SQL SECURITY
+DEFINER.
+--------------------------------------------------------------------------------
+CREATE USER 'user_1'@'localhost';
+grant update on db_storedproc_1.t6 to 'user_1'@'localhost';
+grant execute on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+USE db_storedproc_1;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+connect user3, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+USE db_storedproc_1;
+CALL sp4('a');
+f1 f2 f3 f4 f5 f6
+SELECT SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE,
+ROUTINE_BODY, ROUTINE_DEFINITION, IS_DETERMINISTIC,
+SQL_DATA_ACCESS, SECURITY_TYPE, SQL_MODE, ROUTINE_COMMENT
+FROM information_schema.routines
+WHERE routine_schema LIKE 'db_sto%';
+SPECIFIC_NAME sp4
+ROUTINE_SCHEMA db_storedproc_1
+ROUTINE_NAME sp4
+ROUTINE_TYPE PROCEDURE
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION NULL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SECURITY_TYPE DEFINER
+SQL_MODE
+ROUTINE_COMMENT
+disconnect user3;
+connection default;
+
+root@localhost db_storedproc_1
+DROP PROCEDURE sp4;
+DROP USER 'user_1'@'localhost';
+
+Testcase 3.1.6.5:
+-----------------
+Ensure that a stored procedure defined with SQL SECURITY DEFINER can be
+called/executed by any user, using only the privileges (including database
+access privileges) associated with the user who created the stored procedure.
+--------------------------------------------------------------------------------
+USE db_storedproc_1;
+CREATE TABLE t3165 ( c1 char(20), c2 char(20), c3 date);
+INSERT INTO t3165 VALUES ('inserted', 'outside of SP', NULL);
+create user 'user_1'@'localhost';
+create user 'user_2'@'localhost';
+grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
+grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
+grant execute on db_storedproc_1.* to 'user_2'@'localhost';
+flush privileges;
+connect user5_1, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+CREATE PROCEDURE sp5_s_i () sql security definer
+BEGIN
+SELECT * from db_storedproc_1.t3165;
+insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_s_i', 1000);
+END//
+CREATE PROCEDURE sp5_sel () sql security definer
+BEGIN
+SELECT * from db_storedproc_1.t3165;
+END//
+CREATE PROCEDURE sp5_ins () sql security definer
+BEGIN
+insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
+END//
+disconnect user5_1;
+connect user5_2, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+grant insert on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+CALL sp5_ins();
+CALL sp5_sel();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+inserted from sp5_s_i 2000-10-00
+inserted from sp5_ins 2000-10-00
+connection default;
+
+root@localhost db_storedproc_1
+REVOKE INSERT on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+inserted from sp5_s_i 2000-10-00
+inserted from sp5_ins 2000-10-00
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_sel();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+inserted from sp5_s_i 2000-10-00
+inserted from sp5_ins 2000-10-00
+connection default;
+
+root@localhost db_storedproc_1
+REVOKE SELECT on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+disconnect user5_2;
+connection default;
+
+root@localhost db_storedproc_1
+DROP PROCEDURE sp5_s_i;
+DROP PROCEDURE sp5_sel;
+DROP PROCEDURE sp5_ins;
+DROP TABLE t3165;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+Testcase 3.1.6.6:
+-----------------
+Ensure that a stored procedure defined with SQL SECURITY INVOKER can be
+called/executed by any user, using only the privileges (including database
+access privileges) associated with the user executing the stored procedure.
+--------------------------------------------------------------------------------
+USE db_storedproc_1;
+CREATE TABLE t3166 ( c1 char(30) );
+INSERT INTO db_storedproc_1.t3166 VALUES ('inserted outside SP');
+create user 'user_1'@'localhost';
+create user 'user_2'@'localhost';
+GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
+GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
+GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user6_1, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
+BEGIN
+SELECT * from db_storedproc_1.t3166;
+insert into db_storedproc_1.t3166 values ('inserted from sp3166_s_i');
+END//
+CREATE PROCEDURE sp3166_sel () SQL SECURITY INVOKER
+BEGIN
+SELECT * from db_storedproc_1.t3166;
+END//
+CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
+BEGIN
+insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
+END//
+disconnect user6_1;
+connect user6_2, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+c1
+inserted outside SP
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+CALL sp3166_ins();
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+CALL sp3166_sel();
+c1
+inserted outside SP
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp3166_sel();
+c1
+inserted outside SP
+GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+disconnect user6_2;
+connect user6_3, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+c1
+inserted outside SP
+CALL sp3166_ins();
+CALL sp3166_sel();
+c1
+inserted outside SP
+inserted from sp3166_s_i
+inserted from sp3166_ins
+disconnect user6_3;
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp3166_sel();
+c1
+inserted outside SP
+inserted from sp3166_s_i
+inserted from sp3166_ins
+REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user6_4, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+CALL sp3166_ins();
+CALL sp3166_sel();
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+disconnect user6_4;
+connection default;
+CALL sp3166_s_i();
+c1
+inserted outside SP
+inserted from sp3166_s_i
+inserted from sp3166_ins
+inserted from sp3166_ins
+
+root@localhost db_storedproc_1
+REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user6_5, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_s_i'
+CALL sp3166_ins();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_ins'
+CALL sp3166_sel();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_sel'
+disconnect user6_5;
+connection default;
+
+root@localhost db_storedproc_1
+DROP PROCEDURE sp3166_s_i;
+DROP PROCEDURE sp3166_sel;
+DROP PROCEDURE sp3166_ins;
+DROP TABLE t3166;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+set GLOBAL sql_mode=default;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result
new file mode 100644
index 00000000..cf007014
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result
@@ -0,0 +1,178 @@
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.7 - SQL mode checks:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 3.1.7.1:
+-----------------
+Ensure that the sql_mode setting in effect at the time a stored procedure is
+created is the same setting under which the stored procedure runs when it is
+called/executed.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS temp_tbl;
+DROP TABLE IF EXISTS result;
+CREATE TABLE temp_tbl (f1 tinyint);
+CREATE TABLE result (f1 text(200), f2 char(20));
+set @@sql_mode='traditional';
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+CREATE PROCEDURE sp1()
+BEGIN
+declare a tinyint;
+declare count_ int default 1;
+declare continue handler for sqlstate '22003' set count_=1000;
+SHOW VARIABLES LIKE 'sql_mode';
+SELECT @@sql_mode into @cur_val_sql_mode;
+insert into temp_tbl values (1000);
+if count_ = 1000 THEN
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
+ELSE
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
+END if;
+END//
+SHOW CREATE PROCEDURE sp1;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
+BEGIN
+declare a tinyint;
+declare count_ int default 1;
+declare continue handler for sqlstate '22003' set count_=1000;
+SHOW VARIABLES LIKE 'sql_mode';
+SELECT @@sql_mode into @cur_val_sql_mode;
+insert into temp_tbl values (1000);
+if count_ = 1000 THEN
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
+ELSE
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
+END if;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+set @@sql_mode='';
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode
+CALL sp1();
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+SELECT * from result;
+f1 f2
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION value restored
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode
+SELECT @@sql_mode;
+@@sql_mode
+
+SET @@sql_mode='TRADITIONAL';
+DROP PROCEDURE sp1;
+DROP TABLE temp_tbl;
+DROP TABLE result;
+
+Testcase 3.1.7.2:
+-----------------
+Ensure that if the sql_mode setting is changed when a stored procedure is run,
+that the original setting is restored as soon as the stored procedure execution
+is complete.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp2;
+... show initial value
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+CREATE PROCEDURE sp2()
+BEGIN
+SET @@sql_mode='MAXDB';
+SHOW VARIABLES LIKE 'sql_mode';
+END//
+SHOW CREATE PROCEDURE sp2;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
+BEGIN
+SET @@sql_mode='MAXDB';
+SHOW VARIABLES LIKE 'sql_mode';
+END latin1 latin1_swedish_ci latin1_swedish_ci
+... show value prior calling procedure
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+... call procedure that changes sql_mode
+CALL sp2();
+Variable_name Value
+sql_mode PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
+... check whether old value is re-set
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DROP PROCEDURE sp2;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result
new file mode 100644
index 00000000..4df88b53
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result
@@ -0,0 +1,848 @@
+set sql_mode="";
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.8 - SHOW statement checks:
+--------------------------------------------------------------------------------
+
+Testcase 3.1.8.9:
+-----------------
+
+Ensure that all stored procedure changes made with ALTER PROCEDURE or ALTER
+FUNCTION are properly recorded and displayed when a SHOW CREATE PROCEDURE or
+SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE
+FUNCTION STATUS statement (respectively) is executed.
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn_1;
+DROP FUNCTION IF EXISTS fn_2;
+DROP PROCEDURE IF EXISTS sp_1;
+DROP PROCEDURE IF EXISTS sp_2;
+CREATE PROCEDURE sp_1 (i1 int)
+BEGIN
+set @x=i1;
+END//
+CREATE PROCEDURE sp_2 (i1 int) SQL SECURITY INVOKER COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+END//
+CREATE FUNCTION fn_1 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns year
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END//
+CREATE FUNCTION fn_2 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+RETURNS YEAR
+SQL SECURITY INVOKER
+COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END//
+
+... now check what is stored:
+-----------------------------
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+SPECIFIC_NAME fn_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_1
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME fn_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_2
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT created with INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_1
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_2
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT created with INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SHOW CREATE FUNCTION fn_1;
+Function fn_1
+sql_mode
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE FUNCTION fn_2;
+Function fn_2
+sql_mode
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ SQL SECURITY INVOKER
+ COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_1;
+Procedure sp_1
+sql_mode
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_2;
+Procedure sp_2
+sql_mode
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
+ SQL SECURITY INVOKER
+ COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW FUNCTION STATUS LIKE 'fn_%';
+Db db_storedproc
+Name fn_1
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name fn_2
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment created with INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+Db db_storedproc
+Name sp_1
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name sp_2
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment created with INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+
+... now change some stuff:
+--------------------------
+ALTER PROCEDURE sp_1 SQL SECURITY INVOKER;
+ALTER PROCEDURE sp_1 COMMENT 'new comment, SP changed to INVOKER';
+ALTER PROCEDURE sp_2 SQL SECURITY DEFINER;
+ALTER PROCEDURE sp_2 DROP COMMENT;
+ERROR 42000: 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 'DROP COMMENT' at line 1
+ALTER PROCEDURE sp_2 COMMENT 'SP changed to DEFINER';
+ALTER PROCEDURE sp_2 READS SQL DATA;
+ALTER FUNCTION fn_1 SQL SECURITY INVOKER;
+ALTER FUNCTION fn_1 COMMENT 'new comment, FN changed to INVOKER';
+ALTER FUNCTION fn_1 NO SQL;
+ALTER FUNCTION fn_2 SQL SECURITY DEFINER;
+ALTER FUNCTION fn_2 COMMENT 'FN changed to DEFINER';
+ALTER FUNCTION fn_2 MODIFIES SQL DATA;
+
+... now check what is stored:
+-----------------------------
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+SPECIFIC_NAME fn_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_1
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS NO SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT new comment, FN changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME fn_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_2
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS MODIFIES SQL DATA
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT FN changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_1
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT new comment, SP changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_2
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS READS SQL DATA
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT SP changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SHOW CREATE FUNCTION fn_1;
+Function fn_1
+sql_mode
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ NO SQL
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, FN changed to INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE FUNCTION fn_2;
+Function fn_2
+sql_mode
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ MODIFIES SQL DATA
+ COMMENT 'FN changed to DEFINER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_1;
+Procedure sp_1
+sql_mode
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, SP changed to INVOKER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_2;
+Procedure sp_2
+sql_mode
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
+ READS SQL DATA
+ COMMENT 'SP changed to DEFINER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW FUNCTION STATUS LIKE 'fn_%';
+Db db_storedproc
+Name fn_1
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, FN changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name fn_2
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment FN changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+Db db_storedproc
+Name sp_1
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, SP changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name sp_2
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment SP changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+
+... change back to default and check result:
+--------------------------------------------
+ALTER FUNCTION fn_2 CONTAINS SQL;
+
+... now check what is stored:
+-----------------------------
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+SPECIFIC_NAME fn_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_1
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS NO SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT new comment, FN changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME fn_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_2
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT FN changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_1
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT new comment, SP changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_2
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS READS SQL DATA
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE
+ROUTINE_COMMENT SP changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SHOW CREATE FUNCTION fn_1;
+Function fn_1
+sql_mode
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ NO SQL
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, FN changed to INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE FUNCTION fn_2;
+Function fn_2
+sql_mode
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ COMMENT 'FN changed to DEFINER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_1;
+Procedure sp_1
+sql_mode
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, SP changed to INVOKER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_2;
+Procedure sp_2
+sql_mode
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
+ READS SQL DATA
+ COMMENT 'SP changed to DEFINER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW FUNCTION STATUS LIKE 'fn_%';
+Db db_storedproc
+Name fn_1
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, FN changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name fn_2
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment FN changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+Db db_storedproc
+Name sp_1
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, SP changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name sp_2
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment SP changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+
+... cleanup
+-----------
+DROP FUNCTION fn_1;
+DROP FUNCTION fn_2;
+DROP PROCEDURE sp_1;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
new file mode 100644
index 00000000..ffa30f4d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
@@ -0,0 +1,409 @@
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.10 - CALL checks:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 3.1.10.2 + 3.1.10.5:
+-----------------------------
+
+2. Ensure that a procedure cannot be called if the appropriate privileges do not
+exist.
+5. Ensure that a function cannot be executed if the appropriate privileges do
+not exist.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp31102;
+DROP FUNCTION IF EXISTS fn31105;
+create user 'user_1'@'localhost';
+create user 'user_2'@'localhost';
+GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
+GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user2_1, localhost, user_1, , db_storedproc;
+
+user_1@localhost db_storedproc
+CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
+BEGIN
+SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1;
+END//
+CREATE FUNCTION fn31105(n INT) RETURNS INT
+BEGIN
+DECLARE res INT;
+SET res = n * n;
+RETURN res;
+END//
+disconnect user2_1;
+connect user2_2, localhost, user_2, , db_storedproc;
+
+user_2@localhost db_storedproc
+CALL sp31102();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
+SELECT fn31105( 9 );
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+CALL sp31102();
+f1 f2 f3 f4 f5 f6
+a` a` 1000-01-01 -5000 a` -5000
+SELECT fn31105( 9 );
+fn31105( 9 )
+81
+GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+disconnect user2_2;
+connect user2_3, localhost, user_2, , db_storedproc;
+
+user_2@localhost db_storedproc
+CALL sp31102();
+f1 f2 f3 f4 f5 f6
+a` a` 1000-01-01 -5000 a` -5000
+SELECT fn31105( 9 );
+fn31105( 9 )
+81
+disconnect user2_3;
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+CALL sp31102();
+f1 f2 f3 f4 f5 f6
+a` a` 1000-01-01 -5000 a` -5000
+SELECT fn31105( 9 );
+fn31105( 9 )
+81
+connect user2_4, localhost, user_2, , db_storedproc;
+
+user_2@localhost db_storedproc
+CALL sp31102();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
+SELECT fn31105( 9 );
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
+disconnect user2_4;
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+DROP PROCEDURE sp31102;
+DROP FUNCTION fn31105;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+Testcase 3.1.10.3:
+------------------
+
+Ensure that a function can never be called.
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(a int) returns int
+BEGIN
+set @b = 0.9 * a;
+return @b;
+END//
+CALL fn1();
+ERROR 42000: PROCEDURE db_storedproc.fn1 does not exist
+DROP FUNCTION fn1;
+
+Testcase 3.1.10.6:
+------------------
+
+Ensure that a procedure can never be executed.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP FUNCTION IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+SELECT * from t10;
+END//
+SELECT sp1();
+ERROR 42000: FUNCTION db_storedproc.sp1 does not exist
+DROP PROCEDURE sp1;
+
+Testcase 3.1.10.7:
+------------------
+
+Ensure that the ROW_COUNT() SQL function always returns the correct number of
+rows affected by the execution of a stored procedure.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp_ins_1;
+DROP PROCEDURE IF EXISTS sp_ins_3;
+DROP PROCEDURE IF EXISTS sp_upd;
+DROP PROCEDURE IF EXISTS sp_ins_upd;
+DROP PROCEDURE IF EXISTS sp_del;
+DROP PROCEDURE IF EXISTS sp_with_rowcount;
+CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT);
+INSERT INTO temp SELECT * FROM t10;
+CREATE PROCEDURE sp_ins_1()
+BEGIN
+INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000);
+END//
+CREATE PROCEDURE sp_ins_3()
+BEGIN
+INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('abc', 'xyz', '1989-11-09', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000);
+END//
+CREATE PROCEDURE sp_upd()
+BEGIN
+UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc';
+END//
+CREATE PROCEDURE sp_ins_upd()
+BEGIN
+BEGIN
+INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('qwe', 'abc', '2005-11-07', 100, 'uvw', 1000);
+END;
+SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1;
+UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc';
+END//
+CREATE PROCEDURE sp_del()
+BEGIN
+DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2';
+END//
+CREATE PROCEDURE sp_with_rowcount()
+BEGIN
+BEGIN
+INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000),
+('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000),
+('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000),
+('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000);
+END;
+SELECT row_count() AS 'row_count() after insert';
+SELECT row_count() AS 'row_count() after select row_count()';
+SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
+UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc';
+SELECT row_count() AS 'row_count() after update';
+SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
+DELETE FROM temp WHERE temp.f1 = 'updated_2';
+SELECT row_count() AS 'row_count() after delete';
+END//
+CALL sp_ins_1();
+SELECT row_count();
+row_count()
+1
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+abc abc 2005-10-03 100 uvw 1000
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+CALL sp_ins_3();
+SELECT row_count();
+row_count()
+3
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+abc abc 2005-10-03 100 uvw 1000
+abc xyz 1949-05-23 100 uvw 1000
+abc xyz 1989-11-09 100 uvw 1000
+abc xyz 2005-10-24 100 uvw 1000
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+CALL sp_upd();
+SELECT row_count();
+row_count()
+4
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+updated abc 2005-10-03 100 uvw 1000
+updated xyz 1949-05-23 100 uvw 1000
+updated xyz 1989-11-09 100 uvw 1000
+updated xyz 2005-10-24 100 uvw 1000
+CALL sp_ins_upd();
+COUNT( f1 ) f1
+1 aaa
+1 abaa
+1 acaaa
+1 adaaaa
+1 aeaaaaa
+1 afaaaaaa
+1 agaaaaaaa
+1 a^aaaaaaaa
+1 a_aaaaaaaaa
+1 a`
+4 qwe
+4 updated
+SELECT row_count();
+row_count()
+7
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+qwe xyz 1998-03-26 100 uvw 1000
+updated abc 2005-10-03 100 uvw 1000
+updated xyz 1949-05-23 100 uvw 1000
+updated xyz 1989-11-09 100 uvw 1000
+updated xyz 2005-10-24 100 uvw 1000
+updated_2 abc 1989-11-09 100 uvw 1000
+updated_2 abc 2000-11-09 100 uvw 1000
+updated_2 abc 2005-11-07 100 uvw 1000
+CALL sp_del();
+SELECT row_count();
+row_count()
+4
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+updated abc 2005-10-03 100 uvw 1000
+updated xyz 1949-05-23 100 uvw 1000
+updated xyz 1989-11-09 100 uvw 1000
+updated xyz 2005-10-24 100 uvw 1000
+DELETE FROM temp;
+CALL sp_with_rowcount();
+row_count() after insert
+4
+row_count() after select row_count()
+-1
+f1 f2 f3
+qwe abc 1989-11-09
+qwe abc 2000-11-09
+qwe xyz 1998-03-26
+qwe xyz 2005-11-07
+row_count() after update
+2
+f1 f2 f3
+qwe xyz 1998-03-26
+qwe xyz 2005-11-07
+updated_2 abc 1989-11-09
+updated_2 abc 2000-11-09
+row_count() after delete
+2
+SELECT row_count();
+row_count()
+8
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+qwe xyz 1998-03-26 100 uvw 1000
+qwe xyz 2005-11-07 100 uvw 1000
+DROP PROCEDURE sp_ins_1;
+DROP PROCEDURE sp_ins_3;
+DROP PROCEDURE sp_upd;
+DROP PROCEDURE sp_ins_upd;
+DROP PROCEDURE sp_del;
+DROP PROCEDURE sp_with_rowcount;
+DROP TABLE temp;
+
+Testcase 3.1.10.8:
+------------------
+
+Ensure that the mysql_affected_rows() C API function always returns the correct
+number of rows affected by the execution of a stored procedure.
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
new file mode 100644
index 00000000..b44ef1fd
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
@@ -0,0 +1,366 @@
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase: 3.5.1.1:
+------------------
+use test;
+Create trigger trg1_1 BEFORE INSERT
+on tb3 for each row set @test_before = 2, new.f142 = @test_before;
+Create trigger trg1_2 AFTER INSERT
+on tb3 for each row set @test_after = 6;
+Create trigger trg1_4 BEFORE UPDATE
+on tb3 for each row set @test_before = 27,
+new.f142 = @test_before,
+new.f122 = 'Before Update Trigger';
+Create trigger trg1_3 AFTER UPDATE
+on tb3 for each row set @test_after = '15';
+Create trigger trg1_5 BEFORE DELETE on tb3 for each row
+select count(*) into @test_before from tb3 as tr_tb3
+where f121 = 'Test 3.5.1.1';
+Create trigger trg1_6 AFTER DELETE on tb3 for each row
+select count(*) into @test_after from tb3 as tr_tb3
+where f121 = 'Test 3.5.1.1';
+set @test_before = 1;
+set @test_after = 5;
+select @test_before, @test_after;
+@test_before @test_after
+1 5
+Insert into tb3 (f121, f122, f142, f144, f134)
+values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 First Row 2 0000000005 1
+select @test_before, @test_after;
+@test_before @test_after
+2 6
+set @test_before = 18;
+set @test_after = 8;
+select @test_before, @test_after;
+@test_before @test_after
+18 8
+Update tb3 set tb3.f122 = 'Update',
+tb3.f142 = @test_before,
+tb3.f144 = @test_after
+where tb3.f121 = 'Test 3.5.1.1';
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 Before Update Trigger 27 0000000008 1
+select @test_before, @test_after;
+@test_before @test_after
+27 15
+Insert into tb3 (f121, f122, f142, f144, f134)
+values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
+set @test_before = 0;
+set @test_after = 0;
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 Before Update Trigger 27 0000000008 1
+Test 3.5.1.1 Second Row 2 0000000006 2
+select @test_before, @test_after;
+@test_before @test_after
+0 0
+Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2;
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 Before Update Trigger 27 0000000008 1
+select @test_before, @test_after;
+@test_before @test_after
+2 1
+drop trigger trg1_1;
+drop trigger trg1_2;
+drop trigger trg1_3;
+drop trigger trg1_4;
+drop trigger trg1_5;
+drop trigger trg1_6;
+delete from tb3 where f121='Test 3.5.1.1';
+
+Testcase: 3.5.1.2:
+------------------
+Create trigger trg_1 after insert
+on tb3 for each statement set @x= 1;
+ERROR 42000: 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 'statement set @x= 1' at line 2
+drop trigger trg_1;
+
+Testcase 3.5.1.3:
+-----------------
+CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't';
+ERROR 42000: 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 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
+CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's';
+ERROR 42000: 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 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1
+CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row;
+ERROR 42000: 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 'set @ret1 = 'test' for each row' at line 1
+CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row;
+ERROR 42000: 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 'DELETE AFTER on tb3 set @ret1 = 'test' for each row' at line 1
+CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test';
+ERROR 42000: 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 'for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'' at line 1
+drop trigger trg3_1;
+drop trigger trg3_2;
+drop trigger trg3_3;
+drop trigger trg3_4;
+drop trigger trg3_5;
+
+Testcase: 3.5.1.5:
+------------------
+CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e';
+ERROR 42000: 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 'on tb3 for each row set new.f120 = 'e'' at line 1
+CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f';
+ERROR 42000: 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 'INSERT on tb3 for each set row new.f120 = 'f'' at line 1
+CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g';
+ERROR 42000: 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 'tb3 for each row set new.f120 = 'g'' at line 1
+CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g';
+ERROR 42000: 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 'set new.f120 = 'g'' at line 1
+CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g';
+ERROR 42000: 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 'trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'' at line 1
+CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g';
+ERROR 42000: 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 'for each row set new.f120 = 'g'' at line 1
+drop trigger trg4_1;
+drop trigger trg4_2;
+drop trigger trg4_3;
+drop trigger trg4_4;
+drop trigger trg4_5;
+drop trigger trg4_6;
+
+Testcase 3.5.1.6: - Need to fix
+-------------------------------
+
+Testcase 3.5.1.7: - need to fix
+-------------------------------
+drop table if exists t1;
+Warnings:
+Note 1051 Unknown table 'test.t1'
+create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
+CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
+for each row set new.f3 = '14';
+CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
+BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
+ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long
+CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
+BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
+insert into t1 (f2) values ('insert 3.5.1.7');
+select * from t1;
+f1 f2 f3
+NULL insert 3.5.1.7 14
+update t1 set f2='update 3.5.1.7';
+select * from t1;
+f1 f2 f3
+NULL update 3.5.1.7 42
+select trigger_name from information_schema.triggers where trigger_schema <> 'sys' order by trigger_name;
+trigger_name
+gs_insert
+trg5_1
+trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
+ts_insert
+drop trigger trg5_1;
+drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ;
+ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long
+drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX;
+drop table t1;
+
+Testcase 3.5.1.8:
+-----------------
+CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '* before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 'trigger before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '100 before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
+for each row set new.f120 ='X';
+ERROR HY000: Trigger in wrong schema
+drop database if exists trig_db;
+create database trig_db;
+use trig_db;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+use test;
+CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
+for each row set @ret_trg6_2 = 5;
+ERROR 42S02: Table 'trig_db.tb3' doesn't exist
+use trig_db;
+CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
+for each row set @ret_trg6_3 = 18;
+ERROR HY000: Trigger in wrong schema
+use test;
+drop database trig_db;
+drop trigger trg6_1;
+drop trigger trg6_3;
+
+Testcase 3.5.1.9:(cannot be inplemented at this point)
+------------------------------------------------------
+
+Testcase 3.5.1.10:
+------------------
+CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X';
+CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y';
+ERROR HY000: Trigger 'test.trg7_1' already exists
+drop trigger trg7_1;
+
+Testcase 3.5.1.?:
+-----------------
+drop table if exists t1;
+drop table if exists t2;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t1
+for each row set new.f1 ='trig t1';
+create trigger trig before update on t2
+for each row set new.f1 ='trig t2';
+ERROR HY000: Trigger 'test.trig' already exists
+insert into t1 value ('insert to t1',1);
+select * from t1;
+f1 f2
+trig t1 1
+update t1 set f1='update to t1';
+select * from t1;
+f1 f2
+update to t1 1
+insert into t2 value ('insert to t2',2);
+update t2 set f1='update to t1';
+select * from t2;
+f1 f2
+update to t1 2
+drop table t1;
+drop table t2;
+drop trigger trig;
+
+Testcase 3.5.1.11:
+------------------
+drop database if exists trig_db1;
+drop database if exists trig_db2;
+drop database if exists trig_db3;
+create database trig_db1;
+create database trig_db2;
+create database trig_db3;
+use trig_db1;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t1
+for each row set new.f1 ='trig1', @test_var1='trig1';
+use trig_db2;
+create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t2
+for each row set new.f1 ='trig2', @test_var2='trig2';
+use trig_db3;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t1
+for each row set new.f1 ='trig3', @test_var3='trig3';
+set @test_var1= '', @test_var2= '', @test_var3= '';
+use trig_db1;
+insert into t1 (f1,f2) values ('insert to db1 t1',1);
+insert into trig_db1.t1 (f1,f2) values ('insert to db1 t1 from db1',2);
+insert into trig_db2.t2 (f1,f2) values ('insert to db2 t2 from db1',3);
+insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4);
+select @test_var1, @test_var2, @test_var3;
+@test_var1 @test_var2 @test_var3
+trig1 trig2 trig3
+select * from t1 order by f2;
+f1 f2
+trig1 1
+trig1 2
+select * from trig_db2.t2;
+f1 f2
+trig2 3
+select * from trig_db3.t1;
+f1 f2
+trig3 4
+select * from t1 order by f2;
+f1 f2
+trig1 1
+trig1 2
+use test;
+drop database trig_db1;
+drop database trig_db2;
+drop database trig_db3;
+
+Testcase 3.5.2.1/2/3:
+---------------------
+drop database if exists trig_db1;
+drop database if exists trig_db2;
+create database trig_db1;
+create database trig_db2;
+use trig_db1;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create table trig_db2.t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig1_b before insert on t1
+for each row set @test_var1='trig1_b';
+create trigger trig_db1.trig1_a after insert on t1
+for each row set @test_var2='trig1_a';
+create trigger trig_db2.trig2 before insert on trig_db2.t1
+for each row set @test_var3='trig2';
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where trigger_schema like 'trig_db%'
+ order by trigger_name;
+trigger_schema trigger_name event_object_table
+trig_db1 trig1_a t1
+trig_db1 trig1_b t1
+trig_db2 trig2 t1
+set @test_var1= '', @test_var2= '', @test_var3= '';
+insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
+insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
+select @test_var1, @test_var2, @test_var3;
+@test_var1 @test_var2 @test_var3
+trig1_b trig1_a trig2
+drop database trig_db1;
+drop database trig_db2;
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
new file mode 100644
index 00000000..f0f1777b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
@@ -0,0 +1,768 @@
+set sql_mode="";
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase 3.5.3:
+---------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= <engine_to_be_used>;
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+
+Testcase 3.5.3.2/6:
+-------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant ALL on *.* to test_noprivs@localhost;
+revoke TRIGGER on *.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+
+Testcase 3.5.3.2:
+-----------------
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.2_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.2-no');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.2_2-yes';
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.2-yes');
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
+insert into t1 (f1) values ('insert 3.5.3.2-yes');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+trig 3.5.3.2_2-yes
+
+Testcase 3.5.3.6:
+-----------------
+connection no_privs;
+use priv_db;
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.6-yes');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+connection yes_privs;
+use priv_db;
+drop trigger trg1_2;
+connection default;
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.6-no');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+connection default;
+drop trigger trg1_2;
+disconnect no_privs;
+disconnect yes_privs;
+
+Testcase 3.5.3.7a:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant ALL on *.* to test_noprivs@localhost;
+revoke UPDATE on *.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connect no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs_424a;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+show grants;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+create trigger trg4a_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1a';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1a');
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+drop trigger trg4a_1;
+connection yes_privs_424a;
+use priv_db;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants;
+Grants for test_yesprivs@localhost
+GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create trigger trg4a_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2a';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2b');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+drop trigger trg4a_2;
+disconnect no_privs_424a;
+disconnect yes_privs_424a;
+
+Testcase 3.5.3.7b:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs;
+grant ALL on priv_db.* to test_noprivs@localhost;
+revoke UPDATE on priv_db.* from test_noprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant UPDATE on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost`
+connect no_privs_424b,localhost,test_noprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_424b;
+show grants;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg4b_1 before UPDATE on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1b';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1b');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+drop trigger trg4b_1;
+connection yes_privs_424b;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg4b_2 before UPDATE on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2b';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2b');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+insert 3.5.3.7-2b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+drop trigger trg4b_2;
+disconnect no_privs_424b;
+disconnect yes_privs_424b;
+
+Testcase 3.5.3.7c
+-----------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant ALL on priv_db.t1 to test_noprivs@localhost;
+revoke UPDATE on priv_db.t1 from test_noprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_424c;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg4c_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1c';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1c');
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+drop trigger trg4c_1;
+connection yes_privs_424c;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg4c_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2c';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2c');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+trig 3.5.3.7-2c
+drop trigger trg4c_2;
+disconnect no_privs_424c;
+disconnect yes_privs_424c;
+
+Testcase 3.5.3.7d:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+connect no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_424d;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg4d_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1d';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1d');
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+trig 3.5.3.7-2c
+drop trigger trg4d_1;
+connection yes_privs_424d;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg4d_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2d';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2d');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+trig 3.5.3.7-2c
+trig 3.5.3.7-2d
+drop trigger trg4d_2;
+disconnect no_privs_424d;
+disconnect yes_privs_424d;
+
+Testcase 3.5.3.8a:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant ALL on *.* to test_noprivs@localhost;
+revoke SELECT on *.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connect no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425a;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+show grants;
+Grants for test_noprivs@localhost
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create trigger trg5a_1 before INSERT on t1 for each row
+set @test_var = new.f1;
+connection default;
+set @test_var = 'before trig 3.5.3.8-1a';
+select @test_var;
+@test_var
+before trig 3.5.3.8-1a
+insert into t1 (f1) values ('insert 3.5.3.8-1a');
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1a
+drop trigger trg5a_1;
+connection yes_privs_425a;
+use priv_db;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants;
+Grants for test_yesprivs@localhost
+GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create trigger trg5a_2 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-2a';
+select @test_var;
+@test_var
+before trig 3.5.3.8-2a
+insert into t1 (f1) values ('insert 3.5.3.8-2a');
+select @test_var;
+@test_var
+insert 3.5.3.8-2a
+drop trigger trg5a_2;
+disconnect no_privs_425a;
+disconnect yes_privs_425a;
+
+Testcase: 3.5.3.8b
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant ALL on priv_db.* to test_noprivs@localhost;
+revoke SELECT on priv_db.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost`
+connect no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425b;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg5b_1 before UPDATE on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-1b';
+insert into t1 (f1) values ('insert 3.5.3.8-1b');
+select @test_var;
+@test_var
+before trig 3.5.3.8-1b
+update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1b
+drop trigger trg5b_1;
+connection yes_privs_425b;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg5b_2 before UPDATE on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-2b';
+insert into t1 (f1) values ('insert 3.5.3.8-2b');
+select @test_var;
+@test_var
+before trig 3.5.3.8-2b
+update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
+select @test_var;
+@test_var
+update 3.5.3.8-2b
+drop trigger trg5b_2;
+disconnect no_privs_425b;
+disconnect yes_privs_425b;
+
+Testcase 3.5.3.8c:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant ALL on priv_db.t1 to test_noprivs@localhost;
+revoke SELECT on priv_db.t1 from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425c;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg5c_1 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-1c';
+insert into t1 (f1) values ('insert 3.5.3.8-1c');
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1c
+drop trigger trg5c_1;
+connection yes_privs_425c;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg5c_2 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var='before trig 3.5.3.8-2c';
+insert into t1 (f1) values ('insert 3.5.3.8-2c');
+select @test_var;
+@test_var
+insert 3.5.3.8-2c
+drop trigger trg5c_2;
+disconnect no_privs_425c;
+disconnect yes_privs_425c;
+
+Testcase: 3.5.3.8d:
+-------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425d;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg5d_1 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var='before trig 3.5.3.8-1d';
+insert into t1 (f1) values ('insert 3.5.3.8-1d');
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1d
+drop trigger trg5d_1;
+connection yes_privs_425d;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg5d_2 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var='before trig 3.5.3.8-2d';
+insert into t1 (f1) values ('insert 3.5.3.8-2d');
+select @test_var;
+@test_var
+insert 3.5.3.8-2d
+drop trigger trg5d_2;
+
+Testcase: 3.5.3.x:
+------------------
+use priv_db;
+drop table if exists t1;
+drop table if exists t2;
+create table t1 (f1 int) engine= <engine_to_be_used>;
+create table t2 (f2 int) engine= <engine_to_be_used>;
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
+grant SELECT on priv_db.t2 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_353x;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1 before insert on t1 for each row
+insert into t2 values (new.f1);
+connection default;
+use priv_db;
+insert into t1 (f1) values (4);
+ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
+grant INSERT on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (4);
+select f1 from t1 order by f1;
+f1
+4
+select f2 from t2 order by f2;
+f2
+4
+connection yes_353x;
+use priv_db;
+drop trigger trg1;
+create trigger trg2 before insert on t1 for each row
+update t2 set f2=new.f1-1;
+connection default;
+use priv_db;
+insert into t1 (f1) values (2);
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
+grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (2);
+select f1 from t1 order by f1;
+f1
+2
+4
+select f2 from t2 order by f2;
+f2
+1
+connection yes_353x;
+use priv_db;
+drop trigger trg2;
+create trigger trg3 before insert on t1 for each row
+select f2 into @aaa from t2 where f2=new.f1;
+connection default;
+use priv_db;
+insert into t1 (f1) values (1);
+ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
+grant SELECT on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (1);
+select f1 from t1 order by f1;
+f1
+1
+2
+4
+select f2 from t2 order by f2;
+f2
+1
+select @aaa;
+@aaa
+1
+connection yes_353x;
+use priv_db;
+drop trigger trg3;
+create trigger trg4 before insert on t1 for each row
+delete from t2;
+connection default;
+use priv_db;
+insert into t1 (f1) values (1);
+ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
+grant DELETE on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (1);
+select f1 from t1 order by f1;
+f1
+1
+1
+2
+4
+select f2 from t2 order by f2;
+f2
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+drop user test_noprivs;
+use test;
+drop table tb3;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
new file mode 100644
index 00000000..51f4eca4
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
@@ -0,0 +1,1770 @@
+USE test;
+
+Testcase for db level:
+----------------------
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+create database priv_db;
+create database no_priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= innodb;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant select on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost`
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant select,insert on priv_db.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT ON `priv_db`.* TO `test_noprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+
+no trigger privilege on db level for create:
+--------------------------------------------
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connect no_privs,localhost,test_noprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+
+trigger privilege on db level for create:
+-----------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant UPDATE on priv_db.* to test_yesprivs@localhost;
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost`
+
+no trigger privilege on db level for drop:
+------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+
+no trigger privilege at activation time:
+----------------------------------------
+insert into t1 (f1) values ('insert-yes');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+
+trigger privilege at activation time:
+-------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+trigger privilege on db level for drop:
+---------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+
+takes effect after use priv_db:
+-------------------------------
+use priv_db;
+drop trigger trg1_2;
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+switch to db without having trigger priv for it:
+------------------------------------------------
+use no_priv_db;
+create table t1 (f1 char(20)) engine= innodb;
+grant SELECT,UPDATE on no_priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `no_priv_db`.* TO `test_yesprivs`@`localhost`
+
+use db with trigger privilege on db level and without...:
+---------------------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+create trigger trg1_3 before INSERT on t1 for each row
+set new.f1 = 'trig 1_3-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+use priv_db;
+create trigger trg1_3 before INSERT on t1 for each row
+set new.f1 = 'trig 1_3-yes';
+use no_priv_db;
+create trigger trg1_4 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_4-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+use priv_db;
+create trigger trg1_4 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_4-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use no_priv_db;
+ERROR 42000: Access denied for user 'test_noprivs'@'localhost' to database 'no_priv_db'
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_3-yes
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_3-yes
+trig 1_3-yes
+disconnect no_privs;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+drop trigger trg1_3;
+ERROR HY000: Trigger does not exist
+use priv_db;
+drop trigger trg1_3;
+use no_priv_db;
+drop trigger trg1_4;
+ERROR HY000: Trigger does not exist
+use priv_db;
+drop trigger trg1_4;
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop table priv_db.t1;
+drop table no_priv_db.t1;
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+######### Testcase for table level: ########
+---------------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= innodb;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connect no_privs,localhost,test_noprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs;
+
+no trigger privilege on table level for create:
+-----------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+grant select, update, insert on priv_db.t1 to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+show tables;
+Tables_in_priv_db
+t1
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert1-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+show tables;
+Tables_in_priv_db
+t1
+insert into t1 (f1) values ('insert2-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+
+trigger privilege on table level for create:
+--------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert3-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+insert into t1 (f1) values ('insert4-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+trig 1_2-yes
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+
+no trigger privilege on table level for drop:
+---------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+
+no trigger privilege at activation time:
+----------------------------------------
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert5-no');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+
+trigger privilege at activation time:
+-------------------------------------
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert6-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+trigger privilege on table level for drop:
+------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+drop trigger trg1_2;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert7-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+insert7-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+insert into t1 (f1) values ('insert8-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+insert7-yes
+insert8-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+switch to table without having trigger priv for it:
+---------------------------------------------------
+create table t2 (f1 char(20)) engine= innodb;
+grant SELECT, INSERT, UPDATE on priv_db.t2 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+grant SELECT, INSERT, UPDATE on priv_db.t2 to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_noprivs`@`localhost`
+
+use table with trigger privilege and without...:
+------------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+create trigger trg1_3 before INSERT on t1 for each row
+set new.f1 = 'trig 1_3-yes';
+create trigger trg2_2 before UPDATE on t2 for each row
+set new.f1 = 'trig 2_2-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+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 # STRICT_TRANS_TABLES,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,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
+test_noprivs@localhost
+insert into t2 (f1) values ('insert9-yes');
+select f1 from t2 order by f1;
+f1
+insert9-yes
+insert into t1 (f1) values ('insert10-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+insert7-yes
+insert8-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_3-yes
+disconnect no_privs;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg2_1;
+ERROR HY000: Trigger does not exist
+drop trigger trg1_3;
+drop trigger trg2_2;
+ERROR HY000: Trigger does not exist
+drop trigger trg1_4;
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+#### Testcase for mix of user(global) and db level: ####
+--------------------------------------------------------
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+create database priv_db;
+create database no_priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= innodb;
+use no_priv_db;
+create table t1 (f1 char(20)) engine= innodb;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant ALL on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant SELECT,INSERT on *.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+
+trigger privilege on user level for create:
+-------------------------------------------
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+use no_priv_db;
+create trigger priv_db.trg1_5 before UPDATE on priv_db.t1
+for each row
+set new.f1 = 'trig 1_5-yes';
+insert into priv_db.t1 (f1) values ('insert-no');
+select f1 from priv_db.t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+drop trigger priv_db.trg1_5;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+revoke TRIGGER on *.* from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+disconnect yes_privs;
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+select * from information_schema.triggers;
+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
+drop trigger trg1_1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+show grants;
+Grants for root@localhost
+GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
+GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+drop trigger trg1_1;
+use priv_db;
+
+no trigger privilege on db level for create:
+--------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+
+trigger privilege on db level for create:
+-----------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
+for each row
+set new.f1 = 'trig 1_9-yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+use no_priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
+for each row
+set new.f1 = 'trig 1_9-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+use no_priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+drop trigger priv_db.trg1_9;
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+drop trigger priv_db.trg1_9;
+revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+grant TRIGGER on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+use no_priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+disconnect yes_privs;
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+disconnect yes_privs;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+use no_priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+disconnect no_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+drop database if exists h1;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+####### Testcase for mix of db and table level: #######
+-------------------------------------------------------
+drop database if exists priv1_db;
+drop database if exists priv2_db;
+create database priv1_db;
+create database priv2_db;
+use priv1_db;
+create table t1 (f1 char(20)) engine= innodb;
+create table t2 (f1 char(20)) engine= innodb;
+use priv2_db;
+create table t1 (f1 char(20)) engine= innodb;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant ALL on priv1_db.* to test_yesprivs@localhost;
+grant SELECT,UPDATE on priv2_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant SELECT,INSERT,UPDATE on priv1_db.* to test_noprivs@localhost;
+grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO `test_noprivs`@`localhost`
+GRANT SELECT, INSERT ON `priv2_db`.* TO `test_noprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,priv1_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect no_privs,localhost,test_noprivs,PWD,priv1_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+
+trigger privilege on one db1 db level, not on db2
+-------------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv1_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+use priv2_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig1_1-yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv2_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert1_no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+insert into t2 (f1) values ('insert1_no');
+select f1 from t2 order by f1;
+f1
+trig 2_1-yes
+insert into priv2_db.t1 (f1) values ('insert21-yes');
+select f1 from priv2_db.t1 order by f1;
+f1
+insert21-yes
+use priv2_db;
+insert into t1 (f1) values ('insert1_yes');
+select f1 from t1 order by f1;
+f1
+insert1_yes
+insert21-yes
+insert into priv1_db.t1 (f1) values ('insert11-no');
+select f1 from priv1_db.t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+insert into priv1_db.t2 (f1) values ('insert22-no');
+select f1 from priv1_db.t2 order by f1;
+f1
+trig 2_1-yes
+trig 2_1-yes
+
+revoke trigger privilege on table level (not existing)
+------------------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv1_db;
+revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost;
+ERROR 42000: There is no such grant defined for user 'test_yesprivs' on host 'localhost' on table 't1'
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_1;
+ERROR HY000: Trigger does not exist
+drop trigger trg2_1;
+ERROR HY000: Trigger does not exist
+use priv1_db;
+drop trigger trg1_1;
+drop trigger trg2_1;
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv1_db;
+revoke TRIGGER on priv1_db.* from test_yesprivs@localhost;
+
+no trigger privilege on table level for create:
+-----------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv1_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE HISTORY ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost`
+
+trigger privilege on table level for create:
+--------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv1_db;
+insert into t1 (f1) values ('insert2-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+insert into t2 (f1) values ('insert2-yes');
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+trig 2_1-yes
+insert into priv2_db.t1 (f1) values ('insert22-yes');
+select f1 from priv2_db.t1 order by f1;
+f1
+insert1_yes
+insert21-yes
+insert22-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv1_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
+use priv1_db;
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv1_db;
+insert into t1 (f1) values ('insert3-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+insert into t2 (f1) values ('insert3-no');
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+trig 2_1-yes
+trig 2_1-yes
+use priv2_db;
+insert into priv1_db.t1 (f1) values ('insert12-no');
+select f1 from priv1_db.t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+insert into priv1_db.t2 (f1) values ('insert23-no');
+select f1 from priv1_db.t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+trig 2_1-yes
+trig 2_1-yes
+trig 2_1-yes
+disconnect no_privs;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_2;
+drop trigger trg2_1;
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv1_db;
+drop database if exists priv2_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+#### Testcase for trigger privilege on execution time ########
+--------------------------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= innodb;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+create User test_useprivs@localhost;
+set password for test_useprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+grant select, insert, update ,trigger
+on priv_db.t1 to test_yesprivs@localhost
+with grant option;
+grant select
+on priv_db.t1 to test_useprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+grant insert on t1 to test_useprivs@localhost;
+prepare ins1 from 'insert into t1 (f1) values (''insert1-no'')';
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
+connect use_privs,localhost,test_useprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+prepare ins1 from 'insert into t1 (f1) values (''insert3-no'')';
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert4-no'')';
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert6-no'')';
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert7-no'')';
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+deallocate prepare ins1;
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+deallocate prepare ins1;
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_1;
+connection default;
+select current_user;
+current_user
+root@localhost
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_useprivs@localhost;
+
+######### Testcase for definer: ########
+-----------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= innodb;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+create definer=not_ex_user@localhost trigger trg1_0
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_0-yes';
+Warnings:
+Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
+drop trigger trg1_0;
+create definer=test_yesprivs@localhost trigger trg1_0
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_0-yes';
+grant select, insert, update
+on priv_db.t1 to test_yesprivs@localhost;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+drop trigger trg1_0;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+grant select, insert, update ,trigger
+on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_0-yes
+drop trigger trg1_0;
+create definer=not_ex_user@localhost trigger trg1_0
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_0-yes';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
+create definer=current_user trigger trg1_1
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_0-yes
+trig 1_1-yes
+create definer=test_yesprivs@localhost trigger trg1_2
+before UPDATE on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+update t1 set f1 = 'update-yes' where f1 like '%trig%';
+select f1 from t1 order by f1;
+f1
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant trigger on priv_db.* to test_yesprivs@localhost
+with grant option;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+create definer=not_ex_user@localhost trigger trg1_3
+after UPDATE on t1 for each row
+set @var1 = 'trig 1_3-yes';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
+connection default;
+select current_user;
+current_user
+root@localhost
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+
+######### Testcase for transactions: ########
+----------------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= innodb;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+connection default;
+select current_user;
+current_user
+root@localhost
+grant select, insert, update ,trigger
+on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+set autocommit=0;
+create definer=current_user trigger trg1_1
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+rollback work;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+create definer=test_yesprivs@localhost trigger trg1_2
+before UPDATE on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+commit work;
+update t1 set f1 = 'update-yes' where f1 like '%trig%';
+select f1 from t1 order by f1;
+f1
+trig 1_2-yes
+commit work;
+drop trigger trg1_1;
+rollback work;
+drop trigger trg1_1;
+ERROR HY000: Trigger does not exist
+drop trigger trg1_2;
+commit work;
+set autocommit=1;
+connection default;
+select current_user;
+current_user
+root@localhost
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+
+####### Testcase for column privileges of triggers: #######
+-----------------------------------------------------------
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= innodb;
+create table t2 (f1 char(20)) engine= innodb;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE ON `priv_db`.* TO `test_noprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connect no_privs,localhost,test_noprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs;
+
+update only on column:
+----------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t1
+to test_yesprivs@localhost;
+grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t2
+to test_yesprivs@localhost;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert1-yes');
+insert into t2 (f1) values ('insert1-yes');
+create trigger trg1_1 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+create trigger trg2_1 before UPDATE on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+select f1 from t1 order by f1;
+f1
+insert1-yes
+update t1 set f1 = 'update1_no'
+ where f1 like '%insert%';
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+select f1 from t2 order by f1;
+f1
+insert1-yes
+update t2 set f1 = 'update1_no'
+ where f1 like '%insert%';
+select f1 from t2 order by f1;
+f1
+trig 2_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke UPDATE on priv_db.*
+from test_yesprivs@localhost;
+revoke UPDATE(f1) on priv_db.t2
+from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert2-yes');
+insert into t2 (f1) values ('insert2-yes');
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f1 = 'update2_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update2_no'
+ where f1 like '%insert%';
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2'
+update t1 set f1 = 'update3_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update3_no'
+ where f1 like '%insert%';
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2'
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+
+check if access only on one of three columns
+--------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+alter table priv_db.t1 add f2 char(20), add f3 int;
+revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+grant TRIGGER,SELECT on priv_db.t1 to test_yesprivs@localhost;
+grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 values ('insert2-yes','insert2-yes',1);
+insert into t1 values ('insert3-yes','insert3-yes',2);
+select * from t1 order by f1;
+f1 f2 f3
+insert2-yes insert2-yes 1
+insert3-yes insert3-yes 2
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f1 = 'update4-no',
+f2 = 'update4-yes',
+f3 = f3*10
+where f2 like '%yes';
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update4-yes 10
+trig 1_1-yes update4-yes 20
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg1_2 after UPDATE on t1 for each row
+set @f2 = 'trig 1_2-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+update t1 set f1 = 'update5-yes',
+f2 = 'update5-yes'
+ where f2 like '%yes';
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update5-yes 10
+trig 1_1-yes update5-yes 20
+select @f2;
+@f2
+trig 1_2-yes
+update t1 set f1 = 'update6_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update6_no'
+ where f1 like '%insert%';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+update t1 set f1 = 'update7_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update7_no'
+ where f1 like '%insert%';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+
+check if rejected without trigger privilege:
+--------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+update t1 set f1 = 'update8-no',
+f2 = 'update8-no'
+ where f2 like '%yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update5-yes 10
+trig 1_1-yes update5-yes 20
+select @f2;
+@f2
+trig 1_2-yes
+
+check trigger, but not update privilege on column:
+--------------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost;
+grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1
+to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+drop trigger trg1_1;
+create trigger trg1_3 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_3-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f1 = 'update9-no',
+f2 = 'update9-no'
+ where f2 like '%yes';
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update5-yes 10
+trig 1_1-yes update5-yes 20
+update t1 set f3= f3+1;
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select f3 from t1 order by f3;
+f3
+NULL
+NULL
+10
+20
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+grant UPDATE(f1),UPDATE(f2),UPDATE(f3) on priv_db.t1
+to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f3= f3+1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f3 from t1 order by f3;
+f3
+NULL
+NULL
+10
+20
+
+##### trigger privilege on column level? #######
+------------------------------------------------
+grant TRIGGER(f1) on priv_db.t1 to test_yesprivs@localhost;
+ERROR 42000: 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 '(f1) on priv_db.t1 to test_yesprivs@localhost' at line 1
+disconnect yes_privs;
+disconnect no_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
new file mode 100644
index 00000000..281e4e8d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
@@ -0,0 +1,496 @@
+set sql_mode="";
+set GLOBAL sql_mode="";
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase: 3.5:
+--------------
+create User test_general@localhost;
+set password for test_general@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
+create User test_super@localhost;
+set password for test_super@localhost = password('PWD');
+grant ALL on *.* to test_super@localhost with grant OPTION;
+connect con1_general,localhost,test_general,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection con1_general;
+connect con1_super,localhost,test_super,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection con1_super;
+connection default;
+
+Testcase 3.5.4:
+---------------
+connection default;
+use test;
+
+Testcase 3.5.4.1:
+-----------------
+connection con1_super;
+create database db_drop;
+Use db_drop;
+create table t1 (f1 char(30)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on db_drop.t1 to test_general;
+Use db_drop;
+Create trigger trg1 BEFORE INSERT on t1
+for each row set new.f1='Trigger 3.5.4.1';
+connection con1_general;
+Use db_drop;
+Insert into t1 values ('Insert error 3.5.4.1');
+Select * from t1 order by f1;
+f1
+Trigger 3.5.4.1
+connection con1_super;
+drop trigger trg1;
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where trigger_schema = 'db_drop'
+ order by trigger_name;
+trigger_schema trigger_name event_object_table
+connection con1_general;
+Insert into t1 values ('Insert no trigger 3.5.4.1');
+Select * from t1 order by f1;
+f1
+Insert no trigger 3.5.4.1
+Trigger 3.5.4.1
+connection con1_super;
+drop trigger trg1;
+drop database if exists db_drop;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.4.2:
+-----------------
+connection con1_super;
+create database db_drop2;
+Use db_drop2;
+drop table if exists t1_432 ;
+create table t1_432 (f1 char (30)) engine = <engine_to_be_used>;
+Drop trigger tr_does_not_exit;
+ERROR HY000: Trigger does not exist
+drop table if exists t1_432 ;
+drop database if exists db_drop2;
+
+Testcase 3.5.4.3:
+-----------------
+connection con1_super;
+create database db_drop3;
+Use db_drop3;
+drop table if exists t1_433 ;
+drop table if exists t1_433a ;
+create table t1_433 (f1 char (30)) engine = <engine_to_be_used>;
+create table t1_433a (f1a char (5)) engine = <engine_to_be_used>;
+CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
+set new.f1 = 'Trigger 3.5.4.3';
+Drop trigger t1.433.trg3;
+ERROR 42000: 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 '.trg3' at line 1
+Drop trigger db_drop3.t1.433.trg3;
+ERROR 42000: 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 '.433.trg3' at line 1
+Drop trigger mysql.trg3;
+ERROR HY000: Trigger does not exist
+Drop trigger tbx.trg3;
+ERROR HY000: Trigger does not exist
+Drop trigger db_drop3.trg3;
+drop table if exists t1_433;
+drop table if exists t1_433a;
+drop database if exists db_drop3;
+
+Testcase 3.5.4.4:
+-----------------
+connection con1_super;
+create database db_drop4;
+Use db_drop4;
+create table t1 (f1 char(30)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on db_drop4.t1 to test_general;
+Create trigger trg4 BEFORE INSERT on t1
+for each row set new.f1='Trigger 3.5.4.4';
+connection con1_general;
+Use db_drop4;
+Insert into t1 values ('Insert 3.5.4.4');
+Select * from t1;
+f1
+Trigger 3.5.4.4
+connection con1_super;
+Drop database db_drop4;
+Show databases like 'db_drop4';
+Database (db_drop4)
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where information_schema.triggers.trigger_name='trg4';
+trigger_schema trigger_name event_object_table
+create database db_drop4;
+Use db_drop4;
+create table t1 (f1 char(30)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on db_drop4.t1 to test_general;
+connection con1_general;
+Insert into t1 values ('2nd Insert 3.5.4.4');
+Select * from t1;
+f1
+2nd Insert 3.5.4.4
+connection con1_super;
+drop trigger trg4;
+ERROR HY000: Trigger does not exist
+drop database if exists db_drop4;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.4.5:
+-----------------
+connection con1_super;
+create database db_drop5;
+Use db_drop5;
+create table t1 (f1 char(50)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on t1 to test_general;
+Create trigger trg5 BEFORE INSERT on t1
+for each row set new.f1='Trigger 3.5.4.5';
+connection con1_general;
+Use db_drop5;
+Insert into t1 values ('Insert 3.5.4.5');
+Select * from t1;
+f1
+Trigger 3.5.4.5
+connection con1_super;
+Drop table t1;
+Show tables;
+Tables_in_db_drop5
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where information_schema.triggers.trigger_name='trg5';
+trigger_schema trigger_name event_object_table
+create table t1 (f1 char(50)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on t1 to test_general;
+connection con1_general;
+Insert into t1 values ('2nd Insert 3.5.4.5');
+Select * from t1;
+f1
+2nd Insert 3.5.4.5
+connection con1_super;
+drop trigger trg5;
+ERROR HY000: Trigger does not exist
+drop database if exists db_drop5;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.5:
+---------------
+connection default;
+use test;
+
+Testcase 3.5.5.1:
+-----------------
+Create trigger trg1 before INSERT on t100 for each row set new.f2=1000;
+ERROR 42S02: Table 'test.t100' doesn't exist
+
+Testcase 3.5.5.2:
+-----------------
+Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
+Create trigger trg2 before INSERT
+on t1_temp for each row set new.f2=9999;
+ERROR HY000: Trigger's 't1_temp' is a view, temporary table or sequence
+drop table t1_temp;
+
+Testcase 3.5.5.3:
+-----------------
+Create view vw3 as select f118 from tb3;
+Create trigger trg3 before INSERT
+on vw3 for each row set new.f118='s';
+ERROR HY000: 'test.vw3' is not of type 'BASE TABLE'
+drop view vw3;
+
+Testcase 3.5.5.4:
+-----------------
+connection con1_super;
+create database dbtest_one;
+create database dbtest_two;
+use dbtest_two;
+create table t2 (f1 char(15)) engine = <engine_to_be_used>;
+use dbtest_one;
+create trigger trg4 before INSERT
+on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
+ERROR HY000: Trigger in wrong schema
+grant INSERT, SELECT on dbtest_two.t2 to test_general;
+grant SELECT on dbtest_one.* to test_general;
+connection con1_general;
+use dbtest_two;
+Insert into t2 values ('1st Insert 3.5.5.4');
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
+Select * from t2;
+f1
+1st Insert 3.5.
+use dbtest_one;
+Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4');
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
+Select * from dbtest_two.t2 order by f1;
+f1
+1st Insert 3.5.
+2nd Insert 3.5.
+connection con1_super;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+DROP DATABASE if exists dbtest_one;
+drop database if EXISTS dbtest_two;
+
+Testcase 3.5.6:
+---------------
+connection default;
+use test;
+
+Testcase 3.5.6.1 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.6.2 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.6.3:
+-----------------
+Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25;
+ERROR 42000: 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 'DURING UPDATE on tb3 for each row set new.f132=25' at line 1
+Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15;
+ERROR 42000: 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 'TIME INSERT on tb3 for each row set new.f132=15' at line 1
+drop trigger tb3.trg3_1;
+drop trigger tb3.trg3_2;
+
+Testcase 3.5.6.4 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.6.5 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.1 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.2 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.3 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.4:
+-----------------
+Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5;
+ERROR 42000: 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 'SELECT on tb3 for each row set new.f132=5' at line 1
+Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1;
+ERROR 42000: 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 'VALUE on tb3 for each row set new.f132=1' at line 1
+drop trigger tb3.trg4_1;
+drop trigger tb3.trg4_2;
+
+Testcase 3.5.7.5 / 3.5.7.6:
+---------------------------
+Create trigger trg5_1 BEFORE INSERT
+on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
+Create trigger trg5_2 BEFORE INSERT
+on tb3 for each row set new.f122='Trigger2 3.5.7.5';
+Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
+Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
+f121 f122
+Test 3.5.7.5/6 Trigger2 3.5.7.5
+update tb3 set f122='Update 3.5.7.6' where f121= 'Test 3.5.7.5/6';
+Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
+f121 f122
+Test 3.5.7.5/6 Update 3.5.7.6
+drop trigger trg5_1;
+drop trigger trg5_2;
+delete from tb3 where f121='Test 3.5.7.5/6';
+
+Testcase 3.5.7.7 / 3.5.7.8:
+---------------------------
+set @test_var='Before trig 3.5.7.7';
+Create trigger trg6_1 AFTER INSERT
+on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
+Create trigger trg6_2 AFTER INSERT
+on tb3 for each row set @test_var='Trigger2 3.5.7.7';
+select @test_var;
+@test_var
+Before trig 3.5.7.7
+Insert into tb3 (f121,f122) values ('Test 3.5.7.7/8','Insert 3.5.7.7');
+Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
+f121 f122
+Test 3.5.7.7/8 Insert 3.5.7.7
+select @test_var;
+@test_var
+Trigger2 3.5.7.7
+update tb3 set f122='Update 3.5.7.8' where f121= 'Test 3.5.7.7/8';
+Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
+f121 f122
+Test 3.5.7.7/8 Update 3.5.7.8
+select @test_var;
+@test_var
+Trigger2 3.5.7.7
+drop trigger trg6_1;
+drop trigger trg6_2;
+delete from tb3 where f121='Test 3.5.7.7/8';
+
+Testcase 3.5.7.9/10:
+--------------------
+Create trigger trg7_1 BEFORE UPDATE
+on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
+Create trigger trg7_2 BEFORE UPDATE
+on tb3 for each row set new.f122='Trigger2 3.5.7.9';
+Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
+Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
+f121 f122
+Test 3.5.7.9/10 Insert 3.5.7.9
+update tb3 set f122='update 3.5.7.10' where f121='Test 3.5.7.9/10';
+Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
+f121 f122
+Test 3.5.7.9/10 Trigger2 3.5.7.9
+drop trigger trg7_1;
+drop trigger trg7_2;
+delete from tb3 where f121='Test 3.5.7.9/10';
+
+Testcase 3.5.7.11/12:
+---------------------
+set @test_var='Before trig 3.5.7.11';
+Create trigger trg8_1 AFTER UPDATE
+on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
+Create trigger trg8_2 AFTER UPDATE
+on tb3 for each row set @test_var='Trigger2 3.5.7.11';
+select @test_var;
+@test_var
+Before trig 3.5.7.11
+Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12');
+select @test_var;
+@test_var
+Before trig 3.5.7.11
+Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
+f121 f122
+Test 3.5.7.11/12 Insert 3.5.7.11/12
+update tb3 set f122='update 3.5.7.12' where f121='Test 3.5.7.11/12';
+Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
+f121 f122
+Test 3.5.7.11/12 update 3.5.7.12
+select @test_var;
+@test_var
+Trigger2 3.5.7.11
+delete from tb3 where f121='Test 3.5.7.11/12';
+drop trigger trg8_1;
+drop trigger trg8_2;
+delete from tb3 where f121='Test 3.5.7.11/12';
+
+Testcase 3.5.7.13/14:
+---------------------
+set @test_var=1;
+Create trigger trg9_1 BEFORE DELETE
+on tb3 for each row set @test_var=@test_var+1;
+Create trigger trg9_2 BEFORE DELETE
+on tb3 for each row set @test_var=@test_var+10;
+select @test_var;
+@test_var
+1
+Insert into tb3 (f121,f122) values ('Test 3.5.7.13/14','Insert 3.5.7.13');
+Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
+f121 f122
+Test 3.5.7.13/14 Insert 3.5.7.13
+select @test_var;
+@test_var
+1
+delete from tb3 where f121='Test 3.5.7.13/14';
+Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
+f121 f122
+select @test_var;
+@test_var
+12
+delete from tb3 where f121='Test 3.5.7.13/14';
+select @test_var;
+@test_var
+12
+drop trigger trg9_1;
+drop trigger trg9_2;
+delete from tb3 where f121='Test 3.5.7.13/14';
+
+Testcase 3.5.7.15/16:
+---------------------
+set @test_var=1;
+Create trigger trg_3_406010_1 AFTER DELETE
+on tb3 for each row set @test_var=@test_var+5;
+Create trigger trg_3_406010_2 AFTER DELETE
+on tb3 for each row set @test_var=@test_var+50;
+Create trigger trg_3_406010_1 AFTER INSERT
+on tb3 for each row set @test_var=@test_var+1;
+ERROR HY000: Trigger 'test.trg_3_406010_1' already exists
+select @test_var;
+@test_var
+1
+Insert into tb3 (f121,f122) values ('Test 3.5.7.15/16','Insert 3.5.7.15/16');
+Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
+f121 f122
+Test 3.5.7.15/16 Insert 3.5.7.15/16
+select @test_var;
+@test_var
+1
+delete from tb3 where f121='Test 3.5.7.15/16';
+Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
+f121 f122
+select @test_var;
+@test_var
+56
+delete from tb3 where f121='Test 3.5.7.15/16';
+select @test_var;
+@test_var
+56
+drop trigger trg_3_406010_1;
+drop trigger trg_3_406010_2;
+delete from tb3 where f121='Test 3.5.7.15/16';
+
+Testcase 3.5.7.17 (see Testcase 3.5.1.1)
+----------------------------------------
+connection default;
+drop user test_general@localhost;
+drop user test_general;
+drop user test_super@localhost;
+DROP TABLE test.tb3;
+set GLOBAL sql_mode=default;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result
new file mode 100644
index 00000000..52820d6b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result
@@ -0,0 +1,542 @@
+set sql_mode="";
+set GLOBAL sql_mode="";
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase: 3.5:
+--------------
+create User test_general@localhost;
+set password for test_general@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
+grant SELECT,UPDATE,DELETE,INSERT on test.* to test_general@localhost;
+create User test_super@localhost;
+set password for test_super@localhost = password('PWD');
+grant ALL on *.* to test_super@localhost with grant OPTION;
+connect con2_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect con2_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+
+Testcase 3.5.8.1: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.8.2: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.8.3/4:
+-------------------
+connection con2_super;
+create database db_test;
+grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
+grant LOCK TABLES on db_test.* to test_general;
+Use db_test;
+create table t1_i (
+i120 char ascii not null DEFAULT b'101',
+i136 smallint zerofill not null DEFAULT 999,
+i144 int zerofill not null DEFAULT 99999,
+i163 decimal (63,30)) engine=<engine_to_be_used>;
+create table t1_u (
+u120 char ascii not null DEFAULT b'101',
+u136 smallint zerofill not null DEFAULT 999,
+u144 int zerofill not null DEFAULT 99999,
+u163 decimal (63,30)) engine=<engine_to_be_used>;
+create table t1_d (
+d120 char ascii not null DEFAULT b'101',
+d136 smallint zerofill not null DEFAULT 999,
+d144 int zerofill not null DEFAULT 99999,
+d163 decimal (63,30)) engine=<engine_to_be_used>;
+Insert into t1_u values ('a',111,99999,999.99);
+Insert into t1_u values ('b',222,99999,999.99);
+Insert into t1_u values ('c',333,99999,999.99);
+Insert into t1_u values ('d',222,99999,999.99);
+Insert into t1_u values ('e',222,99999,999.99);
+Insert into t1_u values ('f',333,99999,999.99);
+Insert into t1_d values ('a',111,99999,999.99);
+Insert into t1_d values ('b',222,99999,999.99);
+Insert into t1_d values ('c',333,99999,999.99);
+Insert into t1_d values ('d',444,99999,999.99);
+Insert into t1_d values ('e',222,99999,999.99);
+Insert into t1_d values ('f',222,99999,999.99);
+
+3.5.8.4 - multiple SQL
+----------------------
+use test;
+Create trigger trg1 AFTER INSERT on tb3 for each row
+BEGIN
+insert into db_test.t1_i
+values (new.f120, new.f136, new.f144, new.f163);
+update db_test.t1_u
+set u144=new.f144, u163=new.f163
+where u136=new.f136;
+delete from db_test.t1_d where d136= new.f136;
+select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
+where u136= new.f136;
+END//
+connection con2_general;
+Use test;
+set @test_var=0;
+Insert into tb3 (f120, f122, f136, f144, f163)
+values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
+Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
+f120 f122 f136 f144 f163
+1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_i;
+i120 i136 i144 i163
+1 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_u;
+u120 u136 u144 u163
+a 00111 0000099999 999.990000000000000000000000000000
+b 00222 0000023456 1.050000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+d 00222 0000023456 1.050000000000000000000000000000
+e 00222 0000023456 1.050000000000000000000000000000
+f 00333 0000099999 999.990000000000000000000000000000
+select * from db_test.t1_d;
+d120 d136 d144 d163
+a 00111 0000099999 999.990000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+d 00444 0000099999 999.990000000000000000000000000000
+select @test_var;
+@test_var
+3.150000000000000000000000000000
+
+3.5.8.4 - single SQL - insert
+-----------------------------
+connection con2_super;
+Create trigger trg2 BEFORE UPDATE on tb3 for each row
+BEGIN
+insert into db_test.t1_i
+values (new.f120, new.f136, new.f144, new.f163);
+END//
+connection con2_general;
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_i order by i120;
+i120 i136 i144 i163
+1 00222 0000023456 1.050000000000000000000000000000
+update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert'
+ where f122='Test 3.5.8.4';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_i order by i120;
+i120 i136 i144 i163
+1 00222 0000023456 1.050000000000000000000000000000
+I 00222 0000023456 1.050000000000000000000000000000
+
+3.5.8.4 - single SQL - update
+-----------------------------
+connection con2_super;
+drop trigger trg2;
+Create trigger trg3 BEFORE UPDATE on tb3 for each row
+update db_test.t1_u
+set u120=new.f120
+where u136=new.f136;
+connection con2_general;
+update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
+ where f122='Test 3.5.8.4-Single Insert';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_u order by u120;
+u120 u136 u144 u163
+a 00111 0000099999 999.990000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+f 00333 0000099999 999.990000000000000000000000000000
+U 00222 0000023456 1.050000000000000000000000000000
+U 00222 0000023456 1.050000000000000000000000000000
+U 00222 0000023456 1.050000000000000000000000000000
+
+3.5.8.3/4 - single SQL - delete
+-------------------------------
+connection con2_super;
+drop trigger trg3;
+Create trigger trg4 AFTER UPDATE on tb3 for each row
+delete from db_test.t1_d where d136= new.f136;
+connection con2_general;
+update tb3 set f120='D', f136=444,
+f122='Test 3.5.8.4-Single Delete'
+ where f122='Test 3.5.8.4-Single Update';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_d order by d120;
+d120 d136 d144 d163
+a 00111 0000099999 999.990000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+
+3.5.8.3/4 - single SQL - select
+-------------------------------
+connection con2_super;
+drop trigger trg4;
+Create trigger trg5 AFTER UPDATE on tb3 for each row
+select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
+where u136= new.f136;
+connection con2_general;
+set @test_var=0;
+update tb3 set f120='S', f136=111,
+f122='Test 3.5.8.4-Single Select'
+ where f122='Test 3.5.8.4-Single Delete';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+S Test 3.5.8.4-Single Select 00111 0000023456 1.050000000000000000000000000000
+select @test_var;
+@test_var
+999.990000000000000000000000000000
+connection default;
+drop trigger trg1;
+drop trigger trg5;
+drop database if exists db_test;
+delete from tb3 where f122 like 'Test 3.5.8.4%';
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.8.5 (IF):
+----------------------
+create trigger trg2 before insert on tb3 for each row
+BEGIN
+IF new.f120='1' then
+set @test_var='one', new.f120='2';
+ELSEIF new.f120='2' then
+set @test_var='two', new.f120='3';
+ELSEIF new.f120='3' then
+set @test_var='three', new.f120='4';
+END IF;
+IF (new.f120='4') and (new.f136=10) then
+set @test_var2='2nd if', new.f120='d';
+ELSE
+set @test_var2='2nd else', new.f120='D';
+END IF;
+END//
+set @test_var='Empty', @test_var2=0;
+Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+D Test 3.5.8.5-if 00101 one 2nd else
+Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+D Test 3.5.8.5-if 00101 two 2nd else
+D Test 3.5.8.5-if 00102 two 2nd else
+Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+d Test 3.5.8.5-if 00010 three 2nd if
+D Test 3.5.8.5-if 00101 three 2nd if
+D Test 3.5.8.5-if 00102 three 2nd if
+Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+d Test 3.5.8.5-if 00010 three 2nd else
+D Test 3.5.8.5-if 00101 three 2nd else
+D Test 3.5.8.5-if 00102 three 2nd else
+D Test 3.5.8.5-if 00103 three 2nd else
+create trigger trg3 before update on tb3 for each row
+BEGIN
+ELSEIF new.f120='2' then
+END IF;
+END//
+ERROR 42000: 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 'ELSEIF new.f120='2' then
+END IF;
+END' at line 3
+drop trigger trg3//
+create trigger trg4 before update on tb3 for each row
+BEGIN
+IF (new.f120='4') and (new.f136=10) then
+set @test_var2='2nd if', new.f120='d';
+ELSE
+set @test_var2='2nd else', new.f120='D';
+END//
+ERROR 42000: 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 7
+drop trigger trg4;
+drop trigger trg2;
+delete from tb3 where f121='Test 3.5.8.5-if';
+
+Testcase 3.5.8.5-case:
+----------------------
+create trigger trg3 before insert on tb3 for each row
+BEGIN
+SET new.f120=char(ascii(new.f120)-32);
+CASE
+when new.f136<100 then set new.f136=new.f136+120;
+when new.f136<10 then set new.f144=777;
+when new.f136>100 then set new.f120=new.f136-1;
+END case;
+CASE
+when new.f136=200 then set @test_var=CONCAT(new.f120, '=');
+ELSE set @test_var=concat(new.f120, '*');
+END case;
+CASE new.f144
+when 1 then set @test_var=concat(@test_var, 'one');
+when 2 then set @test_var=concat(@test_var, 'two');
+when 3 then set @test_var=concat(@test_var, 'three');
+when 4 then set @test_var=concat(@test_var, 'four');
+when 5 then set @test_var=concat(@test_var, 'five');
+when 6 then set @test_var=concat(@test_var, 'six');
+when 7 then set @test_var=concat(@test_var, 'seven');
+when 8 then set @test_var=concat(@test_var, 'eight');
+when 9 then set @test_var=concat(@test_var, 'nine');
+when 10 then set @test_var=concat(@test_var, 'ten');
+when 11 then set @test_var=concat(@test_var, 'eleven');
+when 12 then set @test_var=concat(@test_var, 'twelve');
+when 13 then set @test_var=concat(@test_var, 'thirteen');
+when 14 then set @test_var=concat(@test_var, 'fourteen');
+when 15 then set @test_var=concat(@test_var, 'fifteen');
+ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
+END case;
+END//
+set @test_var='Empty';
+Insert into tb3 (f120, f122, f136, f144)
+values ('a', 'Test 3.5.8.5-case', 5, 7);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+A Test 3.5.8.5-case 00125 0000000007 A*seven
+Insert into tb3 (f120, f122, f136, f144)
+values ('b', 'Test 3.5.8.5-case', 71,16);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+A Test 3.5.8.5-case 00125 0000000007 B*0000000016
+B Test 3.5.8.5-case 00191 0000000016 B*0000000016
+Insert into tb3 (f120, f122, f136, f144)
+values ('c', 'Test 3.5.8.5-case', 80,1);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+A Test 3.5.8.5-case 00125 0000000007 C=one
+B Test 3.5.8.5-case 00191 0000000016 C=one
+C Test 3.5.8.5-case 00200 0000000001 C=one
+Insert into tb3 (f120, f122, f136)
+values ('d', 'Test 3.5.8.5-case', 152);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
+A Test 3.5.8.5-case 00125 0000000007 1*0000099999
+B Test 3.5.8.5-case 00191 0000000016 1*0000099999
+C Test 3.5.8.5-case 00200 0000000001 1*0000099999
+Insert into tb3 (f120, f122, f136, f144)
+values ('e', 'Test 3.5.8.5-case', 200, 8);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+1 Test 3.5.8.5-case 00152 0000099999 1=eight
+1 Test 3.5.8.5-case 00200 0000000008 1=eight
+A Test 3.5.8.5-case 00125 0000000007 1=eight
+B Test 3.5.8.5-case 00191 0000000016 1=eight
+C Test 3.5.8.5-case 00200 0000000001 1=eight
+Insert into tb3 (f120, f122, f136, f144)
+values ('f', 'Test 3.5.8.5-case', 100, 8);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+1 Test 3.5.8.5-case 00152 0000099999 1=eight
+1 Test 3.5.8.5-case 00200 0000000008 1=eight
+A Test 3.5.8.5-case 00125 0000000007 1=eight
+B Test 3.5.8.5-case 00191 0000000016 1=eight
+C Test 3.5.8.5-case 00200 0000000001 1=eight
+create trigger trg3a before update on tb3 for each row
+BEGIN
+CASE
+when new.f136<100 then set new.f120='p';
+END//
+ERROR 42000: 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 5
+drop trigger trg3a;
+drop trigger trg3;
+delete from tb3 where f121='Test 3.5.8.5-case';
+
+Testcase 3.5.8.5-loop/leave:
+----------------------------
+Create trigger trg4 after insert on tb3 for each row
+BEGIN
+set @counter=0, @flag='Initial';
+Label1: loop
+if new.f136<new.f144 then
+set @counter='Nothing to loop';
+leave Label1;
+else
+set @counter=@counter+1;
+if new.f136=new.f144+@counter then
+set @counter=concat(@counter, ' loops');
+leave Label1;
+end if;
+end if;
+iterate label1;
+set @flag='Final';
+END loop Label1;
+END//
+Insert into tb3 (f122, f136, f144)
+values ('Test 3.5.8.5-loop', 2, 8);
+select @counter, @flag;
+@counter @flag
+Nothing to loop Initial
+Insert into tb3 (f122, f136, f144)
+values ('Test 3.5.8.5-loop', 11, 8);
+select @counter, @flag;
+@counter @flag
+3 loops Initial
+Create trigger trg4_2 after update on tb3 for each row
+BEGIN
+Label1: loop
+set @counter=@counter+1;
+END;
+END//
+ERROR 42000: 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 ';
+END' at line 5
+drop trigger trg4_2;
+drop trigger trg4;
+delete from tb3 where f122='Test 3.5.8.5-loop';
+
+Testcase 3.5.8.5-repeat:
+------------------------
+Create trigger trg6 after insert on tb3 for each row
+BEGIN
+rp_label: REPEAT
+SET @counter1 = @counter1 + 1;
+IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
+END IF;
+SET @counter2 = @counter2 + 1;
+UNTIL @counter1> new.f136 END REPEAT rp_label;
+END//
+set @counter1= 0, @counter2= 0;
+Insert into tb3 (f122, f136)
+values ('Test 3.5.8.5-repeat', 13);
+select @counter1, @counter2;
+@counter1 @counter2
+15 8
+Create trigger trg6_2 after update on tb3 for each row
+BEGIN
+REPEAT
+SET @counter2 = @counter2 + 1;
+END//
+ERROR 42000: 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 'END' at line 5
+drop trigger trg6;
+delete from tb3 where f122='Test 3.5.8.5-repeat';
+
+Testcase 3.5.8.5-while:
+-----------------------
+Create trigger trg7 after insert on tb3 for each row
+wl_label: WHILE @counter1 < new.f136 DO
+SET @counter1 = @counter1 + 1;
+IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
+END IF;
+SET @counter2 = @counter2 + 1;
+END WHILE wl_label//
+set @counter1= 0, @counter2= 0;
+Insert into tb3 (f122, f136)
+values ('Test 3.5.8.5-while', 7);
+select @counter1, @counter2;
+@counter1 @counter2
+7 4
+Create trigger trg7_2 after update on tb3 for each row
+BEGIN
+WHILE @counter1 < new.f136
+SET @counter1 = @counter1 + 1;
+END//
+ERROR 42000: 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 'SET @counter1 = @counter1 + 1;
+END' at line 4
+delete from tb3 where f122='Test 3.5.8.5-while';
+drop trigger trg7;
+
+Testcase 3.5.8.6: (requirement void)
+------------------------------------
+CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END//
+CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW
+BEGIN
+CALL sp_01 ();
+END//
+Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101);
+update tb3 set f120='S', f136=111,
+f122='Test 3.5.8.6-tr8_1'
+ where f122='Test 3.5.8.6-insert';
+select f120, f122
+from tb3 where f122 like 'Test 3.5.8.6%' order by f120;
+f120 f122
+S Test 3.5.8.6-tr8_1
+DROP TRIGGER trg8_1;
+DROP PROCEDURE sp_01;
+
+Testcase 3.5.8.7
+----------------
+Create trigger trg9_1 before update on tb3 for each row
+BEGIN
+Start transaction;
+Set new.f120='U';
+Commit;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+Create trigger trg9_2 before delete on tb3 for each row
+BEGIN
+Start transaction;
+Set @var2=old.f120;
+Rollback;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+connection default;
+drop user test_general@localhost;
+drop user test_general;
+drop user test_super@localhost;
+DROP TABLE test.tb3;
+set GLOBAL sql_mode=default;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_09.result b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
new file mode 100644
index 00000000..89815594
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
@@ -0,0 +1,267 @@
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
+
+Testcase 3.5.9.1/2:
+-------------------
+Create trigger trg1 BEFORE UPDATE on tb3 for each row
+set new.f142 = 94087, @counter=@counter+1;
+TotalRows
+10
+Affected
+9
+NotAffected
+1
+NewValuew
+0
+set @counter=0;
+Update tb3 Set f142='1' where f130<100;
+select count(*) as ExpectedChanged, @counter as TrigCounter
+from tb3 where f142=94087;
+ExpectedChanged TrigCounter
+9 9
+select count(*) as ExpectedNotChange from tb3
+where f130<100 and f142<>94087;
+ExpectedNotChange
+0
+select count(*) as NonExpectedChanged from tb3
+where f130>=130 and f142=94087;
+NonExpectedChanged
+0
+drop trigger trg1;
+
+Testcase 3.5.9.3:
+-----------------
+Create trigger trg2_a before update on tb3 for each row
+set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
+@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
+@tr_var_b4_163=old.f163;
+Create trigger trg2_b after update on tb3 for each row
+set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
+@tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
+@tr_var_af_163=old.f163;
+Create trigger trg2_c before delete on tb3 for each row
+set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
+@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
+@tr_var_b4_163=old.f163;
+Create trigger trg2_d after delete on tb3 for each row
+set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
+@tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
+@tr_var_af_163=old.f163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+0 0 0 0 0
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+0 0 0 0 0
+Insert into tb3 (f122, f136, f163)
+values ('Test 3.5.9.3', 7, 123.17);
+Update tb3 Set f136=8 where f122='Test 3.5.9.3';
+select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
+f118 f121 f122 f136 f163
+a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+0 0 0 0 0
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+0 0 0 0 0
+delete from tb3 where f122='Test 3.5.9.3';
+select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
+f118 f121 f122 f136 f163
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
+drop trigger trg2_a;
+drop trigger trg2_b;
+drop trigger trg2_c;
+drop trigger trg2_d;
+
+Testcase 3.5.9.4:
+-----------------
+Create trigger trg3_a before insert on tb3 for each row
+set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
+@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
+@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
+Create trigger trg3_b after insert on tb3 for each row
+set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
+@tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
+@tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
+Create trigger trg3_c before update on tb3 for each row
+set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
+@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
+@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
+Create trigger trg3_d after update on tb3 for each row
+set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
+@tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
+@tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+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
+Insert into tb3 (f122, f136, f151, f163)
+values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
+select f118, f121, f122, f136, f151, f163 from tb3
+where f122 like 'Test 3.5.9.4%' order by f163;
+f118 f121 f122 f136 f151 f163
+a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
+a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+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 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
+select f118, f121, f122, f136, f151, f163 from tb3
+where f122 like 'Test 3.5.9.4-trig' order by f163;
+f118 f121 f122 f136 f151 f163
+a NULL Test 3.5.9.4-trig 00000 999 NULL
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+a NULL Test 3.5.9.4-trig NULL 999 NULL
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
+a NULL Test 3.5.9.4-trig 0 999 NULL
+drop trigger trg3_a;
+drop trigger trg3_b;
+drop trigger trg3_c;
+drop trigger trg3_d;
+delete from tb3 where f122='Test 3.5.9.4-trig';
+
+Testcase 3.5.9.5: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.9.6:
+-----------------
+create trigger trg4a before insert on tb3 for each row
+set @temp1= old.f120;
+ERROR HY000: There is no OLD row in on INSERT trigger
+create trigger trg4b after insert on tb3 for each row
+set old.f120= 'test';
+ERROR HY000: Updating of OLD row is not allowed in trigger
+drop trigger trg4a;
+drop trigger trg4b;
+
+Testcase 3.5.9.7: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.9.8: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.9.9:
+-----------------
+create trigger trg5a before DELETE on tb3 for each row
+set @temp1=new.f122;
+ERROR HY000: There is no NEW row in on DELETE trigger
+create trigger trg5b after DELETE on tb3 for each row
+set new.f122='test';
+ERROR HY000: There is no NEW row in on DELETE trigger
+drop trigger trg5a;
+drop trigger trg5b;
+
+Testcase 3.5.9.10: (implied in previous tests)
+----------------------------------------------
+
+Testcase 3.5.9.11: covered by 3.5.9.9
+-------------------------------------
+
+Testcase 3.5.9.12: covered by 3.5.9.6
+-------------------------------------
+
+Testcase 3.5.9.13:
+------------------
+create trigger trg6a before UPDATE on tb3 for each row
+set old.f118='C', new.f118='U';
+ERROR HY000: Updating of OLD row is not allowed in trigger
+create trigger trg6b after INSERT on tb3 for each row
+set old.f136=163, new.f118='U';
+ERROR HY000: Updating of OLD row is not allowed in trigger
+create trigger trg6c after UPDATE on tb3 for each row
+set old.f136=NULL;
+ERROR HY000: Updating of OLD row is not allowed in trigger
+drop trigger trg6a;
+drop trigger trg6b;
+drop trigger trg6c;
+
+Testcase 3.5.9.14: (implied in previous tests)
+----------------------------------------------
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
new file mode 100644
index 00000000..9e09c50d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
@@ -0,0 +1,397 @@
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
+
+Testcase 3.5.10.1/2/3:
+----------------------
+Create view vw11 as select * from tb3
+where f122 like 'Test 3.5.10.1/2/3%';
+Create trigger trg1a before insert on tb3
+for each row set new.f163=111.11;
+Create trigger trg1b after insert on tb3
+for each row set @test_var='After Insert';
+Create trigger trg1c before update on tb3
+for each row set new.f121='Y', new.f122='Test 3.5.10.1/2/3-Update';
+Create trigger trg1d after update on tb3
+for each row set @test_var='After Update';
+Create trigger trg1e before delete on tb3
+for each row set @test_var=5;
+Create trigger trg1f after delete on tb3
+for each row set @test_var= 2* @test_var+7;
+Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1);
+Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2);
+Insert into vw11 (f122, f151) values ('Not in View', 3);
+select f121, f122, f151, f163
+from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+f121 f122 f151 f163
+NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
+NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
+select f121, f122, f151, f163 from vw11;
+f121 f122 f151 f163
+NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
+NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
+select f121, f122, f151, f163
+from tb3 where f122 like 'Not in View';
+f121 f122 f151 f163
+NULL Not in View 3 111.110000000000000000000000000000
+Update vw11 set f163=1;
+select f121, f122, f151, f163 from tb3
+where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+select f121, f122, f151, f163 from vw11;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+set @test_var=0;
+Select @test_var as 'before delete';
+before delete
+0
+delete from vw11 where f151=1;
+select f121, f122, f151, f163 from tb3
+where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+select f121, f122, f151, f163 from vw11;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+Select @test_var as 'after delete';
+after delete
+17
+drop view vw11;
+drop trigger trg1a;
+drop trigger trg1b;
+drop trigger trg1c;
+drop trigger trg1d;
+drop trigger trg1e;
+drop trigger trg1f;
+delete from tb3 where f122 like 'Test 3.5.10.1/2/3%';
+
+Testcase 3.5.10.4:
+------------------
+create table tb_load (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
+Create trigger trg4 before insert on tb_load
+for each row set new.f3=-(new.f1 div 5), @counter= @counter+1;
+set @counter= 0;
+select @counter as 'Rows Loaded Before';
+Rows Loaded Before
+0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table tb_load;
+select @counter as 'Rows Loaded After';
+Rows Loaded After
+10
+Select * from tb_load order by f1 limit 10;
+f1 f2 f3
+-5000 a` 1000
+-4999 aaa 999
+-4998 abaa 999
+-4997 acaaa 999
+-4996 adaaaa 999
+-4995 aeaaaaa 999
+-4994 afaaaaaa 998
+-4993 agaaaaaaa 998
+-4992 a^aaaaaaaa 998
+-4991 a_aaaaaaaaa 998
+drop trigger trg4;
+drop table tb_load;
+
+Testcase 3.5.10.5: (implemented in trig_frkey.test)
+---------------------------------------------------
+
+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;
+create procedure trig_sp()
+begin
+declare done int default 0;
+declare var151 decimal;
+declare var136 tinyint;
+declare cur1 cursor for select f136, f151 from tb3;
+declare continue handler for sqlstate '01000' set done = 1;
+open cur1;
+fetch cur1 into var136, var151;
+wl_loop: WHILE NOT done DO
+insert into t1_sp values (var136, var151);
+fetch cur1 into var136, var151;
+END WHILE wl_loop;
+close cur1;
+end//
+set @counter=0;
+select @counter;
+@counter
+0
+call trig_sp();
+ERROR 02000: No data - zero rows fetched, selected, or processed
+select @counter;
+@counter
+11
+select count(*) from tb3;
+count(*)
+11
+select count(*) from t1_sp;
+count(*)
+11
+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)
+-------------------------------------------------
+
+Testcase y.y.y.2: Check for triggers starting triggers
+------------------------------------------------------
+use test;
+drop table if exists t1;
+drop table if exists t2_1;
+drop table if exists t2_2;
+drop table if exists t2_3;
+drop table if exists t2_4;
+drop table if exists t3;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+create table t2_1 (f1 integer) engine = <engine_to_be_used>;
+create table t2_2 (f1 integer) engine = <engine_to_be_used>;
+create table t2_3 (f1 integer) engine = <engine_to_be_used>;
+create table t2_4 (f1 integer) engine = <engine_to_be_used>;
+create table t3 (f1 integer) engine = <engine_to_be_used>;
+insert into t1 values (1);
+create trigger tr1 after insert on t1 for each row
+BEGIN
+insert into t2_1 (f1) values (new.f1+1);
+insert into t2_2 (f1) values (new.f1+1);
+insert into t2_3 (f1) values (new.f1+1);
+insert into t2_4 (f1) values (new.f1+1);
+END//
+create trigger tr2_1 after insert on t2_1 for each row
+insert into t3 (f1) values (new.f1+10);
+create trigger tr2_2 after insert on t2_2 for each row
+insert into t3 (f1) values (new.f1+100);
+create trigger tr2_3 after insert on t2_3 for each row
+insert into t3 (f1) values (new.f1+1000);
+create trigger tr2_4 after insert on t2_4 for each row
+insert into t3 (f1) values (new.f1+10000);
+insert into t1 values (1);
+select * from t3 order by f1;
+f1
+12
+102
+1002
+10002
+drop trigger tr1;
+drop trigger tr2_1;
+drop trigger tr2_2;
+drop trigger tr2_3;
+drop trigger tr2_4;
+drop table t1, t2_1, t2_2, t2_3, t2_4, t3;
+
+Testcase y.y.y.3: Circular trigger reference
+--------------------------------------------
+use test;
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+drop table if exists t4;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+create table t2 (f2 integer) engine = <engine_to_be_used>;
+create table t3 (f3 integer) engine = <engine_to_be_used>;
+create table t4 (f4 integer) engine = <engine_to_be_used>;
+insert into t1 values (0);
+create trigger tr1 after insert on t1
+for each row insert into t2 (f2) values (new.f1+1);
+create trigger tr2 after insert on t2
+for each row insert into t3 (f3) values (new.f2+1);
+create trigger tr3 after insert on t3
+for each row insert into t4 (f4) values (new.f3+1);
+create trigger tr4 after insert on t4
+for each row insert into t1 (f1) values (new.f4+1);
+insert into t1 values (1);
+ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
+select * from t1 order by f1;
+f1
+0
+select * from t2 order by f2;
+f2
+select * from t3 order by f3;
+f3
+select * from t4 order by f4;
+f4
+drop trigger tr1;
+drop trigger tr2;
+drop trigger tr3;
+drop trigger tr4;
+drop table t1;
+drop table t2;
+drop table t3;
+drop table t4;
+
+Testcase y.y.y.4: Recursive trigger/SP references
+-------------------------------------------------
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
+create table t1_sp (
+count integer,
+var136 tinyint,
+var151 decimal) engine = <engine_to_be_used>;
+create procedure trig_sp()
+begin
+declare done int default 0;
+declare var151 decimal;
+declare var136 tinyint;
+declare cur1 cursor for select f136, f151 from tb3;
+declare continue handler for sqlstate '01000' set done = 1;
+set @counter= @counter+1;
+open cur1;
+fetch cur1 into var136, var151;
+wl_loop: WHILE NOT done DO
+insert into t1_sp values (@counter, var136, var151);
+fetch cur1 into var136, var151;
+END WHILE wl_loop;
+close cur1;
+end//
+create trigger trg before insert on t1_sp
+for each row call trig_sp();
+set @counter=0;
+select @counter;
+@counter
+0
+call trig_sp();
+ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine trig_sp
+select @counter;
+@counter
+1
+select count(*) from tb3;
+count(*)
+11
+select count(*) from t1_sp;
+count(*)
+0
+set @@max_sp_recursion_depth= 10;
+set @counter=0;
+select @counter;
+@counter
+0
+call trig_sp();
+ERROR HY000: Can't update table 't1_sp' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
+select @counter;
+@counter
+2
+select count(*) from tb3;
+count(*)
+11
+select count(*) from t1_sp;
+count(*)
+0
+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
+-------------------------------------------------------
+set @@sql_mode='traditional';
+use test;
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+drop table if exists t4;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+create table t2 (f2 integer) engine = <engine_to_be_used>;
+create table t3 (f3 integer) engine = <engine_to_be_used>;
+create table t4 (f4 tinyint) engine = <engine_to_be_used>;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+insert into t1 values (1);
+create trigger tr1 after insert on t1
+for each row insert into t2 (f2) values (new.f1+1);
+create trigger tr2 after insert on t2
+for each row insert into t3 (f3) values (new.f2+1);
+create trigger tr3 after insert on t3
+for each row insert into t4 (f4) values (new.f3+1000);
+set autocommit=0;
+start transaction;
+insert into t1 values (1);
+ERROR 22003: Out of range value for column 'f4' at row 1
+commit;
+select * from t1 order by f1;
+f1
+1
+select * from t2 order by f2;
+f2
+select * from t3 order by f3;
+f3
+drop trigger tr1;
+drop trigger tr2;
+drop trigger tr3;
+drop table t1;
+drop table t2;
+drop table t3;
+drop table t4;
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result b/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result
new file mode 100644
index 00000000..333e9533
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result
@@ -0,0 +1,73 @@
+
+Testcase x.x.x.1:
+-----------------
+DROP TABLE IF EXISTS t0, t1, t2;
+CREATE TABLE t0 (col1 CHAR(50))
+ENGINE = <engine_to_be_tested>;
+CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id))
+ENGINE = <engine_to_be_tested>;
+CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
+INDEX par_ind (f_id), col1 CHAR(50),
+FOREIGN KEY (f_id) REFERENCES t1(id) ON DELETE SET NULL)
+ENGINE = <engine_to_be_tested>;
+INSERT INTO t1 VALUES (1,'Department A');
+INSERT INTO t1 VALUES (2,'Department B');
+INSERT INTO t1 VALUES (3,'Department C');
+INSERT INTO t2 VALUES (1,2,'Emp 1');
+INSERT INTO t2 VALUES (2,2,'Emp 2');
+INSERT INTO t2 VALUES (3,2,'Emp 3');
+CREATE TRIGGER trig AFTER INSERT ON t0 FOR EACH ROW
+DELETE FROM t1 WHERE col1 = new.col1;
+SELECT * FROM t2;
+id f_id col1
+1 2 Emp 1
+2 2 Emp 2
+3 2 Emp 3
+LOCK TABLES t0 WRITE, t1 WRITE;
+INSERT INTO t0 VALUES ('Department B');
+UNLOCK TABLES;
+SELECT * FROM t2;
+id f_id col1
+1 NULL Emp 1
+2 NULL Emp 2
+3 NULL Emp 3
+DROP TRIGGER trig;
+DROP TABLE t2, t1;
+
+Testcase x.x.x.2:
+-----------------
+DROP TABLE IF EXISTS t1, t2;
+CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id))
+ENGINE = <engine_to_be_tested>;
+CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
+INDEX par_ind (f_id), col1 CHAR(50),
+FOREIGN KEY (f_id) REFERENCES t1(id) ON UPDATE CASCADE)
+ENGINE = <engine_to_be_tested>;
+INSERT INTO t1 VALUES (1,'Department A');
+INSERT INTO t1 VALUES (2,'Department B');
+INSERT INTO t1 VALUES (3,'Department C');
+INSERT INTO t2 VALUES (1,2,'Emp 1');
+INSERT INTO t2 VALUES (2,3,'Emp 2');
+insert into t2 VALUES (3,4,'Emp 3');
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f_id`) REFERENCES `t1` (`id`) ON UPDATE CASCADE)
+CREATE TRIGGER tr_t2 BEFORE INSERT ON t2 FOR EACH ROW
+INSERT INTO t1 VALUES(new.f_id, CONCAT('New Department ', new.f_id));
+LOCK TABLES t1 WRITE, t2 WRITE;
+INSERT INTO t2 VALUES (3,4,'Emp 3');
+UNLOCK TABLES;
+SELECT * FROM t1;
+id col1
+1 Department A
+2 Department B
+3 Department C
+4 New Department 4
+SELECT * FROM t2;
+id f_id col1
+1 2 Emp 1
+2 3 Emp 2
+3 4 Emp 3
+DROP TRIGGER tr_t2;
+DROP TABLE t2, t1, t0;
+
+Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test)
+-------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result
new file mode 100644
index 00000000..90d72b45
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/innodb_views.result
@@ -0,0 +1,22919 @@
+USE test;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = innodb;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
+into table tb2;
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+USE test1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = innodb;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
+into table tb2;
+USE test;
+
+! Attention: The file with the expected results is not
+| thoroughly checked.
+! The server return codes are correct, but
+| most result sets where the table tb2 is
+! involved are not checked.
+--------------------------------------------------------------------------------
+
+There are some statements where the ps-protocol is switched off.
+Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
+--------------------------------------------------------------------------------
+insert into test.tb2 (f59,f60) values (76710,226546);
+insert into test.tb2 (f59,f60) values(2760,985654);
+insert into test.tb2 (f59,f60) values(569300,9114376);
+insert into test.tb2 (f59,f60) values(660,876546);
+insert into test.tb2 (f59,f60) values(250,87895654);
+insert into test.tb2 (f59,f60) values(340,9984376);
+insert into test.tb2 (f59,f60) values(3410,996546);
+insert into test.tb2 (f59,f60) values(2550,775654);
+insert into test.tb2 (f59,f60) values(3330,764376);
+insert into test.tb2 (f59,f60) values(441,16546);
+insert into test.tb2 (f59,f60) values(24,51654);
+insert into test.tb2 (f59,f60) values(323,14376);
+insert into test.tb2 (f59,f60) values(34,41);
+insert into test.tb2 (f59,f60) values(04,74);
+insert into test.tb2 (f59,f60) values(15,87);
+insert into test.tb2 (f59,f60) values(22,93);
+insert into test.tb2 (f59,f60) values(394,41);
+insert into test.tb2 (f59,f60) values(094,74);
+insert into test.tb2 (f59,f60) values(195,87);
+insert into test.tb2 (f59,f60) values(292,93);
+insert into test.tb2 (f59,f60) values(0987,41) ;
+insert into test.tb2 (f59,f60) values(7876,74) ;
+INSERT INTO tb2 (f59,f61) VALUES(321,765 );
+INSERT INTO tb2 (f59,f61) VALUES(9112,8771);
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+Insert into tb2 (f59,f60,f61) values (107,105,106) ;
+Insert into tb2 (f59,f60,f61) values (109,108,104) ;
+Insert into tb2 (f59,f60,f61) values (207,205,206) ;
+Insert into tb2 (f59,f60,f61) values (209,208,204) ;
+Insert into tb2 (f59,f60,f61) values (27,25,26) ;
+Insert into tb2 (f59,f60,f61) values (29,28,24) ;
+Insert into tb2 (f59,f60,f61) values (17,15,16) ;
+Insert into tb2 (f59,f60,f61) values (19,18,14) ;
+insert into tb2 (f59,f60,f61) values (107,105,106);
+insert into tb2 (f59,f60,f61) values (109,108,104);
+INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
+INSERT INTO tb2 (f59,f60) VALUES( 242,79 );
+INSERT INTO tb2 (f59,f60) VALUES( 424,89 );
+SELECT * FROM tb2 ORDER BY f59, f60, f61;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+Use test;
+
+Testcase 3.3.1.1
+--------------------------------------------------------------------------------
+Drop table if exists t1;
+Create table t1 (f59 INT, f60 INT) ;
+Insert into t1 values (100,4234);
+Insert into t1 values (990,6624);
+Insert into t1 values (710,765);
+Insert into t1 values (300,433334);
+Insert into t1 values (800,9788);
+Insert into t1 values (500,9866);
+Drop view if exists v1 ;
+CREATE VIEW v1 AS select f59,f60,f61
+FROM test.tb2 where f59=250;
+select * FROM v1 order by f60,f61 limit 0,10;
+f59 f60 f61
+250 87895654 NULL
+Drop view if exists v1 ;
+CREATE VIEW v1 AS select f59,f60,f61
+FROM test.tb2 limit 100;
+select * FROM v1 order by f59,f60,f61 limit 0,10;
+f59 f60 f61
+1 1 0000000001
+2 2 0000000002
+3 3 0000000003
+4 4 0000000004
+4 74 NULL
+5 5 0000000005
+6 6 0000000006
+7 7 0000000007
+8 8 0000000008
+9 9 0000000009
+CREATE or REPLACE VIEW v1 AS select f59,f60,f61
+FROM test.tb2;
+select * FROM v1 order by f59,f60,f61 limit 4,3;
+f59 f60 f61
+4 74 NULL
+5 5 0000000005
+6 6 0000000006
+CREATE or REPLACE VIEW v1 AS select distinct f59
+FROM test.tb2;
+select * FROM v1 order by f59 limit 4,3;
+f59
+5
+6
+7
+ALTER VIEW v1 AS select f59
+FROM test.tb2;
+select * FROM v1 order by f59 limit 6,2;
+f59
+6
+7
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 order by f59;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+4
+5
+6
+7
+8
+9
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 order by f59 asc;
+select * FROM v1 limit 0,10;
+f59
+1
+2
+3
+4
+4
+5
+6
+7
+8
+9
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 order by f59 desc;
+select * FROM v1 limit 0,10;
+f59
+569300
+76710
+9112
+7876
+3410
+3330
+2760
+2550
+987
+660
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 group by f59;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 group by f59 asc;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 group by f59 desc;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
+union (select f59 from t1);
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
+UNION DISTINCT(select f59 FROM t1) ;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
+UNION ALL(select f59 FROM t1) ;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+4
+5
+6
+7
+8
+9
+CREATE or REPLACE VIEW v1 AS select *
+FROM test.tb2 WITH LOCAL CHECK OPTION ;
+select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 4
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 4
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+CREATE or REPLACE VIEW v1 AS select *
+FROM test.tb2 WITH CASCADED CHECK OPTION ;
+select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 4
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 4
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 WITH CASCADED CHECK OPTION;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+F59 F60
+1 1
+2 2
+3 3
+4 4
+4 74
+5 5
+6 6
+7 7
+8 8
+9 9
+CREATE or REPLACE VIEW v1 AS select f59, f60
+from test.tb2 where f59=3330 ;
+select * FROM v1 order by f60 limit 0,10;
+f59 f60
+3330 764376
+DROP VIEW v1 ;
+DROP TABLE t1 ;
+
+Testcase 3.3.1.2
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS v2 ;
+CREATE TABLE t1 (f1 BIGINT) ;
+SET @x=0;
+CREATE or REPLACE VIEW v1 AS Select 1 INTO @x;
+ERROR 42000: 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 'INTO @x' at line 1
+Select @x;
+@x
+0
+CREATE or REPLACE VIEW v1 AS Select 1
+FROM (SELECT 1 FROM t1) my_table;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ;
+SET @a:=0 ;
+SELECT @a ;
+@a
+0
+INSERT INTO v1 VALUES (1) ;
+SELECT @a ;
+@a
+1
+SELECT * FROM t1;
+f1
+1
+DROP TRIGGER tr1 ;
+SET @a:=0 ;
+CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ;
+ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
+RENAME TABLE v1 TO v2;
+RENAME VIEW v2 TO v1;
+ERROR 42000: 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 'VIEW v2 TO v1' at line 1
+ALTER TABLE v2 RENAME AS v1;
+ERROR HY000: 'test.v2' is not of type 'BASE TABLE'
+ALTER VIEW v1 RENAME AS v2;
+ERROR 42000: 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 'RENAME AS v2' at line 1
+DROP TABLE IF EXISTS t1, t2 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS v2 ;
+CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE );
+CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
+ALTER TABLE t1 ADD PRIMARY KEY(f1);
+ALTER TABLE v1 ADD PRIMARY KEY(f1);
+ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
+ALTER VIEW v1 ADD PRIMARY KEY(f1);
+ERROR 42000: 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 'ADD PRIMARY KEY(f1)' at line 1
+CREATE INDEX t1_idx ON t1(f3);
+CREATE INDEX v1_idx ON v1(f3);
+ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
+DROP TABLE t1;
+DROP VIEW v1;
+
+Testcase 3.3.1.3 + 3.1.1.4
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
+ERROR 42000: 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 'or REPLACE AS Select * from tb2 my_table' at line 1
+CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
+from tb2 my_table limit 50;
+ERROR 42000: 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 'WITH CASCADED CHECK OPTION AS Select *
+from tb2 my_table limit 50' at line 1
+CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
+from tb2 my_table limit 50;
+ERROR 42000: 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 'WITH LOCAL CHECK OPTION AS Select *
+from tb2 my_table limit 50' at line 1
+SELECT * FROM tb2 my_table CREATE VIEW As v1;
+ERROR 42000: 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 'CREATE VIEW As v1' at line 1
+CREATE or REPLACE VIEW v1 Select f59, f60
+from test.tb2 my_table where f59 = 250 ;
+ERROR 42000: 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 'Select f59, f60
+from test.tb2 my_table where f59 = 250' at line 1
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+DROP VIEW v1;
+REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+ERROR 42000: 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 'OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHE...' at line 1
+CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+ERROR 42000: 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 'SELECT AS F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION' at line 1
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CASCADED WITH CHECK OPTION;
+ERROR 42000: 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 'CASCADED WITH CHECK OPTION' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED OPTION CHECK;
+ERROR 42000: 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 'OPTION CHECK' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CHECK OPTION WITH CASCADED;
+ERROR 42000: 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 'CHECK OPTION WITH CASCADED' at line 2
+CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table;
+ERROR 42000: 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 'WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1
+REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
+ERROR 42000: 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 'OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK ...' at line 1
+CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
+ERROR 42000: 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 'SELECT AS F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION' at line 1
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table LOCAL WITH CHECK OPTION;
+ERROR 42000: 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 'LOCAL WITH CHECK OPTION' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL OPTION CHECK;
+ERROR 42000: 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 'OPTION CHECK' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CHECK OPTION WITH LOCAL;
+ERROR 42000: 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 'CHECK OPTION WITH LOCAL' at line 2
+CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table;
+ERROR 42000: 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 'WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1' at line 1
+Drop table if exists t1 ;
+CREATE table t1 (f1 int ,f2 int) ;
+INSERT INTO t1 values (235, 22);
+INSERT INTO t1 values (554, 11);
+CREATE or REPLACE view v1 as (Select from f59 tb2)
+Union ALL (Select from f1 t1);
+ERROR 42000: 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 'from f59 tb2)
+Union ALL (Select from f1 t1)' at line 1
+CREATE or REPLACE view v1 as Select f59, f60
+from tb2 by order f59;
+ERROR 42000: 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 'by order f59' at line 2
+CREATE or REPLACE view v1 as Select f59, f60
+from tb2 by group f59 ;
+ERROR 42000: 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 'by group f59' at line 2
+
+Testcase 3.3.1.5
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+CREATE VIEW v1 SELECT * FROM tb2;
+ERROR 42000: 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 'SELECT * FROM tb2' at line 1
+CREATE v1 AS SELECT * FROM tb2;
+ERROR 42000: 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 'v1 AS SELECT * FROM tb2' at line 1
+VIEW v1 AS SELECT * FROM tb2;
+ERROR 42000: 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 'VIEW v1 AS SELECT * FROM tb2' at line 1
+CREATE VIEW v1 AS SELECT 1;
+DROP VIEW v1;
+VIEW v1 AS SELECT 1;
+ERROR 42000: 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 'VIEW v1 AS SELECT 1' at line 1
+CREATE v1 AS SELECT 1;
+ERROR 42000: 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 'v1 AS SELECT 1' at line 1
+CREATE VIEW AS SELECT 1;
+ERROR 42000: 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 'AS SELECT 1' at line 1
+CREATE VIEW v1 SELECT 1;
+ERROR 42000: 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 'SELECT 1' at line 1
+CREATE VIEW v1 AS ;
+ERROR 42000: 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
+
+Testcase 3.3.1.6
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+CREATE or REPLACE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = MERGE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 '= TEMPTABLE VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'TEMPTABLE VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE ALGORITHM = VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'TEMPTABLE = ALGORITHM VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'TEMPTABLE - ALGORITHM VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'GARBAGE = TEMPTABLE VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'GARBAGE VIEW v1
+as SELECT * from tb2' at line 1
+Drop view if exists v1 ;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH LOCAL CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH NO CHECK OPTION;
+ERROR 42000: 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 'NO CHECK OPTION' at line 2
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 CASCADED CHECK OPTION;
+ERROR 42000: 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 'CASCADED CHECK OPTION' at line 2
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED OPTION;
+ERROR 42000: 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 'OPTION' at line 2
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK ;
+ERROR 42000: 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 2
+
+Testcase 3.3.1.7
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+Create view test.v1 AS Select * from test.tb2;
+Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
+Drop view test.v1 ;
+Create view v1 AS Select * from test.tb2 limit 100 ;
+Alter view v1 AS Select F59 from test.tb2 limit 100 ;
+Drop view v1 ;
+
+Testcase 3.3.1.A0
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS V1 ;
+CREATE TABLE t1 (f1 NUMERIC(4)) ENGINE = innodb;
+INSERT INTO t1 VALUES(1111), (2222);
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111;
+CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222;
+SELECT * FROM v1;
+f1
+1111
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS V1 ;
+
+Testcase 3.3.1.8
+--------------------------------------------------------------------------------
+Create view select AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'select AS Select * from test.tb2 limit 100' at line 1
+Create view as AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'as AS Select * from test.tb2 limit 100' at line 1
+Create view where AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'where AS Select * from test.tb2 limit 100' at line 1
+Create view from AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'from AS Select * from test.tb2 limit 100' at line 1
+Create view while AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'while AS Select * from test.tb2 limit 100' at line 1
+Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ;
+ERROR 42000: 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 '*(&*&&^ as Select * from test.tb2 limit 100' at line 1
+Drop view if exists test.procedure ;
+Create view test.procedure as Select * from test.tb2 limit 100 ;
+Drop view if exists test.procedure ;
+
+Testcase 3.3.1.9
+--------------------------------------------------------------------------------
+Drop TABLE IF EXISTS t1 ;
+Drop VIEW IF EXISTS v1;
+Drop VIEW IF EXISTS v2;
+Drop VIEW IF EXISTS v3;
+CREATE TABLE t1 ( f1 char(5));
+INSERT INTO t1 SET f1 = 'abcde';
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+CREATE VIEW v2 AS SELECT * FROM v1;
+DROP TABLE t1;
+SELECT * FROM v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DELETE FROM v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE v1 SET f1 = 'aaaaa';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v1 SET f1 = "fffff";
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DELETE FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE v2 SET f1 = 'aaaaa';
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v2 SET f1 = "fffff";
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DROP VIEW v1;
+SELECT * FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DELETE FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE v2 SET f1 = 'aaaaa';
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v2 SET f1 = "fffff";
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DROP VIEW v2;
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 (f1 FLOAT);
+CREATE VIEW v1 AS SELECT * FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE or REPLACE VIEW v1 AS SELECT * FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+DROP VIEW v1;
+DROP TABLE t1;
+
+Testcase 3.3.1.10
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Create view test.v1 AS Select * from test.tb2 ;
+Create view test.v1 AS Select F59 from test.tb2 ;
+ERROR 42S01: Table 'v1' already exists
+Create view v1 AS Select F59 from test.tb2 ;
+ERROR 42S01: Table 'v1' already exists
+
+Testcase 3.3.1.11
+--------------------------------------------------------------------------------
+Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ;
+ERROR 42S01: Table 'tb2' already exists
+Create view tb2 AS Select f59,f60 from test.tb2 limit 100 ;
+ERROR 42S01: Table 'tb2' already exists
+Drop view if exists test.v111 ;
+Create view test.v111 as select * from tb2 limit 50;
+Create table test.v111(f1 int );
+ERROR 42S01: Table 'v111' already exists
+Create table v111(f1 int );
+ERROR 42S01: Table 'v111' already exists
+DROP VIEW test.v111;
+
+Testcase 3.3.1.12
+--------------------------------------------------------------------------------
+USE test;
+Drop database if exists test2 ;
+Create database test2 ;
+DROP TABLE IF EXISTS test.t0, test.t1, test.t2;
+DROP VIEW IF EXISTS test.v1;
+DROP VIEW IF EXISTS test.v2;
+CREATE TABLE test.t1 ( f1 VARCHAR(20));
+CREATE TABLE test2.t1 ( f1 VARCHAR(20));
+CREATE TABLE test.t2 ( f1 VARCHAR(20));
+CREATE TABLE test2.v1 ( f1 VARCHAR(20));
+CREATE TABLE test.t0 ( f1 VARCHAR(20));
+CREATE TABLE test2.t0 ( f1 VARCHAR(20));
+CREATE VIEW test2.t2 AS SELECT * FROM test2.t0;
+CREATE VIEW test.v1 AS SELECT * FROM test.t0;
+CREATE VIEW test.v2 AS SELECT * FROM test.t0;
+CREATE VIEW test2.v2 AS SELECT * FROM test2.t0;
+INSERT INTO test.t1 VALUES('test.t1 - 1');
+INSERT INTO test2.t1 VALUES('test2.t1 - 1');
+INSERT INTO test.t2 VALUES('test.t2 - 1');
+INSERT INTO test2.v1 VALUES('test2.v1 - 1');
+INSERT INTO test.t0 VALUES('test.t0 - 1');
+INSERT INTO test2.t0 VALUES('test2.t0 - 1');
+USE test;
+INSERT INTO t1 VALUES('test.t1 - 2');
+INSERT INTO t2 VALUES('test.t2 - 2');
+INSERT INTO t0 VALUES('test.t0 - 2');
+USE test2;
+INSERT INTO t1 VALUES('test2.t1 - 2');
+INSERT INTO v1 VALUES('test2.v1 - 2');
+INSERT INTO t0 VALUES('test2.t0 - 2');
+SELECT * FROM t1;
+f1
+test2.t1 - 1
+test2.t1 - 2
+SELECT * FROM t2;
+f1
+test2.t0 - 1
+test2.t0 - 2
+SELECT * FROM v1;
+f1
+test2.v1 - 1
+test2.v1 - 2
+SELECT * FROM v2;
+f1
+test2.t0 - 1
+test2.t0 - 2
+USE test;
+SELECT * FROM t1;
+f1
+test.t1 - 1
+test.t1 - 2
+SELECT * FROM t2;
+f1
+test.t2 - 1
+test.t2 - 2
+SELECT * FROM v1;
+f1
+test.t0 - 1
+test.t0 - 2
+SELECT * FROM v2;
+f1
+test.t0 - 1
+test.t0 - 2
+
+Testcase 3.3.1.13
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (f1 BIGINT);
+INSERT INTO t1 VALUES(1);
+CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
+SELECT * FROM test.v1;
+f1
+1
+CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1
+AS SELECT * FROM t1 limit 2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
+SELECT * FROM test.v1;
+f1
+1
+CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109` from `tb2` order by `tb2`.`f59` limit 2 latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by F59 limit 10,100;
+F59
+10
+15
+17
+19
+22
+24
+27
+29
+34
+94
+107
+107
+109
+109
+195
+207
+209
+242
+250
+292
+299
+321
+323
+340
+394
+424
+441
+500
+500
+500
+660
+987
+2550
+2760
+3330
+3410
+7876
+9112
+76710
+569300
+Drop table test.t1 ;
+Drop view test.v1 ;
+
+Testcase 3.3.1.14
+--------------------------------------------------------------------------------
+CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2;
+ERROR HY000: 'test.tb2' is not of type 'VIEW'
+CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2;
+ERROR HY000: 'test.tb2' is not of type 'VIEW'
+
+Testcase 3.3.1.15
+--------------------------------------------------------------------------------
+Drop table if exists test.v1 ;
+CREATE OR REPLACE view test.v1 as select * from tb2;
+SELECT * FROM test.v1;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+Drop view test.v1 ;
+
+Testcase 3.3.1.16 + 3.3.1.17
+--------------------------------------------------------------------------------
+Drop table if exists test.v1 ;
+CREATE OR REPLACE VIEW v1 AS SELECT * From tb2;
+SELECT * FROM tb2 WHERE 1 = 2;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+SELECT * FROM v1 WHERE 1 = 2;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+Drop view v1;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (f1 NUMERIC(15,3));
+INSERT INTO t1 VALUES(8.8);
+CREATE VIEW v1 AS SELECT * FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+f1
+8.800
+CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+f1
+8.800
+CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+my_column
+8.800
+CREATE OR REPLACE VIEW v1(column1,column2)
+AS SELECT f1 As my_column, f1 FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+column1 column2
+8.800 8.800
+CREATE OR REPLACE VIEW test.v1(column1,column2)
+AS SELECT f1 As my_column, f1 FROM test.t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+column1 column2
+8.800 8.800
+
+Testcase 3.3.1.18
+--------------------------------------------------------------------------------
+Drop view if exists v1 ;
+Drop view if exists v1_1 ;
+Create view v1
+as Select test.tb2.f59 as NewNameF1, test.tb2.f60
+from test.tb2 limit 0,100 ;
+Create view v1_1
+as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
+from tb2 limit 0,100 ;
+SELECT NewNameF1,f60 FROM test.v1_1 ;
+ERROR 42S22: Unknown column 'f60' in 'field list'
+SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
+ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
+SELECT f59, f60 FROM test.v1 ;
+ERROR 42S22: Unknown column 'f59' in 'field list'
+Use test ;
+SELECT F59 FROM v1 ;
+ERROR 42S22: Unknown column 'F59' in 'field list'
+
+Testcase 3.3.1.19
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1, t2;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
+INSERT INTO t1 VALUES(7, 7.7);
+CREATE TABLE t2( f1 BIGINT, f2 DECIMAL(5,2));
+INSERT INTO t2 VALUES(6, 6.6);
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1;
+f1 f2
+7 7.70
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1;
+SELECT * FROM v1;
+f1 f2
+7 7.70
+CREATE OR REPLACE VIEW v1 AS SELECT f1 AS my_f1, f2 AS my_f2 FROM t1;
+SELECT * FROM v1;
+my_f1 my_f2
+7 7.70
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
+SELECT * FROM v1;
+my_f1 my_f2
+7 7.70
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT t1.f1, t2.f2 FROM t1, t2;
+SELECT * FROM v1;
+my_f1 my_f2
+7 6.60
+SELECT f1, f2 AS f1 FROM t1;
+f1 f1
+7 7.70
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1;
+ERROR 42S21: Duplicate column name 'f1'
+SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
+f1 f1
+7 6
+CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
+ERROR 42S21: Duplicate column name 'f1'
+CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1;
+ERROR 42S21: Duplicate column name 'my_col'
+
+Testcase 3.3.1.20
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT * FROM t1;
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
+CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT * FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT f1, f2 FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT * FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+
+Testcase 3.3.1.21
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1;
+CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2;
+SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2;
+F59 F60
+1 1
+2 2
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.22
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1;
+CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 WHERE f59 < 3;
+SELECT * FROM test.v1;
+product
+1
+4
+CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
+SELECT * FROM test.v1;
+product
+2
+CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
+SELECT * FROM test.v1;
+product
+root@localhost
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.23 + 3.3.1.24
+--------------------------------------------------------------------------------
+USE test;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+CREATE VIEW test.v2 AS SELECT * FROM test.t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+CREATE VIEW v2 AS Select * from test.v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+DROP VIEW IF EXISTS v2;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v2'
+
+Testcase 3.3.1.25
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1_temp;
+DROP TABLE IF EXISTS t2_temp;
+DROP VIEW IF EXISTS v1;
+Create table t1_temp(f59 char(10),f60 int) ;
+Create temporary table t1_temp(f59 char(10),f60 int) ;
+Insert into t1_temp values('FER',90);
+Insert into t1_temp values('CAR',27);
+Create view v1 as select * from t1_temp ;
+ERROR HY000: View's SELECT refers to a temporary table 't1_temp'
+Create temporary table t2_temp(f59 char(10),f60 int) ;
+Insert into t2_temp values('AAA',11);
+Insert into t2_temp values('BBB',22);
+Create or replace view v1
+as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ;
+ERROR HY000: View's SELECT refers to a temporary table 't1_temp'
+DROP temporary table t1_temp;
+DROP table t1_temp;
+DROP temporary table t2_temp;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (f1 char(10));
+CREATE TEMPORARY TABLE t2 (f2 char(10));
+INSERT INTO t1 VALUES('t1');
+INSERT INTO t1 VALUES('A');
+INSERT INTO t2 VALUES('t2');
+INSERT INTO t2 VALUES('B');
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2, t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1, t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2 UNION SELECT * FROM t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
+WHERE f2 = ( SELECT f1 FROM t1 );
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1
+WHERE f1 = ( SELECT f2 FROM t2 );
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+DROP TABLE t1;
+DROP TEMPORARY TABLE t2;
+
+Testcase 3.3.1.26
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1;
+Create view test.v1 AS Select * from test.tb2;
+Select * from test.v1;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+Drop view test.v1 ;
+
+Testcase 3.3.1.27
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS test.v1;
+Drop VIEW IF EXISTS test.v1_1 ;
+Create view test.v1 AS Select * from test.tb2;
+Create view test.v1_1 AS Select F59 from test.v1 ;
+Select * from test.v1_1 order by F59 limit 2;
+F59
+1
+2
+Drop view test.v1 ;
+Drop view test.v1_1 ;
+
+Testcase 3.3.1.28
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+create database test2 ;
+Create view test2.v2 AS Select * from test.tb2 limit 50,50;
+use test2 ;
+Create view v1 AS Select * from test.tb2 limit 50 ;
+Select * from v1 order by f59,f60,f61,f62,f63,f64,f65;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 4
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 4
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+Select * from test2.v2 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+Drop view if exists test2.v1 ;
+Drop view if exists test2.v2 ;
+Drop database test2 ;
+
+Testcase 3.3.1.29
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+Drop view if exists test.v1 ;
+create database test2 ;
+use test2;
+Create view test.v1 AS Select * from test.tb2 limit 50 ;
+Create view test2.v2 AS Select F59 from test.v1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test2.v2 ;
+
+Testcase 3.3.1.31
+--------------------------------------------------------------------------------
+Drop table if exists test.t1 ;
+CREATE TABLE test.t1 ( f59 int, f60 int );
+INSERT INTO test.t1 VALUES( 34, 654 );
+INSERT INTO test.t1 VALUES( 906, 434 );
+INSERT INTO test.t1 VALUES( 445, 765 );
+Create or replace view test.v1
+AS SELECT test.t1.F59, test.tb2.F60
+FROM test.tb2 JOIN test.t1 ON test.tb2.F59 = test.t1.F59 ;
+Select * from test.v1;
+F59 F60
+34 41
+Drop view test.v1 ;
+
+Testcase 3.3.1.32
+--------------------------------------------------------------------------------
+Drop table if exists test.t1 ;
+Drop database if exists test2 ;
+Drop view if exists test.v1 ;
+create database test2 ;
+use test2 ;
+CREATE TABLE t1 ( f59 int, f60 int );
+INSERT INTO t1 VALUES( 34, 654 );
+INSERT INTO t1 VALUES( 906, 434 );
+INSERT INTO t1 VALUES( 445, 765 );
+CREATE VIEW test2.v1
+AS SELECT test.tb2.F59, test.tb2.F60
+FROM test.tb2 INNER JOIN test2.t1 ON tb2.f59 = t1.f59;
+Select * from test2.v1;
+F59 F60
+34 41
+Use test;
+
+Testcase 3.3.1.33
+--------------------------------------------------------------------------------
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1
+AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
+FROM test.v1_firstview INNER JOIN test.v1_secondview
+ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
+SELECT * FROM test.v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.34
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+create database test2 ;
+use test2 ;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2 ;
+CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2 ;
+CREATE VIEW v1
+AS SELECT test.v1_firstview.F59, test.v1_firstview.F60
+FROM test.v1_firstview INNER JOIN test.v1_secondview
+ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+F59 F60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop view v1 ;
+Drop view test.v1_firstview ;
+Drop view test.v1_secondview ;
+
+Testcase 3.3.1.35
+--------------------------------------------------------------------------------
+use test;
+Drop view if exists test.v1;
+Drop view if exists test.v1_firstview;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1
+AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
+FROM test.v1_firstview INNER JOIN test.tb2
+ON test.v1_firstview.f59 = test.tb2.f59;
+SELECT * FROM test.v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop view test.v1 ;
+Drop view test.v1_firstview;
+
+Testcase 3.3.1.36
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+create database test2 ;
+use test2 ;
+CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ;
+CREATE VIEW v1
+AS SELECT v1_firstview.f59, v1_firstview.f60
+FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop database test2 ;
+
+Testcase 3.3.1.37
+--------------------------------------------------------------------------------
+use test;
+Drop table if exists t1;
+Drop view if exists test.v1 ;
+Drop view if exists test.v1_1 ;
+Drop view if exists test.v1_1 ;
+Drop view if exists test.v1_main ;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 74
+5 5
+6 6
+7 7
+8 8
+9 9
+Create table t1(f59 int, f60 int);
+Insert into t1 values (90,507) ;
+Create view v1_1 as Select f59,f60 from t1 ;
+Select * from v1_1 ;
+f59 f60
+90 507
+Create view v1_main
+as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1
+ON test.tb2.f59 = test.v1.f59;
+Select * from v1_main order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+4
+4
+4
+5
+6
+7
+Drop table t1;
+Drop view test.v1 ;
+Drop view test.v1_1 ;
+Drop view test.v1_main ;
+
+Testcase 3.3.1.31 - 3.3.1.37 New Implementation
+--------------------------------------------------------------------------------
+USE test;
+DROP DATABASE IF EXISTS test2;
+DROP TABLE IF EXISTS t0,t1;
+DROP VIEW IF EXISTS t3,t4;
+CREATE DATABASE test2;
+CREATE TABLE test1.t0 (f1 VARCHAR(20));
+CREATE TABLE test1.t1 (f1 VARCHAR(20));
+CREATE TABLE test2.t0 (f1 VARCHAR(20));
+CREATE TABLE test2.t1 (f1 VARCHAR(20));
+CREATE VIEW test1.t2 AS SELECT * FROM test1.t0;
+CREATE VIEW test1.t3 AS SELECT * FROM test2.t0;
+CREATE VIEW test2.t2 AS SELECT * FROM test2.t0;
+CREATE VIEW test2.t3 AS SELECT * FROM test1.t0;
+INSERT INTO test1.t0 VALUES('test1.t0');
+INSERT INTO test1.t1 VALUES('test1.t1');
+INSERT INTO test2.t0 VALUES('test2.t0');
+INSERT INTO test2.t1 VALUES('test2.t1');
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test1.t1
+
+Testcase 3.3.1.38
+--------------------------------------------------------------------------------
+Drop table if exists test1.t1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test.v1_main;
+Drop view if exists test1.v1_1 ;
+Drop database if exists test3 ;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 20;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 74
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+15 87
+17 15
+19 18
+22 93
+24 51654
+27 25
+29 28
+34 41
+94 74
+Create table test1.t1 (f59 int,f60 int) ;
+Insert into test1.t1 values (199,507) ;
+Create view test1.v1_1 as Select f59,f60 from test1.t1 ;
+Select * from test1.v1_1 ;
+f59 f60
+199 507
+Create database test3 ;
+Create table test3.t1(f59 int,f60 int) ;
+Insert into test3.t1 values (1023,7670) ;
+Create view test3.v1_2 as Select f59,f60 from test3.t1 ;
+Select * from test3.v1_2 ;
+f59 f60
+1023 7670
+use test ;
+Create view v1_main
+as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2,
+test3.v1_2.f59 as f3
+FROM (test.tb2,test1.v1_1,test.v1) JOIN test3.v1_2
+ON (test.v1.f59 = test1.v1_1.f59) ;
+Select * from v1_main ;
+f1 f2 f3
+DROP VIEW test.v1 ;
+DROP VIEW test1.v1_1 ;
+DROP VIEW test.v1_main ;
+DROP DATABASE test3;
+
+Testcase 3.3.1.39
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1
+AS Select f59 from (Select * FROM tb2 limit 20) tx ;
+DROP VIEW test.v1;
+SELECT * FROM test.v1 order by f59 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.40
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Set @var1 = 'ABC' ;
+Set @var2 = 'XYZ' ;
+CREATE VIEW test.v1 AS SELECT @var1, @var2 ;
+ERROR HY000: View's SELECT contains a variable or parameter
+CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size;
+ERROR HY000: View's SELECT contains a variable or parameter
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.41
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Drop procedure if exists sp1 ;
+Create procedure sp1() DETERMINISTIC
+Begin
+DECLARE x char;
+Set x = 200 ;
+Create view test.v1 as SELECT * FROM tb2 WHERE f59 = x ;
+End //
+ERROR HY000: View's SELECT contains a variable or parameter
+Call sp1() ;
+ERROR 42000: PROCEDURE test.sp1 does not exist
+Drop view if exists test.v1 ;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v1'
+Drop procedure sp1 ;
+ERROR 42000: PROCEDURE test.sp1 does not exist
+
+Testcase 3.3.1.42
+--------------------------------------------------------------------------------
+Drop VIEW if exists test.v1 ;
+CREATE TEMPORARY VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2 ;
+ERROR 42000: 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 'VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2' at line 1
+CREATE OR REPLACE TEMPORARY VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2 ;
+ERROR 42000: 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 'VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2' at line 1
+Drop view if exists test.v1 ;
+Use test;
+
+Testcase 3.3.1.43
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2;
+INSERT INTO test.v1 values(122,432);
+SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20;
+f59 122
+f60 432
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ;
+SELECT * FROM test.tb2 where f59 = 3000 limit 0,20;
+f59 3000
+f60 432
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+DELETE FROM test.v1
+where test.v1.f59 = 3000 and test.v1.f60 = 432;
+SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+drop view test.v1 ;
+
+Testcase 3.3.1.44
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100;
+INSERT INTO test.v1 values(31, 32, 33) ;
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+Drop view test.v1 ;
+
+Testcase 3.3.1.45
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04;
+UPDATE test.v1 SET f59 = 30 where F59 = 04 ;
+affected rows: 2
+info: Rows matched: 2 Changed: 2 Warnings: 0
+SELECT * FROM test.v1 where f59 = 30 order by f59;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+SELECT * FROM test.tb2 where f59 = 30 ;
+f59 30
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 30
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+UPDATE tb2 SET f59 = 100 where f59 = 30 ;
+affected rows: 2
+info: Rows matched: 2 Changed: 2 Warnings: 0
+SELECT * FROM tb2 where f59 = 100 ;
+f59 100
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 100
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+SELECT * FROM test.v1 order by f59 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+drop view if exists test.v1 ;
+Drop TABLE IF EXISTS test.t1 ;
+Drop VIEW IF EXISTS test.v1 ;
+CREATE TABLE t1 (f1 BIGINT, f2 VARCHAR(20), PRIMARY KEY(f1))
+ENGINE = innodb;
+INSERT INTO t1 VALUES(1,'one');
+INSERT INTO t1 VALUES(2,'two');
+INSERT INTO t1 VALUES(3,'three');
+INSERT INTO t1 VALUES(5,'five');
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 BETWEEN 2 AND 4;
+SELECT COUNT(*) FROM v1 WHERE f1 = 2;
+COUNT(*)
+1
+SELECT COUNT(*) FROM v1 WHERE f1 = 4;
+COUNT(*)
+0
+SELECT COUNT(*) FROM v1 WHERE f1 = 5;
+COUNT(*)
+0
+SELECT COUNT(*) FROM v1 WHERE f1 = 10;
+COUNT(*)
+0
+INSERT INTO t1 VALUES(4,'four');
+DELETE FROM v1 WHERE f1 = 3;
+affected rows: 1
+DELETE FROM v1 WHERE f1 = 5;
+affected rows: 0
+SELECT * FROM t1 ORDER BY f1;
+f1 f2
+1 one
+2 two
+4 four
+5 five
+SELECT * FROM v1 ORDER BY f1;
+f1 f2
+2 two
+4 four
+INSERT INTO v1 VALUES(2,'two');
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+INSERT INTO v1 VALUES(3,'three');
+affected rows: 1
+INSERT INTO v1 VALUES(6,'six');
+affected rows: 1
+SELECT * FROM t1 ORDER BY f1;
+f1 f2
+1 one
+2 two
+3 three
+4 four
+5 five
+6 six
+SELECT * FROM v1 ORDER BY f1;
+f1 f2
+2 two
+3 three
+4 four
+UPDATE v1 SET f1 = 2 WHERE f1 = 3;
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+UPDATE v1 SET f2 = 'number' WHERE f1 = 3;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+UPDATE v1 SET f1 = 10 WHERE f1 = 3;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+UPDATE v1 SET f2 = 'number' WHERE f1 = 1;
+affected rows: 0
+
+Testcase 3.3.1.46
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60
+FROM test.tb2 where f59 = 195 WITH CHECK OPTION ;
+UPDATE test.v1 SET f59 = 198 where f59=195 ;
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+SELECT * FROM test.v1 order by f59 ;
+f59 f60
+195 87
+drop view if exists test.v1 ;
+
+Testcase 3.3.1.47
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Drop view if exists test.v2 ;
+CREATE VIEW test.v1 AS SELECT f59,f60
+FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ;
+CREATE VIEW test.v2 as SELECT * FROM test.v1 ;
+UPDATE test.v1 SET F59 = 919 where f59 = 0987 ;
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+SELECT * FROM test.v1 order by f59 ;
+f59 f60
+987 41
+UPDATE test.v2 SET F59 = 9879 where f59 = 919 ;
+SELECT * FROM tb2 where f59 = 9879 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+drop view if exists v1 ;
+drop view if exists v2 ;
+
+Testcase 3.3.1.48
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS test.t1;
+DROP VIEW IF EXISTS test.v1;
+CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER)
+ENGINE = innodb;
+INSERT INTO t1 VALUES ('A', 1);
+SELECT * FROM t1 order by f1, f2;
+f1 f2
+A 1
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2
+WITH CASCADED CHECK OPTION ;
+SELECT * FROM v1 order by f1, f2;
+f1 f2
+A 1
+UPDATE v1 SET f2 = 2 WHERE f2 = 1;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+INSERT INTO v1 VALUES('B',2);
+affected rows: 1
+SELECT * FROM v1 order by f1, f2;
+f1 f2
+A 2
+B 2
+UPDATE v1 SET f2 = 4;
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+INSERT INTO v1 VALUES('B',3);
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+SELECT * FROM v1 order by f1, f2;
+f1 f2
+A 2
+B 2
+
+Testcase 3.3.1.49
+--------------------------------------------------------------------------------
+Drop table if exists test.t1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test.v2 ;
+Drop view if exists test.v3 ;
+Create table test.t1 (f59 INT, f60 INT) ;
+Insert into test.t1 values (100,4234);
+Insert into test.t1 values (290,6624);
+Insert into test.t1 values (410,765);
+Insert into test.t1 values (300,433334);
+Insert into test.t1 values (800,9788);
+Insert into test.t1 values (501,9866);
+Create view test.v1 as select f59
+FROM test.t1 where f59<500 with check option ;
+Create view test.v2 as select *
+from test.v1 where f59>0 with local check option ;
+Create view test.v3 as select *
+from test.v1 where f59>0 with cascaded check option ;
+Insert into test.v2 values(23) ;
+Insert into test.v3 values(24) ;
+drop view if exists test.v1 ;
+drop view if exists test.v2 ;
+drop view if exists test.v3 ;
+
+Testcase 3.3.1.49A
+--------------------------------------------------------------------------------
+USE test;
+DROP TABLE IF EXISTS test.t1 ;
+DROP TABLE IF EXISTS test.t1_results ;
+DROP VIEW IF EXISTS test.v1;
+DROP VIEW IF EXISTS test.v2;
+DROP VIEW IF EXISTS test.v3;
+CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20));
+CREATE TABLE t1_results (v3_to_v1_options VARCHAR(100), statement VARCHAR(10),
+v3_to_v1_violation VARCHAR(20), errno CHAR(10));
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH LOCAL CHECK OPTION ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CASCADED CHECK OPTION ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CHECK OPTION ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+SELECT * FROM t1_results ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+ <nothing> - <nothing> - <nothing> UPDATE _v2_ 0
+ <nothing> - <nothing> - <nothing> INSERT _v2_ 0
+ <nothing> - <nothing> - <nothing> INSERT _ _v1 0
+ <nothing> - <nothing> - <nothing> UPDATE _ _ 0
+ <nothing> - <nothing> - <nothing> UPDATE _ _v1 0
+ <nothing> - <nothing> - <nothing> UPDATE v3_ _ 0
+ <nothing> - <nothing> - <nothing> INSERT _ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - <nothing> - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE _v2_ 0
+ <nothing> - WITH CHECK OPTION - <nothing> INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - <nothing> INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - <nothing> - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+
+Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above).
+All following SELECTs must give ROW NOT FOUND
+--------------------------------------------------------------------------------
+SELECT * FROM t1_results
+WHERE v3_to_v1_violation = ' _ _ ' AND errno <> 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE ' %' AND errno <> 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE 'WITH %'
+ AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %'
+ AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE errno <> 0 AND errno <> 1369
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+
+End of plausibility checks
+--------------------------------------------------------------------------------
+DROP TABLE t1_results;
+
+Testcase 3.3.1.50 - 3.3.1.53
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS test.v1;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f60,f61 ;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 100
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 100
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+drop view test.v1 ;
+CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2;
+SELECT * FROM test.v1 order by F59, F61 limit 50;
+F59 F61
+1 0000000001
+2 0000000002
+3 0000000003
+5 0000000005
+6 0000000006
+7 0000000007
+8 0000000008
+9 0000000009
+10 0000000010
+15 NULL
+17 0000000016
+19 0000000014
+22 NULL
+24 NULL
+27 0000000026
+29 0000000024
+34 NULL
+94 NULL
+100 NULL
+100 0000000004
+107 0000000106
+107 0000000106
+109 0000000104
+109 0000000104
+195 NULL
+207 0000000206
+209 0000000204
+242 NULL
+250 NULL
+292 NULL
+299 NULL
+321 0000000765
+323 NULL
+340 NULL
+394 NULL
+424 NULL
+441 NULL
+500 0000000900
+500 0000000900
+500 0000000900
+660 NULL
+987 NULL
+2550 NULL
+2760 NULL
+3330 NULL
+3410 NULL
+7876 NULL
+9112 0000008771
+76710 NULL
+569300 NULL
+drop view test.v1 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61;
+SELECT * FROM test.v1 order by f59,f60,f61 ;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 100
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 100
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+drop view test.v1 ;
+CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f61 desc limit 20;
+F59 f61
+1 0000000001
+2 0000000002
+3 0000000003
+5 0000000005
+6 0000000006
+7 0000000007
+8 0000000008
+9 0000000009
+10 0000000010
+15 NULL
+17 0000000016
+19 0000000014
+22 NULL
+24 NULL
+27 0000000026
+29 0000000024
+34 NULL
+94 NULL
+100 0000000004
+100 NULL
+drop view test.v1 ;
+
+Testcase 3.3.1.54
+--------------------------------------------------------------------------------
+USE test;
+drop table if exists test.t1 ;
+drop table if exists test.t2 ;
+drop view if exists test.v1 ;
+Create table t1 (f59 int, f60 int) ;
+Create table t2 (f59 int, f60 int) ;
+Insert into t1 values (1,10) ;
+Insert into t1 values (2,20) ;
+Insert into t1 values (47,80) ;
+Insert into t2 values (1,1000) ;
+Insert into t2 values (2,2000) ;
+Insert into t2 values (31,97) ;
+Create view test.v1 as select t1.f59, t1.f60
+from t1,t2 where t1.f59=t2.f59 ;
+Select * from test.v1 order by f59 limit 50 ;
+f59 f60
+1 10
+2 20
+drop table test.t1 ;
+drop table test.t2 ;
+drop view test.v1 ;
+
+Testcase 3.3.1.50 - 3.3.1.54 additional implementation
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 ( f1 BIGINT, f2 char(10), f3 DECIMAL(10,5) );
+INSERT INTO t1 VALUES(1, 'one', 1.1);
+INSERT INTO t1 VALUES(2, 'two', 2.2);
+INSERT INTO t1 VALUES(3, 'three', 3.3);
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1;
+f1 f2 f3
+1 one 1.10000
+2 two 2.20000
+3 three 3.30000
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1;
+SELECT * FROM v1;
+f2
+one
+two
+three
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE f3 = 2.2;
+SELECT * FROM v1;
+f1 f2 f3
+2 two 2.20000
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1 WHERE f3 = 2.2;
+SELECT * FROM v1;
+f2
+two
+SET sql_mode = 'traditional,ansi';
+CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
+FROM t1 WHERE f1 = 2;
+CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
+FROM t1 WHERE f1 = 2;
+ERROR 42000: Incorrect column name 'pure column f3: '
+SELECT * FROM v1;
+pure column f3: 2.20000
+sum of columns f1 + f3 = 4.20000
+product of constants 3 * (- 0.11111E+1): -3.3333
+expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
+SET sql_mode = '';
+
+Testcases 3.3.1.55 - 3.3.1.62
+--------------------------------------------------------------------------------
+Drop table if exists t1, t2 ;
+Drop view if exists v1 ;
+Create table t1 (f59 int, f60 char(10), f61 int, a char(1)) ;
+Insert into t1 values (1, 'single', 3, '1') ;
+Insert into t1 values (2, 'double', 6, '2') ;
+Insert into t1 values (3, 'single-f3', 4, '3') ;
+Create table t2 (f59 int, f60 char(10), f61 int, b char(1)) ;
+Insert into t2 values (2, 'double', 6, '2') ;
+Insert into t2 values (3, 'single-f3', 6, '3') ;
+Insert into t2 values (4, 'single', 4, '4') ;
+create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+from t1 inner join t2 where t1.f59 = t2.f59 ;
+select * from test.v1 order by t1_f59 ;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+from t1 inner join t2 where t1.f59 = t2.f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Create or replace view test.v1 as
+Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2 cross join t1;
+Select * from v1 order by t1_f59,t2_f59;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2 cross join t1;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Create or replace view test.v1 as
+Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2,t1;
+Select * from v1 order by t1_f59,t2_f59;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2,t1;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Create or replace view test.v1 as
+Select f59, f60, f61, a, b
+FROM t2 natural join t1;
+Select * from v1 order by f59;
+f59 f60 f61 a b
+2 double 6 2 2
+Select f59, f60, f61, a, b
+FROM t2 natural join t1;
+f59 f60 f61 a b
+2 double 6 2 2
+Create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 left outer join t1 on t2.f59=t1.f59;
+Select * from v1 order by t1_f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+NULL 4 NULL single NULL 4
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 left outer join t1 on t2.f59=t1.f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+NULL 4 NULL single NULL 4
+Create or replace view test.v1 as
+Select f59, f60, f61, t1.a, t2.b
+FROM t2 natural left outer join t1;
+Select * from v1 order by f59;
+f59 f60 f61 a b
+2 double 6 2 2
+3 single-f3 6 NULL 3
+4 single 4 NULL 4
+Select f59, f60, f61, t1.a, t2.b
+FROM t2 natural left outer join t1;
+f59 f60 f61 a b
+2 double 6 2 2
+3 single-f3 6 NULL 3
+4 single 4 NULL 4
+set @save_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='outer_join_with_cache=off';
+Create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 right outer join t1 on t2.f59=t1.f59;
+Select * from v1 order by t1_f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+1 NULL single NULL 3 NULL
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 right outer join t1 on t2.f59=t1.f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+1 NULL single NULL 3 NULL
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Create or replace view test.v1 as
+Select f59, f60, a, b
+FROM t2 natural right outer join t1;
+Select * from v1 order by f59 desc;
+f59 f60 a b
+3 single-f3 3 NULL
+2 double 2 2
+1 single 1 NULL
+Select f59, f60, a, b
+FROM t2 natural right outer join t1;
+f59 f60 a b
+1 single 1 NULL
+2 double 2 2
+3 single-f3 3 NULL
+set optimizer_switch=@save_optimizer_switch;
+drop table t1, t2;
+drop view v1 ;
+Use test;
+
+Testcase 3.3.1.A1 - 3.3.1.A3
+--------------------------------------------------------------------------------
+Drop table if exists t1 ;
+Drop view if exists v1;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (101,201,301) ;
+Insert into t1 values (107,501,601) ;
+Insert into t1 values (901,801,401) ;
+Create or replace view test.v1 as
+Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+5
+6
+7
+8
+9
+10
+15
+Drop view if exists test.v1 ;
+Drop table if exists t1 ;
+Drop view if exists v1;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (201,201,201) ;
+Insert into t1 values (207,201,201) ;
+Insert into t1 values (201,201,201) ;
+Create or replace view test.v1
+as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+f59
+207
+Drop view if exists test.v1 ;
+Drop table if exists t1 ;
+Drop view if exists v1;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (21,21,21) ;
+Insert into t1 values (27,21,21) ;
+Insert into t1 values (21,21,21) ;
+Create or replace view test.v1
+as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+f59
+27
+Drop view test.v1 ;
+
+Testcase 3.3.1.63
+--------------------------------------------------------------------------------
+Drop table if exists t1 ;
+Drop view if exists test.v1 ;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (11,21,31) ;
+Insert into t1 values (17,51,61) ;
+Insert into t1 values (91,81,41) ;
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union ALL (Select f59 from t1 where f59=17 );
+Select * from test.v1 order by f59 limit 0,10;
+f59
+17
+17
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union (Select f59 from t1 where f59=17 );
+Select * from test.v1 order by f59 limit 0,10;
+f59
+17
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union Distinct (Select f59 from t1 where f60=17 );
+Select * from test.v1 order by f59 limit 0,10;
+f59
+17
+Drop view test.v1 ;
+drop table if exists t1;
+drop view if exists test.v1;
+create table t1 (f59 int, f60 int, f61 int);
+insert into t1 values (101,201,301);
+insert into t1 values (107,501,601);
+insert into t1 values (901,801,401);
+create or replace view test.v1 as
+select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59;
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+107
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union all
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+107
+107
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union distinct
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+drop view if exists test.v1 ;
+drop table t1;
+
+Testcase 3.3.1.64
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT F59
+FROM test.tb2 where test.tb2.F59 = 109;
+SELECT * FROM test.v1 order by f59 limit 0,10;
+F59
+109
+109
+ALTER VIEW test.v1 AS SELECT *
+FROM test.tb2 WHERE test.tb2.f59 = 242 ;
+SELECT * FROM test.v1 order by f59 limit 0,10;
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+Drop view test.v1 ;
+
+Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS test.v1 ;
+CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = innodb ;
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+DROP VIEW v1;
+DROP VIEW v1;
+ERROR 42S02: Unknown VIEW: 'test.v1'
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v1;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v1'
+
+Testcase 3.3.1.68
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1_base ;
+DROP VIEW IF EXISTS v1_top ;
+CREATE TABLE t1 ( f1 DOUBLE);
+CREATE VIEW v1_base AS SELECT * FROM t1;
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_top ;
+DROP VIEW v1_top;
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_base ;
+DROP VIEW v1_base;
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
+DROP VIEW v1_top;
+CREATE VIEW v1_base AS SELECT * FROM t1;
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_top CASCADE ;
+DROP VIEW v1_top;
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_base CASCADE ;
+DROP VIEW v1_base;
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
+DROP VIEW v1_top;
+CREATE VIEW v1_base AS SELECT * FROM t1;
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_top RESTRICT ;
+DROP VIEW v1_top;
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_base RESTRICT ;
+DROP VIEW v1_base;
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
+DROP VIEW v1_top;
+
+Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ENGINE = innodb;
+CREATE VIEW v1 AS SELECT * FROM t1;
+DROP VIEW v1 ;
+SELECT * FROM v1 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW CREATE VIEW v1 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW CREATE TABLE v1 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW TABLE STATUS like 'v1' ;
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+SHOW TABLES LIKE 'v1';
+Tables_in_test (v1)
+SHOW COLUMNS FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW FIELDS FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+CHECK TABLE v1;
+Table Op Msg_type Msg_text
+test.v1 check Error Table 'test.v1' doesn't exist
+test.v1 check status Operation failed
+DESCRIBE v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+EXPLAIN SELECT * FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+Use test;
+
+Testcase 3.3.1.A6
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS test3;
+CREATE DATABASE test3;
+CREATE TABLE test3.t1 (f1 DECIMAL(5,3)) ENGINE = innodb;
+INSERT INTO test3.t1 SET f1 = 1.0;
+CREATE VIEW test3.v0 AS SELECT * FROM test3.t1;
+CREATE VIEW test3.v1 AS SELECT * FROM test3.v0;
+CREATE VIEW test3.v2 AS SELECT * FROM test3.v1;
+CREATE VIEW test3.v3 AS SELECT * FROM test3.v2;
+CREATE VIEW test3.v4 AS SELECT * FROM test3.v3;
+CREATE VIEW test3.v5 AS SELECT * FROM test3.v4;
+CREATE VIEW test3.v6 AS SELECT * FROM test3.v5;
+CREATE VIEW test3.v7 AS SELECT * FROM test3.v6;
+CREATE VIEW test3.v8 AS SELECT * FROM test3.v7;
+CREATE VIEW test3.v9 AS SELECT * FROM test3.v8;
+CREATE VIEW test3.v10 AS SELECT * FROM test3.v9;
+CREATE VIEW test3.v11 AS SELECT * FROM test3.v10;
+CREATE VIEW test3.v12 AS SELECT * FROM test3.v11;
+CREATE VIEW test3.v13 AS SELECT * FROM test3.v12;
+CREATE VIEW test3.v14 AS SELECT * FROM test3.v13;
+CREATE VIEW test3.v15 AS SELECT * FROM test3.v14;
+CREATE VIEW test3.v16 AS SELECT * FROM test3.v15;
+CREATE VIEW test3.v17 AS SELECT * FROM test3.v16;
+CREATE VIEW test3.v18 AS SELECT * FROM test3.v17;
+CREATE VIEW test3.v19 AS SELECT * FROM test3.v18;
+CREATE VIEW test3.v20 AS SELECT * FROM test3.v19;
+CREATE VIEW test3.v21 AS SELECT * FROM test3.v20;
+CREATE VIEW test3.v22 AS SELECT * FROM test3.v21;
+CREATE VIEW test3.v23 AS SELECT * FROM test3.v22;
+CREATE VIEW test3.v24 AS SELECT * FROM test3.v23;
+CREATE VIEW test3.v25 AS SELECT * FROM test3.v24;
+CREATE VIEW test3.v26 AS SELECT * FROM test3.v25;
+CREATE VIEW test3.v27 AS SELECT * FROM test3.v26;
+CREATE VIEW test3.v28 AS SELECT * FROM test3.v27;
+CREATE VIEW test3.v29 AS SELECT * FROM test3.v28;
+CREATE VIEW test3.v30 AS SELECT * FROM test3.v29;
+CREATE VIEW test3.v31 AS SELECT * FROM test3.v30;
+CREATE VIEW test3.v32 AS SELECT * FROM test3.v31;
+SHOW CREATE VIEW test3.v32;
+View Create View character_set_client collation_connection
+v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
+SELECT * FROM test3.v32;
+f1
+1.000
+EXPLAIN SELECT * FROM test3.v32;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1
+DROP VIEW test3.v0;
+SHOW CREATE VIEW test3.v32;
+View Create View character_set_client collation_connection
+v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
+Warnings:
+Warning 1356 View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM test3.v32;
+ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+EXPLAIN SELECT * FROM test3.v32;
+ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+
+FIXME - Setting join_limit to 28 - hangs for higher values
+----------------------------------------------------------
+SET @join_limit = 28;
+SET @max_level = @join_limit - 1;
+DROP DATABASE IF EXISTS test3;
+DROP TABLE IF EXISTS test1.t1;
+DROP TABLE IF EXISTS test2.t1;
+DROP VIEW IF EXISTS test1.v27;
+DROP VIEW IF EXISTS test1.v26;
+DROP VIEW IF EXISTS test1.v25;
+DROP VIEW IF EXISTS test1.v24;
+DROP VIEW IF EXISTS test1.v23;
+DROP VIEW IF EXISTS test1.v22;
+DROP VIEW IF EXISTS test1.v21;
+DROP VIEW IF EXISTS test1.v20;
+DROP VIEW IF EXISTS test1.v19;
+DROP VIEW IF EXISTS test1.v18;
+DROP VIEW IF EXISTS test1.v17;
+DROP VIEW IF EXISTS test1.v16;
+DROP VIEW IF EXISTS test1.v15;
+DROP VIEW IF EXISTS test1.v14;
+DROP VIEW IF EXISTS test1.v13;
+DROP VIEW IF EXISTS test1.v12;
+DROP VIEW IF EXISTS test1.v11;
+DROP VIEW IF EXISTS test1.v10;
+DROP VIEW IF EXISTS test1.v9;
+DROP VIEW IF EXISTS test1.v8;
+DROP VIEW IF EXISTS test1.v7;
+DROP VIEW IF EXISTS test1.v6;
+DROP VIEW IF EXISTS test1.v5;
+DROP VIEW IF EXISTS test1.v4;
+DROP VIEW IF EXISTS test1.v3;
+DROP VIEW IF EXISTS test1.v2;
+DROP VIEW IF EXISTS test1.v1;
+DROP VIEW IF EXISTS test1.v0;
+CREATE DATABASE test3;
+USE test1;
+CREATE TABLE t1 (f1 BIGINT, f2 CHAR(50)) ENGINE = innodb ;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (0, NULL);
+INSERT INTO t1 VALUES (5, 'five');
+INSERT INTO t1 VALUES (1, 'one');
+INSERT INTO t1 VALUES (2, 'two');
+USE test2;
+CREATE TABLE t1 (f1 DECIMAL(64,30), f2 VARCHAR(50)) ENGINE = innodb;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (0.000000000000000000000000000000, NULL);
+INSERT INTO t1 VALUES (5.000000000000000000000000000000, 'five');
+INSERT INTO t1 VALUES (+1.000000000000000000000000000000, 'one');
+INSERT INTO t1 VALUES (3.000000000000000, 'three');
+USE test3;
+CREATE TABLE t1 (f1 DOUBLE, f2 VARBINARY(50)) ENGINE = innodb;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (+0.0E-35, NULL);
+INSERT INTO t1 VALUES (+0.5E+1, 'five');
+INSERT INTO t1 VALUES (20.0E-1, 'two');
+INSERT INTO t1 VALUES (0.0300E2, 'three');
+USE test;
+CREATE OR REPLACE VIEW test1.v0 AS SELECT * FROM test2.t1;
+CREATE OR REPLACE VIEW test1.v1 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v0 tab2;
+CREATE OR REPLACE VIEW test1.v2 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v1 tab2;
+CREATE OR REPLACE VIEW test1.v3 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v2 tab2;
+CREATE OR REPLACE VIEW test1.v4 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v3 tab2;
+CREATE OR REPLACE VIEW test1.v5 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v4 tab2;
+CREATE OR REPLACE VIEW test1.v6 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v5 tab2;
+CREATE OR REPLACE VIEW test1.v7 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v6 tab2;
+CREATE OR REPLACE VIEW test1.v8 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v7 tab2;
+CREATE OR REPLACE VIEW test1.v9 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v8 tab2;
+CREATE OR REPLACE VIEW test1.v10 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v9 tab2;
+CREATE OR REPLACE VIEW test1.v11 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v10 tab2;
+CREATE OR REPLACE VIEW test1.v12 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v11 tab2;
+CREATE OR REPLACE VIEW test1.v13 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v12 tab2;
+CREATE OR REPLACE VIEW test1.v14 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v13 tab2;
+CREATE OR REPLACE VIEW test1.v15 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v14 tab2;
+CREATE OR REPLACE VIEW test1.v16 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v15 tab2;
+CREATE OR REPLACE VIEW test1.v17 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v16 tab2;
+CREATE OR REPLACE VIEW test1.v18 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v17 tab2;
+CREATE OR REPLACE VIEW test1.v19 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v18 tab2;
+CREATE OR REPLACE VIEW test1.v20 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v19 tab2;
+CREATE OR REPLACE VIEW test1.v21 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v20 tab2;
+CREATE OR REPLACE VIEW test1.v22 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v21 tab2;
+CREATE OR REPLACE VIEW test1.v23 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v22 tab2;
+CREATE OR REPLACE VIEW test1.v24 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v23 tab2;
+CREATE OR REPLACE VIEW test1.v25 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v24 tab2;
+CREATE OR REPLACE VIEW test1.v26 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v25 tab2;
+CREATE OR REPLACE VIEW test1.v27 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v26 tab2;
+SHOW CREATE VIEW test1.v27;
+View Create View character_set_client collation_connection
+v27 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v27` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test1`.`t1` `tab1` join `test1`.`v26` `tab2` on(`tab1`.`f1` = `tab2`.`f1` and `tab1`.`f2` = `tab2`.`f2`)) latin1 latin1_swedish_ci
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+f1 f2
+5 five
+
+The output of following EXPLAIN is deactivated, because the result
+differs on some platforms
+FIXME Is this a bug ?
+--------------------------------------------------------------------------------
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+CREATE VIEW test1.v28 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v27 tab2;
+SHOW CREATE VIEW test1.v28;
+View Create View character_set_client collation_connection
+v28 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v28` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v27` `tab2` on(`tab1`.`f1` = `tab2`.`f1` and `tab1`.`f2` = `tab2`.`f2`)) latin1 latin1_swedish_ci
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v28;
+f1 f2
+5 five
+
+The output of following EXPLAIN is deactivated, because the result
+differs on some platforms
+FIXME Is this a bug ?
+--------------------------------------------------------------------------------
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v28;
+DROP VIEW IF EXISTS test1.v28;
+CREATE OR REPLACE VIEW test1.v0 AS
+SELECT f1 as f2, f2 as f1 FROM test2.t1;
+CREATE OR REPLACE VIEW test2.v0 AS
+SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
+SHOW CREATE VIEW test1.v27;
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+CREATE OR REPLACE VIEW test3.v0 AS
+SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1;
+SHOW CREATE VIEW test1.v27;
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+CREATE OR REPLACE VIEW test3.v0 AS
+SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1;
+SHOW CREATE VIEW test1.v27;
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+DROP VIEW IF EXISTS test1.v27;
+DROP VIEW IF EXISTS test1.v26;
+DROP VIEW IF EXISTS test1.v25;
+DROP VIEW IF EXISTS test1.v24;
+DROP VIEW IF EXISTS test1.v23;
+DROP VIEW IF EXISTS test1.v22;
+DROP VIEW IF EXISTS test1.v21;
+DROP VIEW IF EXISTS test1.v20;
+DROP VIEW IF EXISTS test1.v19;
+DROP VIEW IF EXISTS test1.v18;
+DROP VIEW IF EXISTS test1.v17;
+DROP VIEW IF EXISTS test1.v16;
+DROP VIEW IF EXISTS test1.v15;
+DROP VIEW IF EXISTS test1.v14;
+DROP VIEW IF EXISTS test1.v13;
+DROP VIEW IF EXISTS test1.v12;
+DROP VIEW IF EXISTS test1.v11;
+DROP VIEW IF EXISTS test1.v10;
+DROP VIEW IF EXISTS test1.v9;
+DROP VIEW IF EXISTS test1.v8;
+DROP VIEW IF EXISTS test1.v7;
+DROP VIEW IF EXISTS test1.v6;
+DROP VIEW IF EXISTS test1.v5;
+DROP VIEW IF EXISTS test1.v4;
+DROP VIEW IF EXISTS test1.v3;
+DROP VIEW IF EXISTS test1.v2;
+DROP VIEW IF EXISTS test1.v1;
+DROP VIEW IF EXISTS test1.v0;
+DROP DATABASE test3;
+DROP TABLE test1.t1;
+DROP TABLE test2.t1;
+Use test;
+
+Testcase 3.3.2.1
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Create View test.v1 AS SELECT f59,f60 FROM tb2 where f59 = 1995 ;
+INSERT INTO test.v1 (f59,f60) values (879,700) ;
+affected rows: 1
+SELECT f59,f60 FROM test.v1 where f59 = 879 and f60 = 700 ;
+f59 f60
+DELETE FROM tb2 where f59 = 879 and f60 = 700 ;
+Drop view test.v1 ;
+
+Testcase 3.3.2.2
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ;
+affected rows: 1
+SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ;
+f59 2005
+f60 101
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ;
+f59 f60
+2005 101
+DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ;
+Drop view test.v1 ;
+
+Testcase 3.3.2.3
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (780,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM tb2 where f59 = 8 and f60 = 105;
+f59 8
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ;
+f59 f60
+8 105
+Drop view test.v1 ;
+
+Testcase 3.3.2.4
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (781,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ;
+affected rows: 4
+info: Rows matched: 4 Changed: 4 Warnings: 0
+SELECT * FROM tb2 where f59 = 891 and f60 = 105;
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ;
+f59 f60
+891 105
+891 105
+891 105
+891 105
+Drop view test.v1 ;
+
+Testcase 3.3.2.5
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (789,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ;
+DELETE FROM test.v1 where f59 = 789 ;
+affected rows: 1
+SELECT * FROM tb2 where f59 = 789 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ;
+f59 f60
+Drop view test.v1 ;
+
+Testcase 3.3.2.6
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (711,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 711 ;
+DELETE FROM test.v1 where f59 = 711 ;
+affected rows: 1
+SELECT * FROM tb2 where f59 = 711 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ;
+f59 f60
+Drop view test.v1 ;
+
+Testcase 3.3.2.1 - 3.3.2.6 alternative implementation
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 ( f1 BIGINT DEFAULT 0, f2 CHAR(20), f3 NUMERIC(7,4),
+f4 CHAR, PRIMARY KEY(f1));
+CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
+INSERT INTO v1 SET f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NULL NULL NULL
+DELETE FROM t1;
+INSERT INTO v1 SET f2 = 'ABC';
+INSERT INTO v1 SET f2 = 'ABC';
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SELECT * from t1;
+f1 f2 f3 f4
+0 ABC NULL NULL
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 NNN -0.0012 X
+DELETE FROM t1;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f2, f3 FROM t1;
+INSERT INTO v1 SET f2 = 'ABC';
+INSERT INTO v1 SET f2 = 'ABC';
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SELECT * from t1;
+f1 f2 f3 f4
+0 ABC NULL NULL
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1;
+INSERT INTO v1 SET f1 = 1;
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+SELECT * from t1;
+f1 f2 f3 f4
+DELETE FROM t1;
+INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO';
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+SELECT * from t1;
+f1 f2 f3 f4
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1;
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC';
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO';
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej';
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 NNN -0.0012 X
+DELETE FROM t1;
+DROP TABLE t1;
+SET sql_mode = 'traditional';
+CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4) NOT NULL,
+f4 CHAR, PRIMARY KEY(f1));
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1;
+INSERT INTO v1 SET f1 = 1;
+ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default value
+SELECT * from t1;
+f1 f2 f3 f4
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f1 = 1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f4 = 'Y' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 Y
+DELETE FROM t1;
+SET sql_mode = '';
+
+Testcases 3.3.2.7 - 3.3.2.9,
+3.3.2.10 - 3.3.2.11 omitted because of missing
+features EXCEPT and INTERSECT
+--------------------------------------------------------------------------------
+INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ;
+INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ;
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ;
+INSERT INTO t1 VALUES (19,41,32) ;
+INSERT INTO t1 VALUES (59,54,71) ;
+INSERT INTO t1 VALUES (21,91,99) ;
+SET @variant1 = 'UNION ';
+SET @variant2 = 'UNION ALL ';
+SET @variant3 = 'UNION DISTINCT ';
+SET @variant4 = 'EXCEPT ';
+SET @variant5 = 'INTERSECT ';
+CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION DISTINCT SELECT f61 FROM t1 WHERE f59=19;
+INSERT INTO v1 VALUES (3000);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1 ;
+CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION ALL SELECT f61 FROM t1 WHERE f59=19;
+INSERT INTO v1 VALUES (3000);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1 ;
+CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION SELECT f61 FROM t1 WHERE f59=19;
+INSERT INTO v1 VALUES (3000);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1 ;
+
+Testcases 3.3.2.12 - 3.3.2.20
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1, t2 ;
+DROP VIEW IF EXISTS test.v1 ;
+Drop view if exists v2 ;
+CREATE TABLE t1 (f59 int, f60 int, f61 int) ;
+INSERT INTO t1 VALUES (19,41,32) ;
+INSERT INTO t1 VALUES (59,54,71) ;
+INSERT INTO t1 VALUES (21,91,99) ;
+CREATE TABLE t2 (f59 int, f60 int, f61 int) ;
+INSERT INTO t2 VALUES (19,41,32) ;
+INSERT INTO t2 VALUES (59,54,71) ;
+INSERT INTO t2 VALUES (21,91,99) ;
+CREATE VIEW v2 AS SELECT f59, f60, f61 FROM t2 LIMIT 5;
+SET @variant1= 'CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1';
+SET @variant2= 'CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1';
+SET @variant3= 'CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1';
+SET @variant4= 'CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61';
+SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0';
+SET @variant6= 'CREATE VIEW v1 AS SELECT f61 FROM v2';
+SET @variant7= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
+SET @variant8= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1';
+CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f61 FROM v2;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: Column 'f61' is not updatable
+DELETE FROM v1;
+DROP VIEW v1;
+Drop TABLE t1, t2 ;
+Drop VIEW v2 ;
+
+Testcases 3.3.A1
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+CREATE TABLE t1 (f1 BIGINT, f2 DATE DEFAULT NULL, f4 CHAR(5),
+report char(10)) ENGINE = innodb;
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 SET f1 = -1, f4 = 'ABC', report = 't1 0';
+INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(5) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(5) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5);
+INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
+INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
+ERROR 42S22: Unknown column 'f4x' in 'field list'
+INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4x char(5) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4x report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+SELECT * FROM v1 order by f1, report;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5);
+ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10);
+INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2';
+INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(10) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(10) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 --> t1 2
+2 NULL <-- 10 --> v1 2
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 --> t1 2
+2 NULL <-- 10 --> v1 2
+ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8);
+Warnings:
+Warning 1265 Data truncated for column 'f4' at row <some number>
+Warning 1265 Data truncated for column 'f4' at row <some number>
+INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3';
+Warnings:
+Warning 1265 Data truncated for column 'f4' at row 1
+INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3';
+Warnings:
+Warning 1265 Data truncated for column 'f4' at row 1
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(8) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(8) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20);
+INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4';
+INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
+INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
+f4 = '<------ 20 -------->', report = 't1 5';
+INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
+f4 = '<------ 20 -------->', report = 'v1 5';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ALTER TABLE t1 DROP COLUMN f2;
+INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6';
+INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM t1 order by f1, report;
+f1 f4 report
+-1 ABC t1 0
+-1 ABC v1 0
+0 ABC t1 1
+2 <-- 10 - t1 2
+2 <-- 10 - v1 2
+3 <-- 10 - t1 3
+3 <-- 10 - v1 3
+4 <------ 20 --------> t1 4
+4 <------ 20 --------> v1 4
+<------------- 30 -----------> <------ 20 --------> t1 5
+<------------- 30 -----------> <------ 20 --------> v1 5
+ABC <------ 20 --------> t1 6
+SELECT * FROM v1 order by f1, report;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL;
+INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04',
+f4 = '<------ 20 -------->', report = 't1 7';
+INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04',
+f4 = '<------ 20 -------->', report = 'v1 7';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+f2 date YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f4 report f2
+-1 ABC t1 0 NULL
+-1 ABC v1 0 NULL
+0 ABC t1 1 NULL
+2 <-- 10 - t1 2 NULL
+2 <-- 10 - v1 2 NULL
+3 <-- 10 - t1 3 NULL
+3 <-- 10 - v1 3 NULL
+4 <------ 20 --------> t1 4 NULL
+4 <------ 20 --------> v1 4 NULL
+<------------- 30 -----------> <------ 20 --------> t1 5 NULL
+<------------- 30 -----------> <------ 20 --------> v1 5 NULL
+ABC <------ 20 --------> t1 6 NULL
+ABC <------ 20 --------> t1 7 1500-12-04
+ABC <------ 20 --------> v1 7 1500-12-04
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ABC NULL <------ 20 --------> t1 6
+ABC 1500-12-04 <------ 20 --------> t1 7
+ABC 1500-12-04 <------ 20 --------> v1 7
+ALTER TABLE t1 DROP COLUMN f2;
+ALTER TABLE t1 ADD COLUMN f2 FLOAT;
+INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
+f4 = '<------ 20 -------->', report = 't1 8';
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+f4 = '<------ 20 -------->', report = 'v1 8';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+f2 float YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 float YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f4 report f2
+-1 ABC t1 0 NULL
+-1 ABC v1 0 NULL
+0 ABC t1 1 NULL
+2 <-- 10 - t1 2 NULL
+2 <-- 10 - v1 2 NULL
+3 <-- 10 - t1 3 NULL
+3 <-- 10 - v1 3 NULL
+4 <------ 20 --------> t1 4 NULL
+4 <------ 20 --------> v1 4 NULL
+<------------- 30 -----------> <------ 20 --------> t1 5 NULL
+<------------- 30 -----------> <------ 20 --------> v1 5 NULL
+ABC <------ 20 --------> t1 6 NULL
+ABC <------ 20 --------> t1 7 NULL
+ABC <------ 20 --------> t1 8 -0.00033
+ABC <------ 20 --------> v1 7 NULL
+ABC <------ 20 --------> v1 8 -0.00033
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ABC NULL <------ 20 --------> t1 6
+ABC NULL <------ 20 --------> t1 7
+ABC -0.00033 <------ 20 --------> t1 8
+ABC NULL <------ 20 --------> v1 7
+ABC -0.00033 <------ 20 --------> v1 8
+ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2);
+INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
+f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
+ERROR 42S22: Unknown column 'f3' in 'field list'
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+f4 = '<------ 20 -------->', report = 'v1 9a';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+f2 float YES NULL
+f3 decimal(7,2) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 float YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f4 report f2 f3
+-1 ABC t1 0 NULL NULL
+-1 ABC v1 0 NULL NULL
+0 ABC t1 1 NULL NULL
+2 <-- 10 - t1 2 NULL NULL
+2 <-- 10 - v1 2 NULL NULL
+3 <-- 10 - t1 3 NULL NULL
+3 <-- 10 - v1 3 NULL NULL
+4 <------ 20 --------> t1 4 NULL NULL
+4 <------ 20 --------> v1 4 NULL NULL
+<------------- 30 -----------> <------ 20 --------> t1 5 NULL NULL
+<------------- 30 -----------> <------ 20 --------> v1 5 NULL NULL
+ABC <------ 20 --------> t1 6 NULL NULL
+ABC <------ 20 --------> t1 7 NULL NULL
+ABC <------ 20 --------> t1 8 -0.00033 NULL
+ABC <------ 20 --------> t1 9 -0.00033 -2.20
+ABC <------ 20 --------> v1 7 NULL NULL
+ABC <------ 20 --------> v1 8 -0.00033 NULL
+ABC <------ 20 --------> v1 9a -0.00033 NULL
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ABC NULL <------ 20 --------> t1 6
+ABC NULL <------ 20 --------> t1 7
+ABC -0.00033 <------ 20 --------> t1 8
+ABC -0.00033 <------ 20 --------> t1 9
+ABC NULL <------ 20 --------> v1 7
+ABC -0.00033 <------ 20 --------> v1 8
+ABC -0.00033 <------ 20 --------> v1 9a
+DROP TABLE t1;
+DROP VIEW v1;
+CREATE TABLE t1 (f1 CHAR(10), f2 BIGINT) ENGINE = innodb;
+INSERT INTO t1 SET f1 = 'ABC', f2 = 3;
+CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+f2 bigint(20) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+my_sqrt double YES NULL
+SELECT * FROM t1 order by f1, f2;
+f1 f2
+ABC 3
+SELECT * FROM v1 order by 2;
+f1 my_sqrt
+ABC 1.7320508075688772
+ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30);
+INSERT INTO t1 SET f1 = 'ABC', f2 = 'DEF';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+f2 varchar(30) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+my_sqrt double YES NULL
+SELECT * FROM t1 order by f1, f2;
+f1 f2
+ABC 3
+ABC DEF
+SELECT * FROM v1 order by 2;
+f1 my_sqrt
+ABC 0
+ABC 1.7320508075688772
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT SQRT('DEF');
+SQRT('DEF')
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+CREATE VIEW v2 AS SELECT SQRT('DEF');
+SELECT * FROM v2 order by 1;
+SQRT('DEF')
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+DESCRIBE v2;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+my_sqrt double YES NULL
+SELECT * FROM v2 order by 2;
+f1 my_sqrt
+ABC 0
+ABC 1.7320508075688772
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT * FROM t2 order by 2;
+f1 ABC
+my_sqrt 0
+f1 ABC
+my_sqrt 1.7320508075688772
+DROP TABLE t2;
+CREATE TABLE t2 AS SELECT * FROM v1;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT * FROM t2 order by 2;
+f1 ABC
+my_sqrt 0
+f1 ABC
+my_sqrt 1.7320508075688772
+DROP TABLE t2;
+CREATE TABLE t2 AS SELECT * FROM v2;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT * FROM t2 order by 2;
+f1 ABC
+my_sqrt 0
+f1 ABC
+my_sqrt 1.7320508075688772
+DROP TABLE t1;
+DROP TABLE t2;
+DROP VIEW v1;
+DROP VIEW v2;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v1_1;
+DROP VIEW IF EXISTS v1_2;
+DROP VIEW IF EXISTS v1_firstview;
+DROP VIEW IF EXISTS v1_secondview;
+DROP VIEW IF EXISTS v2;
+DROP DATABASE IF EXISTS test2;
+DROP DATABASE IF EXISTS test3;
+DROP DATABASE test1;
+DROP TABLE test.tb2;
diff --git a/mysql-test/suite/funcs_1/r/is_basics_mixed.result b/mysql-test/suite/funcs_1/r/is_basics_mixed.result
new file mode 100644
index 00000000..267bb563
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_basics_mixed.result
@@ -0,0 +1,606 @@
+SHOW DATABASES LIKE 'information_schema';
+Database (information_schema)
+information_schema
+#######################################################################
+# Testcase 3.2.1.20: USE INFORMATION_SCHEMA is supported
+#######################################################################
+connection default;
+USE test;
+SELECT DATABASE();
+DATABASE()
+test
+USE information_schema;
+SELECT DATABASE();
+DATABASE()
+information_schema
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON test.* TO 'testuser1'@'localhost';
+connect testuser1, localhost, testuser1, , test;
+SELECT DATABASE();
+DATABASE()
+test
+USE information_schema;
+SELECT DATABASE();
+DATABASE()
+information_schema
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+#######################################################################
+# Testcase TBD1: The INFORMATION_SCHEMA cannot be dropped.
+#######################################################################
+DROP DATABASE information_schema;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+#######################################################################
+# Testcase TBD2: There cannot be a second database INFORMATION_SCHEMA.
+#######################################################################
+CREATE DATABASE information_schema;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+##################################################################################
+# Testcase 3.2.1.6+3.2.1.7: No user may create an INFORMATION_SCHEMA table or view
+##################################################################################
+connection default;
+USE information_schema;
+CREATE TABLE schemata ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE tables ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE columns ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE character_sets ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE collations ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE collation_character_set_applicability ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE routines ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE statistics ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE views ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE user_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE schema_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE table_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE column_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE table_constraints ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE key_column_usage ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE triggers ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE VIEW tables AS SELECT 'garbage';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE VIEW tables AS SELECT * FROM information_schema.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE VIEW v1 AS SELECT 'garbage';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+USE test;
+CREATE TABLE information_schema. schemata ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. tables ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. columns ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. character_sets ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. collations ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. routines ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. statistics ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. views ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. user_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. schema_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. table_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. column_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. table_constraints ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. key_column_usage ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. triggers ( c1 INT );
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE VIEW information_schema.tables AS SELECT 'garbage';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE VIEW information_schema.tables AS
+SELECT * FROM information_schema.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE VIEW information_schema.v1 AS SELECT 'garbage';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT ALL ON *.* TO testuser1@localhost;
+SHOW GRANTS FOR testuser1@localhost;
+Grants for testuser1@localhost
+GRANT ALL PRIVILEGES ON *.* TO `testuser1`@`localhost`
+connect testuser1, localhost, testuser1, , test;
+USE information_schema;
+CREATE TABLE schemata ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE tables ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE columns ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE character_sets ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE collations ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE collation_character_set_applicability ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE routines ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE statistics ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE views ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE user_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE schema_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE table_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE column_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE table_constraints ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE key_column_usage ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE triggers ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE VIEW tables AS SELECT 'garbage';
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE VIEW tables AS SELECT * FROM information_schema.tables;
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE VIEW v1 AS SELECT 'garbage';
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+USE test;
+CREATE TABLE information_schema. schemata ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. tables ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. columns ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. character_sets ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. collations ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. routines ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. statistics ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. views ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. user_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. schema_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. table_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. column_privileges ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. table_constraints ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. key_column_usage ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema. triggers ( c1 INT );
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE VIEW information_schema.tables AS SELECT 'garbage';
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE VIEW information_schema.tables AS
+SELECT * FROM information_schema.tables;
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+CREATE VIEW information_schema.v1 AS SELECT 'garbage';
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+###############################################################################
+# Testcase 3.2.1.1+3.2.1.2: INFORMATION_SCHEMA tables can be queried via SELECT
+###############################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1_first (f1 BIGINT UNIQUE, f2 BIGINT)
+ENGINE = <some_engine>;
+CREATE TABLE db_datadict.t1_second (f1 BIGINT UNIQUE, f2 BIGINT)
+ENGINE = <some_engine>;
+# Attention: The protocolling of the next result set is disabled.
+SELECT * FROM information_schema.tables;
+SELECT table_name FROM information_schema.tables
+WHERE table_schema = 'db_datadict';
+table_name
+t1_first
+t1_second
+SELECT LENGTH(table_name) FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+LENGTH(table_name)
+8
+9
+SELECT count(table_name) FROM information_schema.tables
+WHERE table_schema LIKE 'db_datadic%';
+count(table_name)
+2
+SELECT CAST((LENGTH(table_schema) + LENGTH(table_name)) AS DECIMAL(15,1))
+FROM information_schema.tables
+WHERE table_schema = 'db_datadict';
+CAST((LENGTH(table_schema) + LENGTH(table_name)) AS DECIMAL(15,1))
+19.0
+20.0
+SELECT table_name FROM information_schema.tables
+WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1;
+table_name
+t1_first
+SELECT table_name FROM information_schema.tables
+WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1,1;
+table_name
+t1_second
+SELECT table_name,table_schema AS my_col FROM information_schema.tables
+WHERE table_name = 't1_first' AND table_schema = 'db_datadict';
+table_name my_col
+t1_first db_datadict
+SELECT HIGH_PRIORITY table_name AS my_col FROM information_schema.tables
+WHERE table_name = 't1_first' OR table_name = 't1_second';
+my_col
+t1_first
+t1_second
+SELECT 1 AS my_col FROM information_schema.tables
+WHERE table_name = 't1_third';
+my_col
+SELECT table_name,table_schema INTO @table_name,@table_schema
+FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name LIMIT 1;
+SELECT @table_name,@table_schema;
+@table_name @table_schema
+t1_first db_datadict
+SELECT table_name,table_schema
+INTO OUTFILE '<OUTFILE>'
+FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
+LINES TERMINATED BY '\n'
+FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+"t1_first","db_datadict"
+"t1_second","db_datadict"
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_first'
+UNION ALL
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_second';
+table_name
+t1_first
+t1_second
+SELECT DISTINCT table_schema FROM information_schema.tables
+WHERE table_name IN (SELECT table_name FROM information_schema.tables
+WHERE table_schema = 'db_datadict')
+ORDER BY table_name;
+table_schema
+db_datadict
+SELECT table_name FROM information_schema.tables t1
+LEFT JOIN information_schema.tables t2 USING(table_name,table_schema)
+WHERE t2.table_schema = 'db_datadict'
+ORDER BY table_name;
+table_name
+t1_first
+t1_second
+USE test;
+SELECT * FROM tables;
+ERROR 42S02: Table 'test.tables' doesn't exist
+#########################################################################
+# Testcase 3.2.1.17+3.2.1.18
+#########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT UNIQUE, f2 BIGINT)
+ENGINE = <some_engine>;
+SELECT * FROM db_datadict.t1;
+f1 f2
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+GRANT CREATE VIEW,SELECT ON db_datadict.* TO testuser1@localhost
+WITH GRANT OPTION;
+GRANT USAGE ON db_datadict.* TO testuser2@localhost;
+FLUSH PRIVILEGES;
+GRANT SELECT on information_schema.* TO testuser1@localhost;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT CREATE VIEW ON information_schema.* TO 'u_6_401018'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT table_schema,table_name FROM information_schema.tables
+WHERE table_schema = 'information_schema' AND table_name = 'tables';
+table_schema table_name
+information_schema TABLES
+SELECT * FROM information_schema.table_privileges
+WHERE table_schema = 'information_schema';
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'information_schema';
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+CREATE SQL SECURITY INVOKER VIEW db_datadict.v2 AS
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM information_schema.tables WHERE table_schema = 'db_datadict';
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM db_datadict.v2
+ORDER BY TABLE_NAME;
+TABLE_SCHEMA TABLE_NAME TABLE_TYPE
+db_datadict t1 BASE TABLE
+db_datadict v2 VIEW
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM information_schema.tables WHERE table_schema = 'db_datadict'
+ORDER BY TABLE_NAME;
+TABLE_SCHEMA TABLE_NAME TABLE_TYPE
+db_datadict t1 BASE TABLE
+db_datadict v2 VIEW
+GRANT SELECT ON db_datadict.v2 to testuser2@localhost;
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM db_datadict.v2;
+TABLE_SCHEMA TABLE_NAME TABLE_TYPE
+db_datadict v2 VIEW
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM information_schema.tables WHERE table_schema = 'db_datadict';
+TABLE_SCHEMA TABLE_NAME TABLE_TYPE
+db_datadict v2 VIEW
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP DATABASE db_datadict;
+#########################################################################
+# Testcase 3.2.1.19
+#########################################################################
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+SELECT 'empty result set was expected' AS my_col
+FROM information_schema.schema_privileges
+WHERE table_schema = 'information_schema';
+my_col
+SELECT 'empty result set was expected' AS my_col
+FROM information_schema.table_privileges
+WHERE table_schema = 'information_schema';
+my_col
+SELECT 'empty result set was expected' AS my_col
+FROM information_schema.column_privileges
+WHERE table_schema = 'information_schema';
+my_col
+GRANT ALTER ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT ALTER ROUTINE ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT CREATE ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT CREATE ROUTINE ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT CREATE TEMPORARY TABLES ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT DELETE ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT DROP ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT EXECUTE ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT INDEX ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT INSERT ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT LOCK TABLES ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT UPDATE ON information_schema.*
+TO 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+SELECT 'empty result set was expected' AS my_col
+FROM information_schema.schema_privileges
+WHERE table_schema = 'information_schema';
+my_col
+SELECT 'empty result set was expected' AS my_col
+FROM information_schema.table_privileges
+WHERE table_schema = 'information_schema';
+my_col
+SELECT 'empty result set was expected' AS my_col
+FROM information_schema.column_privileges
+WHERE table_schema = 'information_schema';
+my_col
+DROP USER 'testuser1'@'localhost';
+#########################################################################
+# Testcase 3.2.1.16
+#########################################################################
+SELECT DISTINCT table_schema FROM information_schema.columns
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT table_schema FROM information_schema.column_privileges
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT constraint_schema,table_schema
+FROM information_schema.key_column_usage
+WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
+constraint_schema table_schema
+SELECT DISTINCT routine_schema FROM information_schema.routines
+WHERE routine_schema LIKE 'db_data%';
+routine_schema
+SELECT DISTINCT schema_name FROM information_schema.schemata
+WHERE schema_name LIKE 'db_data%';
+schema_name
+SELECT DISTINCT table_schema FROM information_schema.schema_privileges
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics
+WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%';
+table_schema index_schema
+SELECT DISTINCT table_schema FROM information_schema.tables
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT constraint_schema,table_schema
+FROM information_schema.table_constraints
+WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
+constraint_schema table_schema
+SELECT DISTINCT table_schema FROM information_schema.table_privileges
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT trigger_schema,event_object_schema
+FROM information_schema.triggers
+WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%';
+trigger_schema event_object_schema
+SELECT DISTINCT table_schema FROM information_schema.views
+WHERE table_schema LIKE 'db_data%';
+table_schema
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT NOT NULL, f3 BIGINT,
+PRIMARY KEY(f1))
+ENGINE = <some_engine>;
+CREATE UNIQUE INDEX UIDX ON db_datadict.t1(f3);
+CREATE PROCEDURE db_datadict.sproc1() SELECT 'db_datadict';
+CREATE FUNCTION db_datadict.func1() RETURNS INT RETURN 0;
+CREATE TRIGGER db_datadict.trig1 BEFORE INSERT ON db_datadict.t1
+FOR EACH ROW SET @aux = 1;
+CREATE VIEW db_datadict.v1 AS SELECT * FROM db_datadict.t1;
+CREATE VIEW db_datadict.v2 AS SELECT * FROM information_schema.tables;
+SELECT DISTINCT table_schema FROM information_schema.columns
+WHERE table_schema LIKE 'db_data%';
+table_schema
+db_datadict
+SELECT DISTINCT table_schema FROM information_schema.column_privileges
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT constraint_schema,table_schema
+FROM information_schema.key_column_usage
+WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
+constraint_schema table_schema
+db_datadict db_datadict
+SELECT DISTINCT routine_schema FROM information_schema.routines
+WHERE routine_schema LIKE 'db_data%';
+routine_schema
+db_datadict
+SELECT DISTINCT schema_name FROM information_schema.schemata
+WHERE schema_name LIKE 'db_data%';
+schema_name
+db_datadict
+SELECT DISTINCT table_schema FROM information_schema.schema_privileges
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics
+WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%';
+table_schema index_schema
+db_datadict db_datadict
+SELECT DISTINCT table_schema FROM information_schema.tables
+WHERE table_schema LIKE 'db_data%';
+table_schema
+db_datadict
+SELECT DISTINCT constraint_schema,table_schema
+FROM information_schema.table_constraints
+WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
+constraint_schema table_schema
+db_datadict db_datadict
+SELECT DISTINCT table_schema FROM information_schema.table_privileges
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT trigger_schema,event_object_schema
+FROM information_schema.triggers
+WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%';
+trigger_schema event_object_schema
+db_datadict db_datadict
+SELECT DISTINCT table_schema FROM information_schema.views
+WHERE table_schema LIKE 'db_data%';
+table_schema
+db_datadict
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT ALL ON test.* TO 'testuser1'@'localhost';
+connect testuser1, localhost, testuser1, , test;
+SELECT DISTINCT table_schema FROM information_schema.columns
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT table_schema FROM information_schema.column_privileges
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT constraint_schema,table_schema
+FROM information_schema.key_column_usage
+WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
+constraint_schema table_schema
+SELECT DISTINCT routine_schema FROM information_schema.routines
+WHERE routine_schema LIKE 'db_data%';
+routine_schema
+SELECT DISTINCT schema_name FROM information_schema.schemata
+WHERE schema_name LIKE 'db_data%';
+schema_name
+SELECT DISTINCT table_schema FROM information_schema.schema_privileges
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics
+WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%';
+table_schema index_schema
+SELECT DISTINCT table_schema FROM information_schema.tables
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT constraint_schema,table_schema
+FROM information_schema.table_constraints
+WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
+constraint_schema table_schema
+SELECT DISTINCT table_schema FROM information_schema.table_privileges
+WHERE table_schema LIKE 'db_data%';
+table_schema
+SELECT DISTINCT trigger_schema,event_object_schema
+FROM information_schema.triggers
+WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%';
+trigger_schema event_object_schema
+SELECT DISTINCT table_schema FROM information_schema.views
+WHERE table_schema LIKE 'db_data%';
+table_schema
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP PROCEDURE IF EXISTS test.p1;
+CREATE PROCEDURE test.p1()
+INSERT INTO information_schema.tables
+SELECT * FROM information_schema.tables LIMIT 1;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE PROCEDURE test.p1()
+UPDATE information_schema.columns SET table_schema = 'garbage';
+CALL test.p1();
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP PROCEDURE test.p1;
+CREATE PROCEDURE test.p1()
+DELETE FROM information_schema.schemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+#########################################################################
+# Testcase 3.2.17.1+3.2.17.2: To be implemented outside of this script
+#########################################################################
diff --git a/mysql-test/suite/funcs_1/r/is_character_sets.result b/mysql-test/suite/funcs_1/r/is_character_sets.result
new file mode 100644
index 00000000..57215693
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_character_sets.result
@@ -0,0 +1,78 @@
+SHOW TABLES FROM information_schema LIKE 'CHARACTER_SETS';
+Tables_in_information_schema (CHARACTER_SETS)
+CHARACTER_SETS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.CHARACTER_SETS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.CHARACTER_SETS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.CHARACTER_SETS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.CHARACTER_SETS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.2.1: INFORMATION_SCHEMA.CHARACTER_SETS layout
+#########################################################################
+DESCRIBE information_schema.CHARACTER_SETS;
+Field Type Null Key Default Extra
+CHARACTER_SET_NAME varchar(32) NO NULL
+DEFAULT_COLLATE_NAME varchar(64) NO NULL
+DESCRIPTION varchar(60) NO NULL
+MAXLEN bigint(3) NO NULL
+SHOW CREATE TABLE information_schema.CHARACTER_SETS;
+Table Create Table
+CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` (
+ `CHARACTER_SET_NAME` varchar(32) NOT NULL,
+ `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL,
+ `DESCRIPTION` varchar(60) NOT NULL,
+ `MAXLEN` bigint(3) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.CHARACTER_SETS;
+Field Type Null Key Default Extra
+CHARACTER_SET_NAME varchar(32) NO NULL
+DEFAULT_COLLATE_NAME varchar(64) NO NULL
+DESCRIPTION varchar(60) NO NULL
+MAXLEN bigint(3) NO NULL
+# Testcases 3.2.2.2 and 3.2.2.3 are checked in suite/funcs_1/t/charset_collation*.test
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+INSERT INTO information_schema.character_sets
+SELECT * FROM information_schema.character_sets;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.character_sets SET description = 'just updated';
+Got one of the listed errors
+DELETE FROM information_schema.character_sets WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.character_sets;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx ON information_schema.character_sets(character_set_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.character_sets DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.character_sets ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.character_sets;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.character_sets RENAME db_datadict.character_sets;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.character_sets
+RENAME information_schema.xcharacter_sets;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result
new file mode 100644
index 00000000..f2e3d7ae
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result
@@ -0,0 +1,189 @@
+#
+# MDEV-14474: Create INFORMATION_SCHEMA.CHECK_CONSTRAINTS
+#
+CREATE user boo1;
+GRANT select,create,alter,drop on foo.* to boo1;
+SHOW GRANTS for boo1;
+Grants for boo1@%
+GRANT USAGE ON *.* TO `boo1`@`%`
+GRANT SELECT, CREATE, DROP, ALTER ON `foo`.* TO `boo1`@`%`
+CREATE user boo2;
+create database foo;
+CONNECT con1,localhost, boo1,, foo;
+SET check_constraint_checks=1;
+CREATE TABLE t0
+(
+t int, check (t>32) # table constraint
+) ENGINE=myisam;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+ALTER TABLE t0
+ADD CONSTRAINT CHK_t0_t CHECK(t<100);
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CHK_t0_t Table `t` < 100
+def foo t0 CONSTRAINT_1 Table `t` > 32
+ALTER TABLE t0
+DROP CONSTRAINT CHK_t0_t;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+ALTER TABLE t0
+ADD CONSTRAINT CHECK(t<50);
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+CREATE TABLE t1
+( t int CHECK(t>2), # field constraint
+tt int,
+CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints
+CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint
+) ENGINE=InnoDB;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CHK_tt Table `tt` < 100
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
+ALTER TABLE t1
+DROP CONSTRAINT CHK_tt;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
+CREATE TABLE t2
+(
+name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint
+start_date DATE,
+end_date DATE,
+CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint
+)ENGINE=Innodb;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
+def foo t2 CHK_dates Table `start_date` is null
+def foo t2 name Column char_length(`name`) > 2
+ALTER TABLE t1
+ADD CONSTRAINT CHK_new_ CHECK(t>tt);
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CHK_new_ Table `t` > `tt`
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
+def foo t2 CHK_dates Table `start_date` is null
+def foo t2 name Column char_length(`name`) > 2
+CREATE TABLE t3
+(
+a int,
+b int check (b>0), # field constraint named 'b'
+CONSTRAINT b check (b>10), # table constraint
+# `CHECK_CLAUSE` should allow more then `var(64)` constraints
+CONSTRAINT b1 check (b<123456789012345678901234567890123456789012345678901234567890123456789)
+) ENGINE=InnoDB;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CHK_new_ Table `t` > `tt`
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
+def foo t2 CHK_dates Table `start_date` is null
+def foo t2 name Column char_length(`name`) > 2
+def foo t3 b Column `b` > 0
+def foo t3 b Table `b` > 10
+def foo t3 b1 Table `b` < 123456789012345678901234567890123456789012345678901234567890123456789
+disconnect con1;
+CONNECT con2, localhost, boo2,,"*NO-ONE*";
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+disconnect con2;
+CONNECT con1, localhost, boo1,,foo;
+DROP TABLE t0;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP DATABASE foo;
+disconnect con1;
+connection default;
+DROP USER boo1;
+DROP USER boo2;
+#
+# MDEV-18440: Information_schema.check_constraints possible data leak
+#
+CREATE USER foo;
+CREATE DATABASE db;
+USE db;
+CREATE TABLE t1 (a int, b int, CONSTRAINT CHECK (b > 0));
+INSERT INTO t1 VALUES (1, 2), (2, 3);
+GRANT SELECT (a) ON t1 TO foo;
+SHOW GRANTS FOR foo;
+Grants for foo@%
+GRANT USAGE ON *.* TO `foo`@`%`
+GRANT SELECT (`a`) ON `db`.`t1` TO `foo`@`%`
+SELECT * FROM information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def db t1 CONSTRAINT_1 Table `b` > 0
+def mysql global_priv Priv Column json_valid(`Priv`)
+CONNECT con1,localhost, foo,, db;
+SELECT a FROM t1;
+a
+1
+2
+SELECT * FROM information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+connection default;
+DROP USER foo;
+DROP DATABASE db;
+#
+# MDEV-24601: INFORMATION_SCHEMA doesn't differentiate between
+# column and table-level CHECK constraints
+#
+use test;
+create table t(check (t0>0),
+t0 int,
+t1 int check (t1<0),
+t2 int check (t2<-1),
+CONSTRAINT tc_1 check(t1 > 1),
+CONSTRAINT t2 check(t2 > 1));
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `t0` int(11) DEFAULT NULL,
+ `t1` int(11) DEFAULT NULL CHECK (`t1` < 0),
+ `t2` int(11) DEFAULT NULL CHECK (`t2` < -1),
+ CONSTRAINT `CONSTRAINT_1` CHECK (`t0` > 0),
+ CONSTRAINT `tc_1` CHECK (`t1` > 1),
+ CONSTRAINT `t2` CHECK (`t2` > 1)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+select * from information_schema.table_constraints where CONSTRAINT_TYPE='CHECK';
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+def mysql Priv mysql global_priv CHECK
+def test CONSTRAINT_1 test t CHECK
+def test t1 test t CHECK
+def test t2 test t CHECK
+def test t2 test t CHECK
+def test tc_1 test t CHECK
+select * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def mysql global_priv Priv Column json_valid(`Priv`)
+def test t CONSTRAINT_1 Table `t0` > 0
+def test t t1 Column `t1` < 0
+def test t t2 Column `t2` < -1
+def test t t2 Table `t2` > 1
+def test t tc_1 Table `t1` > 1
+drop table t;
diff --git a/mysql-test/suite/funcs_1/r/is_cml_innodb.result b/mysql-test/suite/funcs_1/r/is_cml_innodb.result
new file mode 100644
index 00000000..38eaff54
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_cml_innodb.result
@@ -0,0 +1,111 @@
+USE test;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1
+(
+f1 CHAR UNICODE,
+f2 CHAR(0) UNICODE,
+f3 CHAR(10) UNICODE,
+f5 VARCHAR(0) UNICODE,
+f6 VARCHAR(255) UNICODE,
+f7 VARCHAR(260) UNICODE,
+f8 TEXT UNICODE,
+f9 TINYTEXT UNICODE,
+f10 MEDIUMTEXT UNICODE,
+f11 LONGTEXT UNICODE
+) ENGINE = InnoDB;
+SELECT * FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 f1 1 NULL YES char 1 2 NULL NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references NEVER NULL
+def test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references NEVER NULL
+def test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references NEVER NULL
+def test t1 f2 2 NULL YES char 0 0 NULL NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references NEVER NULL
+def test t1 f3 3 NULL YES char 10 20 NULL NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references NEVER NULL
+def test t1 f5 4 NULL YES varchar 0 0 NULL NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references NEVER NULL
+def test t1 f6 5 NULL YES varchar 255 510 NULL NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references NEVER NULL
+def test t1 f7 6 NULL YES varchar 260 520 NULL NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references NEVER NULL
+def test t1 f8 7 NULL YES text 32767 65535 NULL NULL NULL ucs2 ucs2_general_ci text select,insert,update,references NEVER NULL
+def test t1 f9 8 NULL YES tinytext 127 255 NULL NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+2.0000 char ucs2 ucs2_general_ci
+2.0000 longtext ucs2 ucs2_general_ci
+2.0000 mediumtext ucs2 ucs2_general_ci
+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,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1)
+NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0)
+2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10)
+NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0)
+2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255)
+2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260)
+2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text
+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_cml_memory.result b/mysql-test/suite/funcs_1/r/is_cml_memory.result
new file mode 100644
index 00000000..1f9b7d81
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_cml_memory.result
@@ -0,0 +1,82 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1
+(
+f1 CHAR UNICODE,
+f2 CHAR(0) UNICODE,
+f3 CHAR(10) UNICODE,
+f5 VARCHAR(0) UNICODE,
+f6 VARCHAR(255) UNICODE,
+f7 VARCHAR(260) UNICODE
+) ENGINE = MEMORY;
+SELECT * FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 f1 1 NULL YES char 1 2 NULL NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references NEVER NULL
+def test t1 f2 2 NULL YES char 0 0 NULL NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references NEVER NULL
+def test t1 f3 3 NULL YES char 10 20 NULL NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references NEVER NULL
+def test t1 f5 4 NULL YES varchar 0 0 NULL NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references NEVER NULL
+def test t1 f6 5 NULL YES varchar 255 510 NULL NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references NEVER NULL
+def test t1 f7 6 NULL YES varchar 260 520 NULL NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+2.0000 char ucs2 ucs2_general_ci
+2.0000 varchar ucs2 ucs2_general_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+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
+--> 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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1)
+NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0)
+2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10)
+NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0)
+2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255)
+2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260)
+DROP TABLE t1;
diff --git a/mysql-test/suite/funcs_1/r/is_cml_myisam.result b/mysql-test/suite/funcs_1/r/is_cml_myisam.result
new file mode 100644
index 00000000..3a6e3daa
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_cml_myisam.result
@@ -0,0 +1,98 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1
+(
+f1 CHAR UNICODE,
+f2 CHAR(0) UNICODE,
+f3 CHAR(10) UNICODE,
+f5 VARCHAR(0) UNICODE,
+f6 VARCHAR(255) UNICODE,
+f7 VARCHAR(260) UNICODE,
+f8 TEXT UNICODE,
+f9 TINYTEXT UNICODE,
+f10 MEDIUMTEXT UNICODE,
+f11 LONGTEXT UNICODE
+) ENGINE = MyISAM;
+SELECT * FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 f1 1 NULL YES char 1 2 NULL NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references NEVER NULL
+def test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references NEVER NULL
+def test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references NEVER NULL
+def test t1 f2 2 NULL YES char 0 0 NULL NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references NEVER NULL
+def test t1 f3 3 NULL YES char 10 20 NULL NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references NEVER NULL
+def test t1 f5 4 NULL YES varchar 0 0 NULL NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references NEVER NULL
+def test t1 f6 5 NULL YES varchar 255 510 NULL NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references NEVER NULL
+def test t1 f7 6 NULL YES varchar 260 520 NULL NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references NEVER NULL
+def test t1 f8 7 NULL YES text 32767 65535 NULL NULL NULL ucs2 ucs2_general_ci text select,insert,update,references NEVER NULL
+def test t1 f9 8 NULL YES tinytext 127 255 NULL NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+2.0000 char ucs2 ucs2_general_ci
+2.0000 longtext ucs2 ucs2_general_ci
+2.0000 mediumtext ucs2 ucs2_general_ci
+2.0000 text ucs2 ucs2_general_ci
+2.0000 varchar ucs2 ucs2_general_ci
+2.0079 tinytext ucs2 ucs2_general_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+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
+--> 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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1)
+NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0)
+2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10)
+NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0)
+2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255)
+2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260)
+2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text
+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
+DROP TABLE t1;
diff --git a/mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result b/mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result
new file mode 100644
index 00000000..fbd76549
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result
@@ -0,0 +1,85 @@
+SHOW TABLES FROM information_schema LIKE 'COLLATION_CHARACTER_SET_APPLICABILITY';
+Tables_in_information_schema (COLLATION_CHARACTER_SET_APPLICABILITY)
+COLLATION_CHARACTER_SET_APPLICABILITY
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.4.1: INFORMATION_SCHEMA.CHARACTER_SET_APPLICABILITY layout
+#########################################################################
+DESCRIBE information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
+Field Type Null Key Default Extra
+COLLATION_NAME varchar(64) NO NULL
+CHARACTER_SET_NAME varchar(32) NO NULL
+FULL_COLLATION_NAME varchar(64) NO NULL
+ID bigint(11) NO NULL
+IS_DEFAULT varchar(3) NO NULL
+SHOW CREATE TABLE information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
+Table Create Table
+COLLATION_CHARACTER_SET_APPLICABILITY CREATE TEMPORARY TABLE `COLLATION_CHARACTER_SET_APPLICABILITY` (
+ `COLLATION_NAME` varchar(64) NOT NULL,
+ `CHARACTER_SET_NAME` varchar(32) NOT NULL,
+ `FULL_COLLATION_NAME` varchar(64) NOT NULL,
+ `ID` bigint(11) NOT NULL,
+ `IS_DEFAULT` varchar(3) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
+Field Type Null Key Default Extra
+COLLATION_NAME varchar(64) NO NULL
+CHARACTER_SET_NAME varchar(32) NO NULL
+FULL_COLLATION_NAME varchar(64) NO NULL
+ID bigint(11) NO NULL
+IS_DEFAULT varchar(3) NO NULL
+# Testcases 3.2.4.2 and 3.2.4.3 are checked in suite/funcs_1/t/charset_collation*.test
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+INSERT INTO information_schema.collation_character_set_applicability
+SELECT * FROM information_schema.collation_character_set_applicability;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.collation_character_set_applicability
+SET collation_name = 'big6_chinese_ci' WHERE character_set_name = 'big6';
+Got one of the listed errors
+UPDATE information_schema.collation_character_set_applicability
+SET character_set_name = 't_4711';
+Got one of the listed errors
+DELETE FROM information_schema.collation_character_set_applicability;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.collation_character_set_applicability;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx
+ON information_schema.collation_character_set_applicability(collation_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.collation_character_set_applicability ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.collation_character_set_applicability;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.collation_character_set_applicability
+RENAME db_datadict.collation_character_set_applicability;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.collation_character_set_applicability
+RENAME information_schema.xcollation_character_set_applicability;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_collations.result b/mysql-test/suite/funcs_1/r/is_collations.result
new file mode 100644
index 00000000..979b477b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_collations.result
@@ -0,0 +1,90 @@
+SHOW TABLES FROM information_schema LIKE 'COLLATIONS';
+Tables_in_information_schema (COLLATIONS)
+COLLATIONS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLLATIONS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLLATIONS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.COLLATIONS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.COLLATIONS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.3.1: INFORMATION_SCHEMA.COLLATIONS layout
+#########################################################################
+DESCRIBE information_schema.COLLATIONS;
+Field Type Null Key Default Extra
+COLLATION_NAME varchar(64) NO NULL
+CHARACTER_SET_NAME varchar(32) YES NULL
+ID bigint(11) YES NULL
+IS_DEFAULT varchar(3) YES NULL
+IS_COMPILED varchar(3) NO NULL
+SORTLEN bigint(3) NO NULL
+SHOW CREATE TABLE information_schema.COLLATIONS;
+Table Create Table
+COLLATIONS CREATE TEMPORARY TABLE `COLLATIONS` (
+ `COLLATION_NAME` varchar(64) NOT NULL,
+ `CHARACTER_SET_NAME` varchar(32),
+ `ID` bigint(11),
+ `IS_DEFAULT` varchar(3),
+ `IS_COMPILED` varchar(3) NOT NULL,
+ `SORTLEN` bigint(3) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.COLLATIONS;
+Field Type Null Key Default Extra
+COLLATION_NAME varchar(64) NO NULL
+CHARACTER_SET_NAME varchar(32) YES NULL
+ID bigint(11) YES NULL
+IS_DEFAULT varchar(3) YES NULL
+IS_COMPILED varchar(3) NO NULL
+SORTLEN bigint(3) NO NULL
+# Testcases 3.2.3.2 and 3.2.3.3 are checked in suite/funcs_1/t/charset_collation*.test
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+INSERT INTO information_schema.collations
+SELECT * FROM information_schema.collations;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+INSERT INTO information_schema.collations
+(collation_name,character_set_name,id,is_default,is_compiled,sortlen)
+VALUES ( 'cp1251_bin', 'cp1251',50, '', '',0);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.collations SET description = 'just updated';
+Got one of the listed errors
+DELETE FROM information_schema.collations WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.collations;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx ON information_schema.collations(character_set_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.collations DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.collations ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.collations ENABLE KEYS;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.collations;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.collations RENAME db_datadict.collations;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.collations
+RENAME information_schema.xcollations;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges.result b/mysql-test/suite/funcs_1/r/is_column_privileges.result
new file mode 100644
index 00000000..3e64f217
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_column_privileges.result
@@ -0,0 +1,377 @@
+SHOW TABLES FROM information_schema LIKE 'COLUMN_PRIVILEGES';
+Tables_in_information_schema (COLUMN_PRIVILEGES)
+COLUMN_PRIVILEGES
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLUMN_PRIVILEGES;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLUMN_PRIVILEGES;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.COLUMN_PRIVILEGES;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.COLUMN_PRIVILEGES;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.5.1: INFORMATION_SCHEMA.COLUMN_PRIVILEGES layout
+#########################################################################
+DESCRIBE information_schema.COLUMN_PRIVILEGES;
+Field Type Null Key Default Extra
+GRANTEE varchar(385) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+PRIVILEGE_TYPE varchar(64) NO NULL
+IS_GRANTABLE varchar(3) NO NULL
+SHOW CREATE TABLE information_schema.COLUMN_PRIVILEGES;
+Table Create Table
+COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` (
+ `GRANTEE` varchar(385) NOT NULL,
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `COLUMN_NAME` varchar(64) NOT NULL,
+ `PRIVILEGE_TYPE` varchar(64) NOT NULL,
+ `IS_GRANTABLE` varchar(3) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.COLUMN_PRIVILEGES;
+Field Type Null Key Default Extra
+GRANTEE varchar(385) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+PRIVILEGE_TYPE varchar(64) NO NULL
+IS_GRANTABLE varchar(3) NO NULL
+SELECT table_catalog, table_schema, table_name, column_name, privilege_type
+FROM information_schema.column_privileges WHERE table_catalog IS NOT NULL;
+table_catalog table_schema table_name column_name privilege_type
+######################################################################
+# Testcase 3.2.5.2+3.2.5.3+3.2.5.4:
+# INFORMATION_SCHEMA.COLUMN_PRIVILEGES accessible information
+######################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 INT, f2 DECIMAL, f3 TEXT)
+ENGINE = <other_engine_type>;
+USE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT INSERT(f1) ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT UPDATE(f2) ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT SELECT(f2) ON db_datadict.t1 TO 'testuser2'@'localhost';
+GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost';
+GRANT SELECT(f3) ON db_datadict.t1 TO 'testuser3'@'localhost';
+GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'
+WITH GRANT OPTION;
+GRANT ALL ON db_datadict.* TO 'testuser3'@'localhost';
+SELECT * FROM information_schema.column_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict t1 f1 INSERT NO
+'testuser1'@'localhost' def db_datadict t1 f1 SELECT NO
+'testuser1'@'localhost' def db_datadict t1 f2 UPDATE NO
+'testuser1'@'localhost' def db_datadict t1 f3 SELECT NO
+'testuser2'@'localhost' def db_datadict t1 f2 SELECT NO
+'testuser3'@'localhost' def db_datadict t1 f3 SELECT YES
+GRANT UPDATE(f3) ON db_datadict.t1 TO 'testuser1'@'localhost'
+WITH GRANT OPTION;
+SELECT * FROM information_schema.column_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict t1 f1 INSERT YES
+'testuser1'@'localhost' def db_datadict t1 f1 SELECT YES
+'testuser1'@'localhost' def db_datadict t1 f2 UPDATE YES
+'testuser1'@'localhost' def db_datadict t1 f3 SELECT YES
+'testuser1'@'localhost' def db_datadict t1 f3 UPDATE YES
+'testuser2'@'localhost' def db_datadict t1 f2 SELECT NO
+'testuser3'@'localhost' def db_datadict t1 f3 SELECT YES
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.column_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict t1 f1 INSERT YES
+'testuser1'@'localhost' def db_datadict t1 f1 SELECT YES
+'testuser1'@'localhost' def db_datadict t1 f2 UPDATE YES
+'testuser1'@'localhost' def db_datadict t1 f3 SELECT YES
+'testuser1'@'localhost' def db_datadict t1 f3 UPDATE YES
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.column_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser2'@'localhost' def db_datadict t1 f2 SELECT NO
+connect testuser3, localhost, testuser3, , db_datadict;
+# FIXME: Is it correct that granted TABLES do not occur in COLUMN_PRIVILEGES?
+SELECT * FROM information_schema.table_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee,table_schema,table_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser3'@'localhost' def db_datadict t1 INSERT YES
+'testuser3'@'localhost' def db_datadict t1 SELECT YES
+SELECT * FROM information_schema.schema_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser3'@'localhost' def db_datadict ALTER NO
+'testuser3'@'localhost' def db_datadict ALTER ROUTINE NO
+'testuser3'@'localhost' def db_datadict CREATE NO
+'testuser3'@'localhost' def db_datadict CREATE ROUTINE NO
+'testuser3'@'localhost' def db_datadict CREATE TEMPORARY TABLES NO
+'testuser3'@'localhost' def db_datadict CREATE VIEW NO
+'testuser3'@'localhost' def db_datadict DELETE NO
+'testuser3'@'localhost' def db_datadict DELETE HISTORY NO
+'testuser3'@'localhost' def db_datadict DROP NO
+'testuser3'@'localhost' def db_datadict EVENT NO
+'testuser3'@'localhost' def db_datadict EXECUTE NO
+'testuser3'@'localhost' def db_datadict INDEX NO
+'testuser3'@'localhost' def db_datadict INSERT NO
+'testuser3'@'localhost' def db_datadict LOCK TABLES NO
+'testuser3'@'localhost' def db_datadict REFERENCES NO
+'testuser3'@'localhost' def db_datadict SELECT NO
+'testuser3'@'localhost' def db_datadict SHOW VIEW NO
+'testuser3'@'localhost' def db_datadict TRIGGER NO
+'testuser3'@'localhost' def db_datadict UPDATE NO
+SELECT * FROM information_schema.column_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser3'@'localhost' def db_datadict t1 f3 SELECT YES
+GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser2'@'localhost';
+# FIXME: Is it intended that *my* grants to others are *NOT* shown here?
+SELECT * FROM information_schema.column_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser3'@'localhost' def db_datadict t1 f3 SELECT YES
+connection testuser2;
+SELECT * FROM information_schema.column_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser2'@'localhost' def db_datadict t1 f1 SELECT NO
+'testuser2'@'localhost' def db_datadict t1 f2 SELECT NO
+'testuser2'@'localhost' def db_datadict t1 f3 SELECT NO
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+################################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMN_PRIVILEGES modifications
+################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.my_table (f1 BIGINT, f2 CHAR(10), f3 DATE)
+ENGINE = <engine_type>;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT ALL ON test.* TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+connect testuser1, localhost, testuser1, , test;
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+connection default;
+GRANT SELECT (f1,f3) ON db_datadict.my_table TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict my_table f1 SELECT NO
+'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+connection testuser1;
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict my_table f1 SELECT NO
+'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+connection default;
+ALTER TABLE db_datadict.my_table DROP COLUMN f3;
+GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict my_table f1 SELECT NO
+'testuser1'@'localhost' def db_datadict my_table f1 UPDATE NO
+'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+connection testuser1;
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict my_table f1 SELECT NO
+'testuser1'@'localhost' def db_datadict my_table f1 UPDATE NO
+'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+SELECT f1, f3 FROM db_datadict.my_table;
+ERROR 42S22: Unknown column 'f3' in 'field list'
+connection default;
+ALTER TABLE db_datadict.my_table CHANGE COLUMN f1 my_col BIGINT;
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict my_table f1 SELECT NO
+'testuser1'@'localhost' def db_datadict my_table f1 UPDATE NO
+'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+connection testuser1;
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict my_table f1 SELECT NO
+'testuser1'@'localhost' def db_datadict my_table f1 UPDATE NO
+'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+connection default;
+DROP TABLE db_datadict.my_table;
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict my_table f1 SELECT NO
+'testuser1'@'localhost' def db_datadict my_table f1 UPDATE NO
+'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+connection testuser1;
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict my_table f1 SELECT NO
+'testuser1'@'localhost' def db_datadict my_table f1 UPDATE NO
+'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+connection default;
+REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost';
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+connection testuser1;
+SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT)
+ENGINE = <engine_type>;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT (f1) ON db_datadict.t1 TO 'testuser1'@'localhost';
+INSERT INTO information_schema.column_privileges
+SELECT * FROM information_schema.column_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.column_privileges SET table_schema = 'test'
+WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM information_schema.column_privileges WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.column_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_tables
+ON information_schema.column_privileges(table_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.column_privileges ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.column_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.column_privileges
+RENAME db_datadict.column_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.column_privileges
+RENAME information_schema.xcolumn_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result b/mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result
new file mode 100644
index 00000000..e30bd868
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result
@@ -0,0 +1,36 @@
+##############################################################################
+# Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information
+##############################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.column_privileges
+WHERE table_schema IN ('information_schema','mysql','test')
+ORDER BY table_schema, table_name, column_name;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+SHOW DATABASES LIKE 'information_schema';
+Database (information_schema)
+information_schema
+SHOW DATABASES LIKE 'mysql';
+Database (mysql)
+mysql
+SHOW DATABASES LIKE 'test';
+Database (test)
+test
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.column_privileges
+WHERE table_schema IN ('information_schema','mysql','test')
+ORDER BY table_schema, table_name, column_name;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
+SHOW DATABASES LIKE 'information_schema';
+Database (information_schema)
+information_schema
+SHOW DATABASES LIKE 'mysql';
+Database (mysql)
+SHOW DATABASES LIKE 'test';
+Database (test)
+connection default;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result
new file mode 100644
index 00000000..3d03a1d2
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_columns.result
@@ -0,0 +1,510 @@
+SHOW TABLES FROM information_schema LIKE 'COLUMNS';
+Tables_in_information_schema (COLUMNS)
+COLUMNS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLUMNS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLUMNS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.COLUMNS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.COLUMNS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.6.1: INFORMATION_SCHEMA.COLUMNS layout
+#########################################################################
+DESCRIBE information_schema.COLUMNS;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+ORDINAL_POSITION bigint(21) unsigned NO NULL
+COLUMN_DEFAULT longtext YES NULL
+IS_NULLABLE varchar(3) NO NULL
+DATA_TYPE varchar(64) NO NULL
+CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL
+CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL
+NUMERIC_PRECISION bigint(21) unsigned YES NULL
+NUMERIC_SCALE bigint(21) unsigned YES NULL
+DATETIME_PRECISION bigint(21) unsigned YES NULL
+CHARACTER_SET_NAME varchar(32) YES NULL
+COLLATION_NAME varchar(64) YES NULL
+COLUMN_TYPE longtext NO NULL
+COLUMN_KEY varchar(3) NO NULL
+EXTRA varchar(80) NO NULL
+PRIVILEGES varchar(80) NO NULL
+COLUMN_COMMENT varchar(1024) NO NULL
+IS_GENERATED varchar(6) NO NULL
+GENERATION_EXPRESSION longtext YES NULL
+SHOW CREATE TABLE information_schema.COLUMNS;
+Table Create Table
+COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `COLUMN_NAME` varchar(64) NOT NULL,
+ `ORDINAL_POSITION` bigint(21) unsigned NOT NULL,
+ `COLUMN_DEFAULT` longtext,
+ `IS_NULLABLE` varchar(3) NOT NULL,
+ `DATA_TYPE` varchar(64) NOT NULL,
+ `CHARACTER_MAXIMUM_LENGTH` bigint(21) unsigned,
+ `CHARACTER_OCTET_LENGTH` bigint(21) unsigned,
+ `NUMERIC_PRECISION` bigint(21) unsigned,
+ `NUMERIC_SCALE` bigint(21) unsigned,
+ `DATETIME_PRECISION` bigint(21) unsigned,
+ `CHARACTER_SET_NAME` varchar(32),
+ `COLLATION_NAME` varchar(64),
+ `COLUMN_TYPE` longtext NOT NULL,
+ `COLUMN_KEY` varchar(3) NOT NULL,
+ `EXTRA` varchar(80) NOT NULL,
+ `PRIVILEGES` varchar(80) NOT NULL,
+ `COLUMN_COMMENT` varchar(1024) NOT NULL,
+ `IS_GENERATED` varchar(6) NOT NULL,
+ `GENERATION_EXPRESSION` longtext
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.COLUMNS;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+ORDINAL_POSITION bigint(21) unsigned NO NULL
+COLUMN_DEFAULT longtext YES NULL
+IS_NULLABLE varchar(3) NO NULL
+DATA_TYPE varchar(64) NO NULL
+CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL
+CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL
+NUMERIC_PRECISION bigint(21) unsigned YES NULL
+NUMERIC_SCALE bigint(21) unsigned YES NULL
+DATETIME_PRECISION bigint(21) unsigned YES NULL
+CHARACTER_SET_NAME varchar(32) YES NULL
+COLLATION_NAME varchar(64) YES NULL
+COLUMN_TYPE longtext NO NULL
+COLUMN_KEY varchar(3) NO NULL
+EXTRA varchar(80) NO NULL
+PRIVILEGES varchar(80) NO NULL
+COLUMN_COMMENT varchar(1024) NO NULL
+IS_GENERATED varchar(6) NO NULL
+GENERATION_EXPRESSION longtext YES NULL
+SELECT table_catalog, table_schema, table_name, column_name
+FROM information_schema.columns WHERE table_catalog IS NULL OR table_catalog <> 'def';
+table_catalog table_schema table_name column_name
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+###############################################################################
+# Testcase 3.2.6.2 + 3.2.6.3: INFORMATION_SCHEMA.COLUMNS accessible information
+###############################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+CREATE TABLE db_datadict.t1
+(f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT AUTO_INCREMENT,
+UNIQUE INDEX MUL_IDX(f1,f3), PRIMARY KEY (f4))
+ENGINE = <other_engine_type>;
+CREATE VIEW db_datadict.v1 AS SELECT 1 AS f1, 1 AS f2;
+GRANT SELECT(f1, f2) ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT SELECT(f2) ON db_datadict.v1 TO 'testuser1'@'localhost';
+CREATE TABLE db_datadict.t2
+(f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT, PRIMARY KEY (f1,f4))
+ENGINE = <other_engine_type>;
+GRANT INSERT(f1, f2) ON db_datadict.t2 TO 'testuser2'@'localhost';
+SELECT * FROM information_schema.columns
+WHERE table_schema = 'db_datadict'
+ORDER BY table_schema, table_name, ordinal_position;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) MUL select,insert,update,references NEVER NULL
+def db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
+def db_datadict t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def db_datadict t1 f4 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) PRI auto_increment select,insert,update,references NEVER NULL
+def db_datadict t2 f1 1 NULL NO char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) PRI select,insert,update,references NEVER NULL
+def db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
+def db_datadict t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def db_datadict t2 f4 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) PRI select,insert,update,references NEVER NULL
+def db_datadict v1 f1 1 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select,insert,update,references NEVER NULL
+def db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select,insert,update,references NEVER NULL
+SHOW COLUMNS FROM db_datadict.t1;
+Field Type Null Key Default Extra
+f1 char(10) YES MUL NULL
+f2 text YES NULL
+f3 date YES NULL
+f4 int(11) NO PRI NULL auto_increment
+SHOW COLUMNS FROM db_datadict.t2;
+Field Type Null Key Default Extra
+f1 char(10) NO PRI NULL
+f2 text YES NULL
+f3 date YES NULL
+f4 int(11) NO PRI NULL
+SHOW COLUMNS FROM db_datadict.v1;
+Field Type Null Key Default Extra
+f1 int(1) NO 0
+f2 int(1) NO 0
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.columns
+WHERE table_schema = 'db_datadict'
+ORDER BY table_schema, table_name, ordinal_position;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) MUL select NEVER NULL
+def db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select NEVER NULL
+def db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select NEVER NULL
+SHOW COLUMNS FROM db_datadict.t1;
+Field Type Null Key Default Extra
+f1 char(10) YES MUL NULL
+f2 text YES NULL
+SHOW COLUMNS FROM db_datadict.t2;
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `db_datadict`.`t2`
+SHOW COLUMNS FROM db_datadict.v1;
+Field Type Null Key Default Extra
+f2 int(1) NO 0
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.columns
+WHERE table_schema = 'db_datadict'
+ORDER BY table_schema, table_name, ordinal_position;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def db_datadict t2 f1 1 NULL NO char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) PRI insert NEVER NULL
+def db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text insert NEVER NULL
+SHOW COLUMNS FROM db_datadict.t1;
+ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table `db_datadict`.`t1`
+SHOW COLUMNS FROM db_datadict.t2;
+Field Type Null Key Default Extra
+f1 char(10) NO PRI NULL
+f2 text YES NULL
+SHOW COLUMNS FROM db_datadict.v1;
+ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table `db_datadict`.`v1`
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP DATABASE IF EXISTS db_datadict;
+###############################################################################
+# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMNS modifications
+###############################################################################
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+SELECT table_name FROM information_schema.columns
+WHERE table_name LIKE 't1_my_table%';
+table_name
+CREATE TABLE test.t1_my_table (f1 CHAR(12))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = <engine_type>;
+SELECT * FROM information_schema.columns
+WHERE table_name = 't1_my_table';
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_table
+COLUMN_NAME f1
+ORDINAL_POSITION 1
+COLUMN_DEFAULT NULL
+IS_NULLABLE YES
+DATA_TYPE char
+CHARACTER_MAXIMUM_LENGTH 12
+CHARACTER_OCTET_LENGTH 12
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME latin1
+COLLATION_NAME latin1_swedish_ci
+COLUMN_TYPE char(12)
+COLUMN_KEY
+EXTRA
+PRIVILEGES select,insert,update,references
+COLUMN_COMMENT
+IS_GENERATED NEVER
+GENERATION_EXPRESSION NULL
+SELECT table_name FROM information_schema.columns
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_table
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT table_name FROM information_schema.columns
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_tablex
+SELECT table_schema,table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+test t1_my_tablex
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT table_schema,table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+db_datadict t1_my_tablex
+SELECT table_name, column_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+t1_my_tablex f1
+ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12);
+SELECT table_name, column_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+t1_my_tablex first_col
+SELECT table_name, column_name, character_maximum_length,
+character_octet_length, column_type
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name character_maximum_length character_octet_length column_type
+t1_my_tablex first_col 12 12 char(12)
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(20);
+SELECT table_name, column_name, character_maximum_length,
+character_octet_length, column_type
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name character_maximum_length character_octet_length column_type
+t1_my_tablex first_col 20 20 char(20)
+SELECT table_name, column_name, character_maximum_length,
+character_octet_length, column_type
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name character_maximum_length character_octet_length column_type
+t1_my_tablex first_col 20 20 char(20)
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col VARCHAR(20);
+SELECT table_name, column_name, character_maximum_length,
+character_octet_length, column_type
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name character_maximum_length character_octet_length column_type
+t1_my_tablex first_col 20 20 varchar(20)
+SELECT table_name, column_name, column_default
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name column_default
+t1_my_tablex first_col NULL
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) DEFAULT 'hello';
+SELECT table_name, column_name, column_default
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name column_default
+t1_my_tablex first_col 'hello'
+SELECT table_name, column_name, is_nullable
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name is_nullable
+t1_my_tablex first_col YES
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) NOT NULL;
+SELECT table_name, column_name, is_nullable
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name is_nullable
+t1_my_tablex first_col NO
+SELECT table_name, column_name, collation_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name collation_name
+t1_my_tablex first_col latin1_swedish_ci
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) COLLATE 'latin1_general_cs';
+SELECT table_name, column_name, collation_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name collation_name
+t1_my_tablex first_col latin1_general_cs
+SELECT table_name, column_name, character_maximum_length,
+character_octet_length, character_set_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name character_maximum_length character_octet_length character_set_name
+t1_my_tablex first_col 10 10 latin1
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) CHARACTER SET utf8;
+SELECT table_name, column_name, character_maximum_length,
+character_octet_length, character_set_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name character_maximum_length character_octet_length character_set_name
+t1_my_tablex first_col 10 30 utf8mb3
+SELECT table_name, column_name, column_comment
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name column_comment
+t1_my_tablex first_col
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) COMMENT 'Hello';
+SELECT table_name, column_name, column_comment
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name column_comment
+t1_my_tablex first_col Hello
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+t1_my_tablex first_col
+ALTER TABLE db_datadict.t1_my_tablex
+ADD COLUMN second_col CHAR(10);
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+t1_my_tablex first_col
+t1_my_tablex second_col
+SELECT table_name, column_name, ordinal_position
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+table_name column_name ordinal_position
+t1_my_tablex first_col 1
+t1_my_tablex second_col 2
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN second_col CHAR(10) FIRST;
+SELECT table_name, column_name, ordinal_position
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+table_name column_name ordinal_position
+t1_my_tablex first_col 2
+t1_my_tablex second_col 1
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+t1_my_tablex second_col
+t1_my_tablex first_col
+ALTER TABLE db_datadict.t1_my_tablex
+DROP COLUMN first_col;
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+t1_my_tablex second_col
+SELECT table_name, column_name, column_key
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name column_key
+t1_my_tablex second_col
+ALTER TABLE db_datadict.t1_my_tablex
+ADD UNIQUE INDEX IDX(second_col);
+SELECT table_name, column_name, column_key
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name column_key
+t1_my_tablex second_col UNI
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+t1_my_tablex second_col
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+CREATE VIEW test.t1_my_tablex
+AS SELECT 1 AS "col1", 'A' collate latin1_german1_ci AS "col2";
+SELECT * FROM information_schema.columns
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_tablex
+COLUMN_NAME col1
+ORDINAL_POSITION 1
+COLUMN_DEFAULT 0
+IS_NULLABLE NO
+DATA_TYPE int
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION 10
+NUMERIC_SCALE 0
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+COLUMN_TYPE int(1)
+COLUMN_KEY
+EXTRA
+PRIVILEGES select,insert,update,references
+COLUMN_COMMENT
+IS_GENERATED NEVER
+GENERATION_EXPRESSION NULL
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_tablex
+COLUMN_NAME col2
+ORDINAL_POSITION 2
+COLUMN_DEFAULT NULL
+IS_NULLABLE YES
+DATA_TYPE varchar
+CHARACTER_MAXIMUM_LENGTH 1
+CHARACTER_OCTET_LENGTH 1
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME latin1
+COLLATION_NAME latin1_german1_ci
+COLUMN_TYPE varchar(1)
+COLUMN_KEY
+EXTRA
+PRIVILEGES select,insert,update,references
+COLUMN_COMMENT
+IS_GENERATED NEVER
+GENERATION_EXPRESSION NULL
+DROP VIEW test.t1_my_tablex;
+SELECT table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = <engine_type> AS
+SELECT 1;
+SELECT table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+table_name
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+DROP TABLE IF EXISTS test.t1;
+CREATE DATABASE db_datadict;
+CREATE TABLE test.t1 (f1 BIGINT);
+INSERT INTO information_schema.columns (table_schema,table_name,column_name)
+VALUES('test','t1', 'f2');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+INSERT INTO information_schema.columns (table_schema,table_name,column_name)
+VALUES('test','t2', 'f1');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.columns SET table_name = 't4' WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM information_schema.columns WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.columns;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX i3 ON information_schema.columns(table_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.columns ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.columns;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.columns RENAME db_datadict.columns;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.columns RENAME information_schema.xcolumns;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE test.t1;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
new file mode 100644
index 00000000..beb8ad88
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
@@ -0,0 +1,1147 @@
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+USE test;
+drop table if exists tb1 ;
+create table tb1 (
+f1 char(0),
+f2 char(0) binary,
+f3 char(0) ascii,
+f4 tinytext,
+f5 text,
+f6 mediumtext,
+f7 longtext,
+f8 tinyblob,
+f9 blob,
+f10 mediumblob,
+f11 longblob,
+f12 binary,
+f13 tinyint,
+f14 tinyint unsigned,
+f15 tinyint zerofill,
+f16 tinyint unsigned zerofill,
+f17 smallint,
+f18 smallint unsigned,
+f19 smallint zerofill,
+f20 smallint unsigned zerofill,
+f21 mediumint,
+f22 mediumint unsigned,
+f23 mediumint zerofill,
+f24 mediumint unsigned zerofill,
+f25 int,
+f26 int unsigned,
+f27 int zerofill,
+f28 int unsigned zerofill,
+f29 bigint,
+f30 bigint unsigned,
+f31 bigint zerofill,
+f32 bigint unsigned zerofill,
+f33 decimal,
+f34 decimal unsigned,
+f35 decimal zerofill,
+f36 decimal unsigned zerofill not null DEFAULT 9.9,
+f37 decimal (0) not null DEFAULT 9.9,
+f38 decimal (64) not null DEFAULT 9.9,
+f39 decimal (0) unsigned not null DEFAULT 9.9,
+f40 decimal (64) unsigned not null DEFAULT 9.9,
+f41 decimal (0) zerofill not null DEFAULT 9.9,
+f42 decimal (64) zerofill not null DEFAULT 9.9,
+f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
+f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
+f45 decimal (0,0) not null DEFAULT 9.9,
+f46 decimal (63,30) not null DEFAULT 9.9,
+f47 decimal (0,0) unsigned not null DEFAULT 9.9,
+f48 decimal (63,30) unsigned not null DEFAULT 9.9,
+f49 decimal (0,0) zerofill not null DEFAULT 9.9,
+f50 decimal (63,30) zerofill not null DEFAULT 9.9,
+f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
+f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
+f53 numeric not null DEFAULT 99,
+f54 numeric unsigned not null DEFAULT 99,
+f55 numeric zerofill not null DEFAULT 99,
+f56 numeric unsigned zerofill not null DEFAULT 99,
+f57 numeric (0) not null DEFAULT 99,
+f58 numeric (64) not null DEFAULT 99
+) engine = innodb;
+Warnings:
+Note 1265 Data truncated for column 'f36' at row 0
+Note 1265 Data truncated for column 'f37' at row 0
+Note 1265 Data truncated for column 'f38' at row 0
+Note 1265 Data truncated for column 'f39' at row 0
+Note 1265 Data truncated for column 'f40' at row 0
+Note 1265 Data truncated for column 'f41' at row 0
+Note 1265 Data truncated for column 'f42' at row 0
+Note 1265 Data truncated for column 'f43' at row 0
+Note 1265 Data truncated for column 'f44' at row 0
+Note 1265 Data truncated for column 'f45' at row 0
+Note 1265 Data truncated for column 'f47' at row 0
+Note 1265 Data truncated for column 'f49' at row 0
+Note 1265 Data truncated for column 'f51' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb1.txt'
+into table tb1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = innodb;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
+into table tb2;
+drop table if exists tb3 ;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 tinytext,
+f122 text,
+f123 mediumtext,
+f124 longtext,
+f125 tinyblob,
+f126 blob,
+f127 mediumblob,
+f128 longblob,
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = innodb;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb3.txt'
+into table tb3;
+drop table if exists tb4;
+create table tb4 (
+f176 numeric (0) unsigned not null DEFAULT 9,
+f177 numeric (64) unsigned not null DEFAULT 9,
+f178 numeric (0) zerofill not null DEFAULT 9,
+f179 numeric (64) zerofill not null DEFAULT 9,
+f180 numeric (0) unsigned zerofill not null DEFAULT 9,
+f181 numeric (64) unsigned zerofill not null DEFAULT 9,
+f182 numeric (0,0) not null DEFAULT 9,
+f183 numeric (63,30) not null DEFAULT 9,
+f184 numeric (0,0) unsigned not null DEFAULT 9,
+f185 numeric (63,30) unsigned not null DEFAULT 9,
+f186 numeric (0,0) zerofill not null DEFAULT 9,
+f187 numeric (63,30) zerofill not null DEFAULT 9,
+f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
+f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
+f190 real not null DEFAULT 88.8,
+f191 real unsigned not null DEFAULT 88.8,
+f192 real zerofill not null DEFAULT 88.8,
+f193 real unsigned zerofill not null DEFAULT 88.8,
+f194 double not null DEFAULT 55.5,
+f195 double unsigned not null DEFAULT 55.5,
+f196 double zerofill not null DEFAULT 55.5,
+f197 double unsigned zerofill not null DEFAULT 55.5,
+f198 float,
+f199 float unsigned,
+f200 float zerofill,
+f201 float unsigned zerofill,
+f202 float(0),
+f203 float(23),
+f204 float(0) unsigned,
+f205 float(23) unsigned,
+f206 float(0) zerofill,
+f207 float(23) zerofill,
+f208 float(0) unsigned zerofill,
+f209 float(23) unsigned zerofill,
+f210 float(24),
+f211 float(53),
+f212 float(24) unsigned,
+f213 float(53) unsigned,
+f214 float(24) zerofill,
+f215 float(53) zerofill,
+f216 float(24) unsigned zerofill,
+f217 float(53) unsigned zerofill,
+f218 date,
+f219 time,
+f220 datetime,
+f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+f222 year,
+f223 year(3),
+f224 year(4),
+f225 enum("1enum","2enum"),
+f226 set("1set","2set"),
+f235 char(0),
+f236 char(90),
+f237 char(255) ascii,
+f238 varchar(0),
+f239 varchar(20000) binary,
+f240 varchar(2000),
+f241 char(100)
+) engine = innodb;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb4.txt'
+into table tb4;
+USE test1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = innodb;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
+into table tb2;
+USE test;
+USE test;
+DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
+CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = InnoDB;
+CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = InnoDB;
+CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = InnoDB;
+CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = InnoDB;
+CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = InnoDB;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t1;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t2;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t4;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t10;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t11;
+drop TABLE if exists t3;
+CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' INTO TABLE t3;
+drop database if exists test4;
+CREATE database test4;
+use test4;
+CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
+ENGINE = InnoDB;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t6;
+use test;
+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;
+ERROR 22007: Incorrect date value: '' for column `test`.`t7`.`f3` at row 1
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' INTO TABLE t8;
+ERROR 22007: Incorrect date value: '' for column `test`.`t8`.`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;
+SELECT * FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t1 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t1 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t10 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t10 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t10 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t11 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t11 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t11 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t2 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t2 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t2 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t3 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t3 f2 2 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t4 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t4 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t4 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t7 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t7 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t8 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t8 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t9 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test tb1 f1 1 NULL YES char 0 0 NULL NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references NEVER NULL
+def test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL NULL mediumblob select,insert,update,references NEVER NULL
+def test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
+def test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) select,insert,update,references NEVER NULL
+def test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
+def test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(6) select,insert,update,references NEVER NULL
+def test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references NEVER NULL
+def test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f2 2 NULL YES char 0 0 NULL NULL NULL latin1 latin1_bin char(0) select,insert,update,references NEVER NULL
+def test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL NULL mediumint(9) select,insert,update,references NEVER NULL
+def test tb1 f22 22 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned select,insert,update,references NEVER NULL
+def test tb1 f23 23 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f24 24 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def test tb1 f3 3 NULL YES char 0 0 NULL NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references NEVER NULL
+def test tb1 f30 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def test tb1 f31 31 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f32 32 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f33 33 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f34 34 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f35 35 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f4 4 NULL YES tinytext 255 255 NULL NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NEVER NULL
+def test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f5 5 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
+def test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references NEVER NULL
+def test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references NEVER NULL
+def test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob select,insert,update,references NEVER NULL
+def test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
+def test tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
+def test tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def test tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
+def test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
+def test tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
+def test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f118 1 'a' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb3 f119 2 '' NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
+def test tb3 f120 3 '' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NEVER NULL
+def test tb3 f122 5 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
+def test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references NEVER NULL
+def test tb3 f124 7 NULL YES longtext 4294967295 4294967295 NULL NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references NEVER NULL
+def test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob select,insert,update,references NEVER NULL
+def test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
+def test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL NULL mediumblob select,insert,update,references NEVER NULL
+def test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def test tb3 f129 12 '' NO binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
+def test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) select,insert,update,references NEVER NULL
+def test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
+def test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(6) select,insert,update,references NEVER NULL
+def test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references NEVER NULL
+def test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL NULL mediumint(9) select,insert,update,references NEVER NULL
+def test tb3 f139 22 9999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned select,insert,update,references NEVER NULL
+def test tb3 f140 23 00009999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f141 24 00009999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def test tb3 f147 30 999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb4 f191 16 88.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb4 f192 17 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f193 18 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb4 f195 20 55.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb4 f196 21 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f197 22 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f199 24 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f200 25 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f201 26 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f204 29 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f205 30 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f206 31 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f207 32 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f208 33 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f209 34 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb4 f212 37 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f213 38 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb4 f214 39 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f215 40 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f216 41 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f217 42 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test tb4 f219 44 NULL YES time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
+def test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def test tb4 f221 46 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb4 f225 50 NULL YES enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
+def test tb4 f226 51 NULL YES set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
+def test tb4 f235 52 NULL YES char 0 0 NULL NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references NEVER NULL
+def test tb4 f236 53 NULL YES char 90 90 NULL NULL NULL latin1 latin1_swedish_ci char(90) select,insert,update,references NEVER NULL
+def test tb4 f237 54 NULL YES char 255 255 NULL NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references NEVER NULL
+def test tb4 f238 55 NULL YES varchar 0 0 NULL NULL NULL latin1 latin1_swedish_ci varchar(0) select,insert,update,references NEVER NULL
+def test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL NULL latin1 latin1_bin varchar(20000) select,insert,update,references NEVER NULL
+def test tb4 f240 57 NULL YES varchar 2000 2000 NULL NULL NULL latin1 latin1_swedish_ci varchar(2000) select,insert,update,references NEVER NULL
+def test tb4 f241 58 NULL YES char 100 100 NULL NULL NULL latin1 latin1_swedish_ci char(100) select,insert,update,references NEVER NULL
+def test1 tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test1 tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
+def test1 tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def test1 tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
+def test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test1 tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
+def test1 tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
+def test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test1 tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test1 tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test1 tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test4 t6 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test4 t6 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test4 t6 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+1.0000 binary NULL NULL
+1.0000 blob NULL NULL
+1.0000 longblob NULL NULL
+1.0000 mediumblob NULL NULL
+1.0000 tinyblob NULL NULL
+1.0000 char latin1 latin1_bin
+1.0000 varchar latin1 latin1_bin
+1.0000 char latin1 latin1_swedish_ci
+1.0000 enum latin1 latin1_swedish_ci
+1.0000 longtext latin1 latin1_swedish_ci
+1.0000 mediumtext latin1 latin1_swedish_ci
+1.0000 set latin1 latin1_swedish_ci
+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,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+NULL bigint NULL NULL
+NULL date NULL NULL
+NULL datetime NULL NULL
+NULL decimal NULL NULL
+NULL double NULL NULL
+NULL float NULL NULL
+NULL int NULL NULL
+NULL mediumint NULL NULL
+NULL smallint NULL NULL
+NULL time NULL NULL
+NULL timestamp NULL NULL
+NULL tinyint NULL NULL
+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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+1.0000 test t1 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t1 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t1 f3 date NULL NULL NULL NULL date
+NULL test t1 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t1 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t1 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t10 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t10 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t10 f3 date NULL NULL NULL NULL date
+NULL test t10 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t10 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t10 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t11 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t11 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t11 f3 date NULL NULL NULL NULL date
+NULL test t11 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t11 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t11 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t2 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t2 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t2 f3 date NULL NULL NULL NULL date
+NULL test t2 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t2 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t2 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t3 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t3 f2 char 20 20 latin1 latin1_swedish_ci char(20)
+NULL test t3 f3 int NULL NULL NULL NULL int(11)
+1.0000 test t4 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t4 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t4 f3 date NULL NULL NULL NULL date
+NULL test t4 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t4 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t4 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t7 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t7 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t7 f3 date NULL NULL NULL NULL date
+NULL test t7 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t8 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t8 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t8 f3 date NULL NULL NULL NULL date
+NULL test t8 f4 int NULL NULL NULL NULL int(11)
+NULL test t9 f1 int NULL NULL NULL NULL int(11)
+1.0000 test t9 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t9 f3 int NULL NULL NULL NULL int(11)
+NULL test tb1 f1 char 0 0 latin1 latin1_swedish_ci char(0)
+NULL test tb1 f2 char 0 0 latin1 latin1_bin char(0)
+NULL test tb1 f3 char 0 0 latin1 latin1_swedish_ci char(0)
+1.0000 test tb1 f4 tinytext 255 255 latin1 latin1_swedish_ci tinytext
+1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text
+1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
+1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
+1.0000 test tb1 f8 tinyblob 255 255 NULL NULL tinyblob
+1.0000 test tb1 f9 blob 65535 65535 NULL NULL blob
+1.0000 test tb1 f10 mediumblob 16777215 16777215 NULL NULL mediumblob
+1.0000 test tb1 f11 longblob 4294967295 4294967295 NULL NULL longblob
+1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1)
+NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4)
+NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned
+NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6)
+NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned
+NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9)
+NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned
+NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb1 f25 int NULL NULL NULL NULL int(11)
+NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned
+NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20)
+NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb2 f73 double NULL NULL NULL NULL double
+NULL test tb2 f74 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f75 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f76 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f77 double NULL NULL NULL NULL double
+NULL test tb2 f78 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f79 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f80 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f81 float NULL NULL NULL NULL float
+NULL test tb2 f82 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f83 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f84 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f85 float NULL NULL NULL NULL float
+NULL test tb2 f86 float NULL NULL NULL NULL float
+NULL test tb2 f87 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f88 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f89 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f90 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f91 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f92 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f93 float NULL NULL NULL NULL float
+NULL test tb2 f94 double NULL NULL NULL NULL double
+NULL test tb2 f95 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f96 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f97 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f98 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f99 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f100 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f101 date NULL NULL NULL NULL date
+NULL test tb2 f102 time NULL NULL NULL NULL time
+NULL test tb2 f103 datetime NULL NULL NULL NULL datetime
+NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp
+NULL test tb2 f105 year NULL NULL NULL NULL year(4)
+NULL test tb2 f106 year NULL NULL NULL NULL year(4)
+NULL test tb2 f107 year NULL NULL NULL NULL year(4)
+1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1)
+1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext
+1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text
+1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
+1.0000 test tb3 f124 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
+1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob
+1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob
+1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob
+1.0000 test tb3 f128 longblob 4294967295 4294967295 NULL NULL longblob
+1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1)
+NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4)
+NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned
+NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6)
+NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned
+NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9)
+NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned
+NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb3 f142 int NULL NULL NULL NULL int(11)
+NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned
+NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20)
+NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb4 f190 double NULL NULL NULL NULL double
+NULL test tb4 f191 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f192 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f193 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f194 double NULL NULL NULL NULL double
+NULL test tb4 f195 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f196 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f197 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f198 float NULL NULL NULL NULL float
+NULL test tb4 f199 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f200 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f201 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f202 float NULL NULL NULL NULL float
+NULL test tb4 f203 float NULL NULL NULL NULL float
+NULL test tb4 f204 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f205 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f206 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f207 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f208 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f209 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f210 float NULL NULL NULL NULL float
+NULL test tb4 f211 double NULL NULL NULL NULL double
+NULL test tb4 f212 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f213 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f214 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f215 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f216 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f217 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f218 date NULL NULL NULL NULL date
+NULL test tb4 f219 time NULL NULL NULL NULL time
+NULL test tb4 f220 datetime NULL NULL NULL NULL datetime
+NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp
+NULL test tb4 f222 year NULL NULL NULL NULL year(4)
+NULL test tb4 f223 year NULL NULL NULL NULL year(4)
+NULL test tb4 f224 year NULL NULL NULL NULL year(4)
+1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+NULL test tb4 f235 char 0 0 latin1 latin1_swedish_ci char(0)
+1.0000 test tb4 f236 char 90 90 latin1 latin1_swedish_ci char(90)
+1.0000 test tb4 f237 char 255 255 latin1 latin1_swedish_ci char(255)
+NULL test tb4 f238 varchar 0 0 latin1 latin1_swedish_ci varchar(0)
+1.0000 test tb4 f239 varchar 20000 20000 latin1 latin1_bin varchar(20000)
+1.0000 test tb4 f240 varchar 2000 2000 latin1 latin1_swedish_ci varchar(2000)
+1.0000 test tb4 f241 char 100 100 latin1 latin1_swedish_ci char(100)
+NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test1 tb2 f73 double NULL NULL NULL NULL double
+NULL test1 tb2 f74 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f75 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f76 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f77 double NULL NULL NULL NULL double
+NULL test1 tb2 f78 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f79 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f80 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f81 float NULL NULL NULL NULL float
+NULL test1 tb2 f82 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f83 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f84 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f85 float NULL NULL NULL NULL float
+NULL test1 tb2 f86 float NULL NULL NULL NULL float
+NULL test1 tb2 f87 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f88 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f89 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f90 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f91 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f92 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f93 float NULL NULL NULL NULL float
+NULL test1 tb2 f94 double NULL NULL NULL NULL double
+NULL test1 tb2 f95 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f96 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f97 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f98 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f99 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f100 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f101 date NULL NULL NULL NULL date
+NULL test1 tb2 f102 time NULL NULL NULL NULL time
+NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime
+NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp
+NULL test1 tb2 f105 year NULL NULL NULL NULL year(4)
+NULL test1 tb2 f106 year NULL NULL NULL NULL year(4)
+NULL test1 tb2 f107 year NULL NULL NULL NULL year(4)
+1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test4 t6 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test4 t6 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+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;
+DROP TABLE test.t2;
+DROP TABLE test.t3;
+DROP TABLE test.t4;
+DROP TABLE test.t7;
+DROP TABLE test.t8;
+DROP TABLE test.t9;
+DROP TABLE test.t10;
+DROP TABLE test.t11;
+DROP TABLE test.tb1;
+DROP TABLE test.tb2;
+DROP TABLE test.tb3;
+DROP TABLE test.tb4;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result
new file mode 100644
index 00000000..1a363643
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result
@@ -0,0 +1,1044 @@
+SELECT * FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def information_schema ALL_PLUGINS LOAD_OPTION 11 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_AUTH_VERSION 13 NULL YES varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_LICENSE 10 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_MATURITY 12 NULL NO varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_STATUS 3 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_TYPE 4 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL
+def information_schema APPLICABLE_ROLES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) select NEVER NULL
+def information_schema APPLICABLE_ROLES IS_DEFAULT 4 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema APPLICABLE_ROLES IS_GRANTABLE 3 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema APPLICABLE_ROLES ROLE_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) select NEVER NULL
+def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) select NEVER NULL
+def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema CHARACTER_SETS DESCRIPTION 3 NULL NO varchar 60 180 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(60) select NEVER NULL
+def information_schema CHARACTER_SETS MAXLEN 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL
+def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 6 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema CHECK_CONSTRAINTS LEVEL 5 NULL NO varchar 6 18 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(6) select NEVER NULL
+def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS BUSY_TIME 5 NULL NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL
+def information_schema CLIENT_STATISTICS BYTES_RECEIVED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS BYTES_SENT 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS CLIENT 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS CONNECTED_TIME 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS CPU_TIME 6 NULL NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL
+def information_schema CLIENT_STATISTICS DENIED_CONNECTIONS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS EMPTY_QUERIES 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS LOST_CONNECTIONS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS OTHER_COMMANDS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_DELETED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_INSERTED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_READ 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_SENT 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_UPDATED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS SELECT_COMMANDS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema CLIENT_STATISTICS TOTAL_SSL_CONNECTIONS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema CLIENT_STATISTICS UPDATE_COMMANDS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema COLLATIONS CHARACTER_SET_NAME 2 NULL YES varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) select NEVER NULL
+def information_schema COLLATIONS COLLATION_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLLATIONS ID 3 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(11) select NEVER NULL
+def information_schema COLLATIONS IS_COMPILED 5 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema COLLATIONS IS_DEFAULT 4 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema COLLATIONS SORTLEN 6 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) select NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY FULL_COLLATION_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY ID 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(11) select NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY IS_DEFAULT 5 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema COLUMNS CHARACTER_SET_NAME 14 NULL YES varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) select NEVER NULL
+def information_schema COLUMNS COLLATION_NAME 15 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLUMNS COLUMN_COMMENT 20 NULL NO varchar 1024 3072 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1024) select NEVER NULL
+def information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema COLUMNS COLUMN_KEY 17 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema COLUMNS COLUMN_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLUMNS COLUMN_TYPE 16 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema COLUMNS DATA_TYPE 8 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLUMNS DATETIME_PRECISION 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema COLUMNS EXTRA 18 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) select NEVER NULL
+def information_schema COLUMNS GENERATION_EXPRESSION 22 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema COLUMNS IS_GENERATED 21 NULL NO varchar 6 18 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(6) select NEVER NULL
+def information_schema COLUMNS IS_NULLABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema COLUMNS ORDINAL_POSITION 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema COLUMNS PRIVILEGES 19 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) select NEVER NULL
+def information_schema COLUMNS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema COLUMNS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLUMNS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLUMN_PRIVILEGES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) select NEVER NULL
+def information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ENABLED_ROLES ROLE_NAME 1 NULL YES varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) select NEVER NULL
+def information_schema ENGINES COMMENT 3 NULL NO varchar 160 480 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(160) select NEVER NULL
+def information_schema ENGINES ENGINE 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ENGINES SAVEPOINTS 6 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema ENGINES SUPPORT 2 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) select NEVER NULL
+def information_schema ENGINES TRANSACTIONS 4 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema ENGINES XA 5 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema EVENTS CHARACTER_SET_CLIENT 22 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) select NEVER NULL
+def information_schema EVENTS COLLATION_CONNECTION 23 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema EVENTS CREATED 17 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema EVENTS DATABASE_COLLATION 24 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema EVENTS DEFINER 4 NULL NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(384) select NEVER NULL
+def information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema EVENTS EVENT_BODY 6 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) select NEVER NULL
+def information_schema EVENTS EVENT_CATALOG 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema EVENTS EVENT_COMMENT 20 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema EVENTS EVENT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema EVENTS EVENT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema EVENTS EVENT_TYPE 8 NULL NO varchar 9 27 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(9) select NEVER NULL
+def information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(18) select NEVER NULL
+def information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(256) select NEVER NULL
+def information_schema EVENTS LAST_ALTERED 18 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema EVENTS ON_COMPLETION 16 NULL NO varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) select NEVER NULL
+def information_schema EVENTS ORIGINATOR 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL
+def information_schema EVENTS SQL_MODE 12 NULL NO varchar 8192 24576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8192) select NEVER NULL
+def information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema EVENTS STATUS 15 NULL NO varchar 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(18) select NEVER NULL
+def information_schema EVENTS TIME_ZONE 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES DELETED_ROWS 12 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema FILES ENGINE 10 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema FILES EXTENT_SIZE 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(255) select NEVER NULL
+def information_schema FILES FILE_ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema FILES FILE_NAME 2 NULL YES varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema FILES FILE_TYPE 3 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL
+def information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema FILES FULLTEXT_KEYS 11 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema FILES LOGFILE_GROUP_NAME 8 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema FILES LOGFILE_GROUP_NUMBER 9 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(10) select NEVER NULL
+def information_schema FILES STATUS 37 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL
+def information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema FILES TABLE_CATALOG 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema FILES TABLE_NAME 7 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema FILES TABLE_SCHEMA 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema FILES VERSION 25 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema GEOMETRY_COLUMNS COORD_DIMENSION 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS F_TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN 8 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG 5 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS G_TABLE_NAME 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS MAX_PPR 12 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS SRID 13 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select NEVER NULL
+def information_schema GEOMETRY_COLUMNS STORAGE_TYPE 9 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
+def information_schema GLOBAL_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema INDEX_STATISTICS INDEX_NAME 3 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) select NEVER NULL
+def information_schema INDEX_STATISTICS ROWS_READ 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema INDEX_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) select NEVER NULL
+def information_schema INDEX_STATISTICS TABLE_SCHEMA 1 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) select NEVER NULL
+def information_schema KEYWORDS WORD 1 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema KEY_CACHES BLOCK_SIZE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema KEY_CACHES DIRTY_BLOCKS 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema KEY_CACHES FULL_SIZE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema KEY_CACHES KEY_CACHE_NAME 1 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) select NEVER NULL
+def information_schema KEY_CACHES READS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema KEY_CACHES READ_REQUESTS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema KEY_CACHES SEGMENTS 2 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned select NEVER NULL
+def information_schema KEY_CACHES SEGMENT_NUMBER 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned select NEVER NULL
+def information_schema KEY_CACHES UNUSED_BLOCKS 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema KEY_CACHES USED_BLOCKS 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema KEY_CACHES WRITES 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema KEY_CACHES WRITE_REQUESTS 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES 4 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select NEVER NULL
+def information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(20) select NEVER NULL
+def information_schema OPTIMIZER_TRACE QUERY 1 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema OPTIMIZER_TRACE TRACE 2 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema PARAMETERS CHARACTER_MAXIMUM_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
+def information_schema PARAMETERS CHARACTER_OCTET_LENGTH 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
+def information_schema PARAMETERS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARAMETERS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARAMETERS DATA_TYPE 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARAMETERS DATETIME_PRECISION 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARAMETERS DTD_IDENTIFIER 15 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema PARAMETERS NUMERIC_PRECISION 10 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
+def information_schema PARAMETERS NUMERIC_SCALE 11 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
+def information_schema PARAMETERS ORDINAL_POSITION 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
+def information_schema PARAMETERS PARAMETER_MODE 5 NULL YES varchar 5 15 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(5) select NEVER NULL
+def information_schema PARAMETERS PARAMETER_NAME 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARAMETERS ROUTINE_TYPE 16 NULL NO varchar 9 27 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(9) select NEVER NULL
+def information_schema PARAMETERS SPECIFIC_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema PARAMETERS SPECIFIC_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARAMETERS SPECIFIC_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARTITIONS AVG_ROW_LENGTH 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema PARTITIONS DATA_FREE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARTITIONS DATA_LENGTH 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARTITIONS INDEX_LENGTH 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARTITIONS NODEGROUP 24 NULL NO varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) select NEVER NULL
+def information_schema PARTITIONS PARTITION_COMMENT 23 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) select NEVER NULL
+def information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(18) select NEVER NULL
+def information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) select NEVER NULL
+def information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARTITIONS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema PARTITIONS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARTITIONS TABLE_ROWS 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema PARTITIONS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema PLUGINS LOAD_OPTION 11 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PLUGINS PLUGIN_AUTH_VERSION 13 NULL YES varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) select NEVER NULL
+def information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL
+def information_schema PLUGINS PLUGIN_LICENSE 10 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) select NEVER NULL
+def information_schema PLUGINS PLUGIN_MATURITY 12 NULL NO varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) select NEVER NULL
+def information_schema PLUGINS PLUGIN_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PLUGINS PLUGIN_STATUS 3 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) select NEVER NULL
+def information_schema PLUGINS PLUGIN_TYPE 4 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) select NEVER NULL
+def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL
+def information_schema PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL
+def information_schema PROCESSLIST COMMAND 5 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) select NEVER NULL
+def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PROCESSLIST EXAMINED_ROWS 15 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL
+def information_schema PROCESSLIST HOST 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PROCESSLIST ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema PROCESSLIST INFO_BINARY 17 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select NEVER NULL
+def information_schema PROCESSLIST MAX_MEMORY_USED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL
+def information_schema PROCESSLIST MAX_STAGE 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
+def information_schema PROCESSLIST MEMORY_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL
+def information_schema PROCESSLIST PROGRESS 12 NULL NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) select NEVER NULL
+def information_schema PROCESSLIST QUERY_ID 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema PROCESSLIST STAGE 10 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
+def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema PROCESSLIST TID 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema PROCESSLIST TIME 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL
+def information_schema PROCESSLIST TIME_MS 9 NULL NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) select NEVER NULL
+def information_schema PROCESSLIST USER 2 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES CHARACTER_MAXIMUM_LENGTH 7 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
+def information_schema ROUTINES CHARACTER_OCTET_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
+def information_schema ROUTINES CHARACTER_SET_CLIENT 29 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) select NEVER NULL
+def information_schema ROUTINES CHARACTER_SET_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES COLLATION_CONNECTION 30 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES COLLATION_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES CREATED 24 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema ROUTINES DATABASE_COLLATION 31 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES DATA_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES DATETIME_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema ROUTINES DEFINER 28 NULL NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(384) select NEVER NULL
+def information_schema ROUTINES DTD_IDENTIFIER 14 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema ROUTINES EXTERNAL_LANGUAGE 18 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES EXTERNAL_NAME 17 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES IS_DETERMINISTIC 20 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema ROUTINES LAST_ALTERED 25 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema ROUTINES NUMERIC_PRECISION 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
+def information_schema ROUTINES NUMERIC_SCALE 10 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
+def information_schema ROUTINES PARAMETER_STYLE 19 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) select NEVER NULL
+def information_schema ROUTINES ROUTINE_BODY 15 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) select NEVER NULL
+def information_schema ROUTINES ROUTINE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema ROUTINES ROUTINE_COMMENT 27 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema ROUTINES ROUTINE_DEFINITION 16 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema ROUTINES ROUTINE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES ROUTINE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES ROUTINE_TYPE 5 NULL NO varchar 13 39 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(13) select NEVER NULL
+def information_schema ROUTINES SECURITY_TYPE 23 NULL NO varchar 7 21 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(7) select NEVER NULL
+def information_schema ROUTINES SPECIFIC_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES SQL_DATA_ACCESS 21 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema ROUTINES SQL_MODE 26 NULL NO varchar 8192 24576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8192) select NEVER NULL
+def information_schema ROUTINES SQL_PATH 22 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SCHEMATA CATALOG_NAME 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) select NEVER NULL
+def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SCHEMATA SCHEMA_COMMENT 6 NULL NO varchar 1024 3072 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1024) select NEVER NULL
+def information_schema SCHEMATA SCHEMA_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema SCHEMA_PRIVILEGES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) select NEVER NULL
+def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SESSION_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema SPATIAL_REF_SYS AUTH_SRID 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(5) select NEVER NULL
+def information_schema SPATIAL_REF_SYS SRID 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select NEVER NULL
+def information_schema SPATIAL_REF_SYS SRTEXT 4 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SQL_FUNCTIONS FUNCTION 1 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1) select NEVER NULL
+def information_schema STATISTICS COLUMN_NAME 8 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) select NEVER NULL
+def information_schema STATISTICS IGNORED 17 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema STATISTICS INDEX_COMMENT 16 NULL NO varchar 1024 3072 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1024) select NEVER NULL
+def information_schema STATISTICS INDEX_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema STATISTICS INDEX_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema STATISTICS INDEX_TYPE 14 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) select NEVER NULL
+def information_schema STATISTICS NON_UNIQUE 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(1) select NEVER NULL
+def information_schema STATISTICS NULLABLE 13 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(10) select NEVER NULL
+def information_schema STATISTICS SEQ_IN_INDEX 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(2) select NEVER NULL
+def information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL
+def information_schema STATISTICS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema STATISTICS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema STATISTICS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT 14 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SYSTEM_VARIABLES DEFAULT_VALUE 5 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema SYSTEM_VARIABLES GLOBAL_VALUE 3 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_PATH 15 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 11 NULL YES varchar 21 63 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(21) select NEVER NULL
+def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 10 NULL YES varchar 21 63 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(21) select NEVER NULL
+def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(21) select NEVER NULL
+def information_schema SYSTEM_VARIABLES READ_ONLY 13 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema SYSTEM_VARIABLES SESSION_VALUE 2 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT 8 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SYSTEM_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema SYSTEM_VARIABLES VARIABLE_TYPE 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLES MAX_INDEX_LENGTH 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(10) select NEVER NULL
+def information_schema TABLES TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLES TABLE_COMMENT 21 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema TABLES TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLES TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLES TABLE_TYPE 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLES TEMPORARY 23 NULL YES varchar 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1) select NEVER NULL
+def information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL
+def information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLESPACES AUTOEXTEND_SIZE 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLESPACES ENGINE 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLESPACES EXTENT_SIZE 5 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLESPACES LOGFILE_GROUP_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLESPACES MAXIMUM_SIZE 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLESPACES NODEGROUP_ID 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema TABLESPACES TABLESPACE_COMMENT 9 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema TABLESPACES TABLESPACE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLESPACES TABLESPACE_TYPE 3 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLE_PRIVILEGES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) select NEVER NULL
+def information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema TABLE_PRIVILEGES TABLE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TABLE_STATISTICS ROWS_CHANGED 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES 5 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema TABLE_STATISTICS ROWS_READ 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema TABLE_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) select NEVER NULL
+def information_schema TABLE_STATISTICS TABLE_SCHEMA 1 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) select NEVER NULL
+def information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema TRIGGERS ACTION_ORDER 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
+def information_schema TRIGGERS ACTION_ORIENTATION 11 NULL NO varchar 9 27 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(9) select NEVER NULL
+def information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+def information_schema TRIGGERS ACTION_TIMING 12 NULL NO varchar 6 18 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(6) select NEVER NULL
+def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) select NEVER NULL
+def information_schema TRIGGERS COLLATION_CONNECTION 21 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL 2 NULL NULL datetime(2) select NEVER NULL
+def information_schema TRIGGERS DATABASE_COLLATION 22 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TRIGGERS DEFINER 19 NULL NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(384) select NEVER NULL
+def information_schema TRIGGERS EVENT_MANIPULATION 4 NULL NO varchar 6 18 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(6) select NEVER NULL
+def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TRIGGERS SQL_MODE 18 NULL NO varchar 8192 24576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8192) select NEVER NULL
+def information_schema TRIGGERS TRIGGER_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema TRIGGERS TRIGGER_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema TRIGGERS TRIGGER_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema USER_PRIVILEGES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) select NEVER NULL
+def information_schema USER_PRIVILEGES IS_GRANTABLE 4 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema USER_STATISTICS ACCESS_DENIED 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS BUSY_TIME 5 NULL NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL
+def information_schema USER_STATISTICS BYTES_RECEIVED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS BYTES_SENT 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS COMMIT_TRANSACTIONS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS CONCURRENT_CONNECTIONS 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select NEVER NULL
+def information_schema USER_STATISTICS CONNECTED_TIME 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select NEVER NULL
+def information_schema USER_STATISTICS CPU_TIME 6 NULL NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL
+def information_schema USER_STATISTICS DENIED_CONNECTIONS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS EMPTY_QUERIES 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS LOST_CONNECTIONS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS OTHER_COMMANDS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS ROWS_DELETED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS ROWS_INSERTED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS ROWS_READ 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS ROWS_SENT 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS ROWS_UPDATED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS SELECT_COMMANDS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS TOTAL_CONNECTIONS 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select NEVER NULL
+def information_schema USER_STATISTICS TOTAL_SSL_CONNECTIONS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
+def information_schema USER_STATISTICS UPDATE_COMMANDS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
+def information_schema USER_STATISTICS USER 1 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) select NEVER NULL
+def information_schema VIEWS ALGORITHM 11 NULL NO varchar 10 30 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(10) select NEVER NULL
+def information_schema VIEWS CHARACTER_SET_CLIENT 9 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) select NEVER NULL
+def information_schema VIEWS CHECK_OPTION 5 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) select NEVER NULL
+def information_schema VIEWS COLLATION_CONNECTION 10 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema VIEWS DEFINER 7 NULL NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(384) select NEVER NULL
+def information_schema VIEWS IS_UPDATABLE 6 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) select NEVER NULL
+def information_schema VIEWS SECURITY_TYPE 8 NULL NO varchar 7 21 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(7) select NEVER NULL
+def information_schema VIEWS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
+def information_schema VIEWS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema VIEWS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
+def information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+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
+1.0000 blob NULL NULL
+1.0000 longtext utf8mb3 utf8mb3_general_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+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
+3.0000 varchar utf8mb3 utf8mb3_general_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+NULL bigint NULL NULL
+NULL datetime NULL NULL
+NULL decimal NULL NULL
+NULL double NULL NULL
+NULL int NULL NULL
+NULL smallint NULL NULL
+NULL tinyint NULL NULL
+--> 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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+3.0000 information_schema ALL_PLUGINS PLUGIN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ALL_PLUGINS PLUGIN_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema ALL_PLUGINS PLUGIN_STATUS varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+3.0000 information_schema ALL_PLUGINS PLUGIN_TYPE varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema ALL_PLUGINS PLUGIN_LIBRARY varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ALL_PLUGINS PLUGIN_LIBRARY_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema ALL_PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema ALL_PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema ALL_PLUGINS PLUGIN_LICENSE varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema ALL_PLUGINS LOAD_OPTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ALL_PLUGINS PLUGIN_MATURITY varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+3.0000 information_schema ALL_PLUGINS PLUGIN_AUTH_VERSION varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema APPLICABLE_ROLES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema APPLICABLE_ROLES ROLE_NAME varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+3.0000 information_schema APPLICABLE_ROLES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema APPLICABLE_ROLES IS_DEFAULT varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8mb3 utf8mb3_general_ci varchar(60)
+NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3)
+3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema CHECK_CONSTRAINTS LEVEL varchar 6 18 utf8mb3 utf8mb3_general_ci varchar(6)
+1.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS CONNECTED_TIME bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS BUSY_TIME double NULL NULL NULL NULL double
+NULL information_schema CLIENT_STATISTICS CPU_TIME double NULL NULL NULL NULL double
+NULL information_schema CLIENT_STATISTICS BYTES_RECEIVED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS BYTES_SENT bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_SENT bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_DELETED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_INSERTED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_UPDATED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS SELECT_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS UPDATE_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS OTHER_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS DENIED_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS LOST_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ACCESS_DENIED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS EMPTY_QUERIES bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS TOTAL_SSL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema CLIENT_STATISTICS MAX_STATEMENT_TIME_EXCEEDED bigint NULL NULL NULL NULL bigint(21)
+3.0000 information_schema COLLATIONS COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLLATIONS CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11)
+3.0000 information_schema COLLATIONS IS_DEFAULT varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema COLLATIONS IS_COMPILED varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3)
+3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY FULL_COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY ID bigint NULL NULL NULL NULL bigint(11)
+3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY IS_DEFAULT varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema COLUMNS TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned
+1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema COLUMNS EXTRA varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8mb3 utf8mb3_general_ci varchar(1024)
+3.0000 information_schema COLUMNS IS_GENERATED varchar 6 18 utf8mb3 utf8mb3_general_ci varchar(6)
+1.0000 information_schema COLUMNS GENERATION_EXPRESSION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema ENABLED_ROLES ROLE_NAME varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+3.0000 information_schema ENGINES ENGINE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ENGINES SUPPORT varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+3.0000 information_schema ENGINES COMMENT varchar 160 480 utf8mb3 utf8mb3_general_ci varchar(160)
+3.0000 information_schema ENGINES TRANSACTIONS varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema ENGINES XA varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema ENGINES SAVEPOINTS varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema EVENTS EVENT_CATALOG varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS DEFINER varchar 384 1152 utf8mb3 utf8mb3_general_ci varchar(384)
+3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema EVENTS EVENT_TYPE varchar 9 27 utf8mb3 utf8mb3_general_ci varchar(9)
+NULL information_schema EVENTS EXECUTE_AT datetime NULL NULL NULL NULL datetime
+3.0000 information_schema EVENTS INTERVAL_VALUE varchar 256 768 utf8mb3 utf8mb3_general_ci varchar(256)
+3.0000 information_schema EVENTS INTERVAL_FIELD varchar 18 54 utf8mb3 utf8mb3_general_ci varchar(18)
+3.0000 information_schema EVENTS SQL_MODE varchar 8192 24576 utf8mb3 utf8mb3_general_ci varchar(8192)
+NULL information_schema EVENTS STARTS datetime NULL NULL NULL NULL datetime
+NULL information_schema EVENTS ENDS datetime NULL NULL NULL NULL datetime
+3.0000 information_schema EVENTS STATUS varchar 18 54 utf8mb3 utf8mb3_general_ci varchar(18)
+3.0000 information_schema EVENTS ON_COMPLETION varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+NULL information_schema EVENTS CREATED datetime NULL NULL NULL NULL datetime
+NULL information_schema EVENTS LAST_ALTERED datetime NULL NULL NULL NULL datetime
+NULL information_schema EVENTS LAST_EXECUTED datetime NULL NULL NULL NULL datetime
+3.0000 information_schema EVENTS EVENT_COMMENT varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema EVENTS ORIGINATOR bigint NULL NULL NULL NULL bigint(10)
+3.0000 information_schema EVENTS CHARACTER_SET_CLIENT varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema EVENTS COLLATION_CONNECTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS DATABASE_COLLATION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema FILES FILE_ID bigint NULL NULL NULL NULL bigint(4)
+3.0000 information_schema FILES FILE_NAME varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema FILES FILE_TYPE varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema FILES TABLESPACE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES TABLE_CATALOG varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES LOGFILE_GROUP_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema FILES LOGFILE_GROUP_NUMBER bigint NULL NULL NULL NULL bigint(4)
+3.0000 information_schema FILES ENGINE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES FULLTEXT_KEYS varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema FILES DELETED_ROWS bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES UPDATE_COUNT bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES FREE_EXTENTS bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES TOTAL_EXTENTS bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES CREATION_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES LAST_UPDATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES LAST_ACCESS_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8mb3 utf8mb3_general_ci varchar(10)
+NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES CREATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES UPDATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES CHECK_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema FILES STATUS varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema FILES EXTRA varchar 255 765 utf8mb3 utf8mb3_general_ci varchar(255)
+3.0000 information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS F_TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS G_TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema GEOMETRY_COLUMNS STORAGE_TYPE tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE int NULL NULL NULL NULL int(7)
+NULL information_schema GEOMETRY_COLUMNS COORD_DIMENSION tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema GEOMETRY_COLUMNS MAX_PPR tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema GEOMETRY_COLUMNS SRID smallint NULL NULL NULL NULL smallint(5)
+3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema GLOBAL_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GLOBAL_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema INDEX_STATISTICS TABLE_SCHEMA varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+3.0000 information_schema INDEX_STATISTICS TABLE_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+3.0000 information_schema INDEX_STATISTICS INDEX_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+NULL information_schema INDEX_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
+3.0000 information_schema KEYWORDS WORD varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_CACHES KEY_CACHE_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+NULL information_schema KEY_CACHES SEGMENTS int NULL NULL NULL NULL int(3) unsigned
+NULL information_schema KEY_CACHES SEGMENT_NUMBER int NULL NULL NULL NULL int(3) unsigned
+NULL information_schema KEY_CACHES FULL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES BLOCK_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES USED_BLOCKS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES UNUSED_BLOCKS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES DIRTY_BLOCKS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES READ_REQUESTS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES READS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES WRITE_REQUESTS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES WRITES bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema KEY_COLUMN_USAGE TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(10)
+NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NULL NULL NULL NULL bigint(10)
+3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema OPTIMIZER_TRACE QUERY longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+1.0000 information_schema OPTIMIZER_TRACE TRACE longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+NULL information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE int NULL NULL NULL NULL int(20)
+NULL information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES tinyint NULL NULL NULL NULL tinyint(1)
+3.0000 information_schema PARAMETERS SPECIFIC_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema PARAMETERS SPECIFIC_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARAMETERS SPECIFIC_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema PARAMETERS ORDINAL_POSITION int NULL NULL NULL NULL int(21)
+3.0000 information_schema PARAMETERS PARAMETER_MODE varchar 5 15 utf8mb3 utf8mb3_general_ci varchar(5)
+3.0000 information_schema PARAMETERS PARAMETER_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARAMETERS DATA_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema PARAMETERS CHARACTER_MAXIMUM_LENGTH int NULL NULL NULL NULL int(21)
+NULL information_schema PARAMETERS CHARACTER_OCTET_LENGTH int NULL NULL NULL NULL int(21)
+NULL information_schema PARAMETERS NUMERIC_PRECISION int NULL NULL NULL NULL int(21)
+NULL information_schema PARAMETERS NUMERIC_SCALE int NULL NULL NULL NULL int(21)
+NULL information_schema PARAMETERS DATETIME_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema PARAMETERS CHARACTER_SET_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARAMETERS COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema PARAMETERS DTD_IDENTIFIER longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema PARAMETERS ROUTINE_TYPE varchar 9 27 utf8mb3 utf8mb3_general_ci varchar(9)
+3.0000 information_schema PARTITIONS TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema PARTITIONS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARTITIONS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARTITIONS PARTITION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARTITIONS SUBPARTITION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema PARTITIONS PARTITION_METHOD varchar 18 54 utf8mb3 utf8mb3_general_ci varchar(18)
+3.0000 information_schema PARTITIONS SUBPARTITION_METHOD varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+1.0000 information_schema PARTITIONS PARTITION_EXPRESSION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+1.0000 information_schema PARTITIONS SUBPARTITION_EXPRESSION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+1.0000 information_schema PARTITIONS PARTITION_DESCRIPTION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS CREATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema PARTITIONS UPDATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema PARTITIONS CHECK_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PLUGINS PLUGIN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PLUGINS PLUGIN_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema PLUGINS PLUGIN_STATUS varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+3.0000 information_schema PLUGINS PLUGIN_TYPE varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema PLUGINS PLUGIN_TYPE_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema PLUGINS PLUGIN_LIBRARY varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PLUGINS PLUGIN_LIBRARY_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema PLUGINS PLUGIN_LICENSE varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema PLUGINS LOAD_OPTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PLUGINS PLUGIN_MATURITY varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+3.0000 information_schema PLUGINS PLUGIN_AUTH_VERSION varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4)
+3.0000 information_schema PROCESSLIST USER varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PROCESSLIST DB varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PROCESSLIST COMMAND varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+NULL information_schema PROCESSLIST TIME int NULL NULL NULL NULL int(7)
+3.0000 information_schema PROCESSLIST STATE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema PROCESSLIST INFO longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+NULL information_schema PROCESSLIST TIME_MS decimal NULL NULL NULL NULL decimal(22,3)
+NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3)
+NULL information_schema PROCESSLIST MEMORY_USED bigint NULL NULL NULL NULL bigint(7)
+NULL information_schema PROCESSLIST MAX_MEMORY_USED bigint NULL NULL NULL NULL bigint(7)
+NULL information_schema PROCESSLIST EXAMINED_ROWS int NULL NULL NULL NULL int(7)
+NULL information_schema PROCESSLIST QUERY_ID bigint NULL NULL NULL NULL bigint(4)
+1.0000 information_schema PROCESSLIST INFO_BINARY blob 65535 65535 NULL NULL blob
+NULL information_schema PROCESSLIST TID bigint NULL NULL NULL NULL bigint(4)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES SPECIFIC_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES ROUTINE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema ROUTINES ROUTINE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES ROUTINE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES ROUTINE_TYPE varchar 13 39 utf8mb3 utf8mb3_general_ci varchar(13)
+3.0000 information_schema ROUTINES DATA_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema ROUTINES CHARACTER_MAXIMUM_LENGTH int NULL NULL NULL NULL int(21)
+NULL information_schema ROUTINES CHARACTER_OCTET_LENGTH int NULL NULL NULL NULL int(21)
+NULL information_schema ROUTINES NUMERIC_PRECISION int NULL NULL NULL NULL int(21)
+NULL information_schema ROUTINES NUMERIC_SCALE int NULL NULL NULL NULL int(21)
+NULL information_schema ROUTINES DATETIME_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema ROUTINES CHARACTER_SET_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema ROUTINES DTD_IDENTIFIER longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema ROUTINES ROUTINE_BODY varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+1.0000 information_schema ROUTINES ROUTINE_DEFINITION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema ROUTINES EXTERNAL_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES EXTERNAL_LANGUAGE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES PARAMETER_STYLE varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+3.0000 information_schema ROUTINES IS_DETERMINISTIC varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema ROUTINES SQL_DATA_ACCESS varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES SQL_PATH varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES SECURITY_TYPE varchar 7 21 utf8mb3 utf8mb3_general_ci varchar(7)
+NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime
+NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime
+3.0000 information_schema ROUTINES SQL_MODE varchar 8192 24576 utf8mb3 utf8mb3_general_ci varchar(8192)
+1.0000 information_schema ROUTINES ROUTINE_COMMENT longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema ROUTINES DEFINER varchar 384 1152 utf8mb3 utf8mb3_general_ci varchar(384)
+3.0000 information_schema ROUTINES CHARACTER_SET_CLIENT varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema ROUTINES COLLATION_CONNECTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES DATABASE_COLLATION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMATA CATALOG_NAME varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema SCHEMATA SCHEMA_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema SCHEMATA SCHEMA_COMMENT varchar 1024 3072 utf8mb3 utf8mb3_general_ci varchar(1024)
+3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema SESSION_STATUS VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SESSION_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+NULL information_schema SPATIAL_REF_SYS SRID smallint NULL NULL NULL NULL smallint(5)
+3.0000 information_schema SPATIAL_REF_SYS AUTH_NAME varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+NULL information_schema SPATIAL_REF_SYS AUTH_SRID int NULL NULL NULL NULL int(5)
+3.0000 information_schema SPATIAL_REF_SYS SRTEXT varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SQL_FUNCTIONS FUNCTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema STATISTICS NON_UNIQUE bigint NULL NULL NULL NULL bigint(1)
+3.0000 information_schema STATISTICS INDEX_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema STATISTICS INDEX_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema STATISTICS SEQ_IN_INDEX bigint NULL NULL NULL NULL bigint(2)
+3.0000 information_schema STATISTICS COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema STATISTICS COLLATION varchar 1 3 utf8mb3 utf8mb3_general_ci varchar(1)
+NULL information_schema STATISTICS CARDINALITY bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3)
+3.0000 information_schema STATISTICS PACKED varchar 10 30 utf8mb3 utf8mb3_general_ci varchar(10)
+3.0000 information_schema STATISTICS NULLABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema STATISTICS INDEX_TYPE varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+3.0000 information_schema STATISTICS COMMENT varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+3.0000 information_schema STATISTICS INDEX_COMMENT varchar 1024 3072 utf8mb3 utf8mb3_general_ci varchar(1024)
+3.0000 information_schema STATISTICS IGNORED varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema SYSTEM_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES SESSION_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES DEFAULT_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SYSTEM_VARIABLES VARIABLE_SCOPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES VARIABLE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES VARIABLE_COMMENT varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE varchar 21 63 utf8mb3 utf8mb3_general_ci varchar(21)
+3.0000 information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE varchar 21 63 utf8mb3 utf8mb3_general_ci varchar(21)
+3.0000 information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE varchar 21 63 utf8mb3 utf8mb3_general_ci varchar(21)
+1.0000 information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema SYSTEM_VARIABLES READ_ONLY varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE_PATH varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema TABLES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLES ENGINE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8mb3 utf8mb3_general_ci varchar(10)
+NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime
+3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema TABLES CREATE_OPTIONS varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema TABLES TABLE_COMMENT varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+NULL information_schema TABLES MAX_INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema TABLES TEMPORARY varchar 1 3 utf8mb3 utf8mb3_general_ci varchar(1)
+3.0000 information_schema TABLESPACES TABLESPACE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLESPACES ENGINE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLESPACES TABLESPACE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLESPACES LOGFILE_GROUP_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema TABLESPACES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLESPACES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLESPACES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLESPACES NODEGROUP_ID bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema TABLESPACES TABLESPACE_COMMENT varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema TABLE_STATISTICS TABLE_SCHEMA varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+3.0000 information_schema TABLE_STATISTICS TABLE_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+NULL information_schema TABLE_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema TABLE_STATISTICS ROWS_CHANGED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES bigint NULL NULL NULL NULL bigint(21)
+3.0000 information_schema TRIGGERS TRIGGER_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TRIGGERS TRIGGER_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS TRIGGER_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS EVENT_MANIPULATION varchar 6 18 utf8mb3 utf8mb3_general_ci varchar(6)
+3.0000 information_schema TRIGGERS EVENT_OBJECT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TRIGGERS EVENT_OBJECT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS EVENT_OBJECT_TABLE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(4)
+1.0000 information_schema TRIGGERS ACTION_CONDITION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+1.0000 information_schema TRIGGERS ACTION_STATEMENT longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema TRIGGERS ACTION_ORIENTATION varchar 9 27 utf8mb3 utf8mb3_general_ci varchar(9)
+3.0000 information_schema TRIGGERS ACTION_TIMING varchar 6 18 utf8mb3 utf8mb3_general_ci varchar(6)
+3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime(2)
+3.0000 information_schema TRIGGERS SQL_MODE varchar 8192 24576 utf8mb3 utf8mb3_general_ci varchar(8192)
+3.0000 information_schema TRIGGERS DEFINER varchar 384 1152 utf8mb3 utf8mb3_general_ci varchar(384)
+3.0000 information_schema TRIGGERS CHARACTER_SET_CLIENT varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema TRIGGERS COLLATION_CONNECTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS DATABASE_COLLATION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema USER_STATISTICS USER varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+NULL information_schema USER_STATISTICS TOTAL_CONNECTIONS int NULL NULL NULL NULL int(11)
+NULL information_schema USER_STATISTICS CONCURRENT_CONNECTIONS int NULL NULL NULL NULL int(11)
+NULL information_schema USER_STATISTICS CONNECTED_TIME int NULL NULL NULL NULL int(11)
+NULL information_schema USER_STATISTICS BUSY_TIME double NULL NULL NULL NULL double
+NULL information_schema USER_STATISTICS CPU_TIME double NULL NULL NULL NULL double
+NULL information_schema USER_STATISTICS BYTES_RECEIVED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS BYTES_SENT bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_SENT bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_DELETED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_INSERTED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_UPDATED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS SELECT_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS UPDATE_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS OTHER_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS COMMIT_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS DENIED_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS LOST_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ACCESS_DENIED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS EMPTY_QUERIES bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS TOTAL_SSL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED bigint NULL NULL NULL NULL bigint(21)
+3.0000 information_schema VIEWS TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema VIEWS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema VIEWS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema VIEWS DEFINER varchar 384 1152 utf8mb3 utf8mb3_general_ci varchar(384)
+3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8mb3 utf8mb3_general_ci varchar(7)
+3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema VIEWS ALGORITHM varchar 10 30 utf8mb3 utf8mb3_general_ci varchar(10)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
new file mode 100644
index 00000000..676d0ed5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
@@ -0,0 +1,1044 @@
+SELECT * FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def information_schema ALL_PLUGINS LOAD_OPTION 11 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_AUTH_VERSION 13 NULL YES varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_LICENSE 10 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_MATURITY 12 NULL NO varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_STATUS 3 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_TYPE 4 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL
+def information_schema ALL_PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL
+def information_schema APPLICABLE_ROLES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) NEVER NULL
+def information_schema APPLICABLE_ROLES IS_DEFAULT 4 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema APPLICABLE_ROLES IS_GRANTABLE 3 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema APPLICABLE_ROLES ROLE_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) NEVER NULL
+def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL
+def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema CHARACTER_SETS DESCRIPTION 3 NULL NO varchar 60 180 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(60) NEVER NULL
+def information_schema CHARACTER_SETS MAXLEN 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL
+def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 6 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema CHECK_CONSTRAINTS LEVEL 5 NULL NO varchar 6 18 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(6) NEVER NULL
+def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS BUSY_TIME 5 NULL NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL
+def information_schema CLIENT_STATISTICS BYTES_RECEIVED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS BYTES_SENT 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS CLIENT 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS CONNECTED_TIME 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS CPU_TIME 6 NULL NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL
+def information_schema CLIENT_STATISTICS DENIED_CONNECTIONS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS EMPTY_QUERIES 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS LOST_CONNECTIONS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS OTHER_COMMANDS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_DELETED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_INSERTED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_READ 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_SENT 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS ROWS_UPDATED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS SELECT_COMMANDS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema CLIENT_STATISTICS TOTAL_SSL_CONNECTIONS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema CLIENT_STATISTICS UPDATE_COMMANDS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema COLLATIONS CHARACTER_SET_NAME 2 NULL YES varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL
+def information_schema COLLATIONS COLLATION_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLLATIONS ID 3 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(11) NEVER NULL
+def information_schema COLLATIONS IS_COMPILED 5 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema COLLATIONS IS_DEFAULT 4 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema COLLATIONS SORTLEN 6 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY FULL_COLLATION_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY ID 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(11) NEVER NULL
+def information_schema COLLATION_CHARACTER_SET_APPLICABILITY IS_DEFAULT 5 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema COLUMNS CHARACTER_SET_NAME 14 NULL YES varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL
+def information_schema COLUMNS COLLATION_NAME 15 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLUMNS COLUMN_COMMENT 20 NULL NO varchar 1024 3072 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1024) NEVER NULL
+def information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema COLUMNS COLUMN_KEY 17 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema COLUMNS COLUMN_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLUMNS COLUMN_TYPE 16 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema COLUMNS DATA_TYPE 8 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLUMNS DATETIME_PRECISION 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema COLUMNS EXTRA 18 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL
+def information_schema COLUMNS GENERATION_EXPRESSION 22 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema COLUMNS IS_GENERATED 21 NULL NO varchar 6 18 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(6) NEVER NULL
+def information_schema COLUMNS IS_NULLABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema COLUMNS ORDINAL_POSITION 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema COLUMNS PRIVILEGES 19 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL
+def information_schema COLUMNS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema COLUMNS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLUMNS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLUMN_PRIVILEGES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) NEVER NULL
+def information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ENABLED_ROLES ROLE_NAME 1 NULL YES varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) NEVER NULL
+def information_schema ENGINES COMMENT 3 NULL NO varchar 160 480 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(160) NEVER NULL
+def information_schema ENGINES ENGINE 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ENGINES SAVEPOINTS 6 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema ENGINES SUPPORT 2 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) NEVER NULL
+def information_schema ENGINES TRANSACTIONS 4 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema ENGINES XA 5 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema EVENTS CHARACTER_SET_CLIENT 22 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL
+def information_schema EVENTS COLLATION_CONNECTION 23 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema EVENTS CREATED 17 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema EVENTS DATABASE_COLLATION 24 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema EVENTS DEFINER 4 NULL NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(384) NEVER NULL
+def information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema EVENTS EVENT_BODY 6 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) NEVER NULL
+def information_schema EVENTS EVENT_CATALOG 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema EVENTS EVENT_COMMENT 20 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema EVENTS EVENT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema EVENTS EVENT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema EVENTS EVENT_TYPE 8 NULL NO varchar 9 27 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(9) NEVER NULL
+def information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(18) NEVER NULL
+def information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(256) NEVER NULL
+def information_schema EVENTS LAST_ALTERED 18 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema EVENTS ON_COMPLETION 16 NULL NO varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) NEVER NULL
+def information_schema EVENTS ORIGINATOR 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL
+def information_schema EVENTS SQL_MODE 12 NULL NO varchar 8192 24576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8192) NEVER NULL
+def information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema EVENTS STATUS 15 NULL NO varchar 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(18) NEVER NULL
+def information_schema EVENTS TIME_ZONE 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES DELETED_ROWS 12 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema FILES ENGINE 10 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema FILES EXTENT_SIZE 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(255) NEVER NULL
+def information_schema FILES FILE_ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema FILES FILE_NAME 2 NULL YES varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema FILES FILE_TYPE 3 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL
+def information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema FILES FULLTEXT_KEYS 11 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema FILES LOGFILE_GROUP_NAME 8 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema FILES LOGFILE_GROUP_NUMBER 9 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(10) NEVER NULL
+def information_schema FILES STATUS 37 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL
+def information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema FILES TABLE_CATALOG 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema FILES TABLE_NAME 7 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema FILES TABLE_SCHEMA 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema FILES VERSION 25 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema GEOMETRY_COLUMNS COORD_DIMENSION 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
+def information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema GEOMETRY_COLUMNS F_TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL
+def information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN 8 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG 5 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema GEOMETRY_COLUMNS G_TABLE_NAME 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema GEOMETRY_COLUMNS MAX_PPR 12 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
+def information_schema GEOMETRY_COLUMNS SRID 13 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) NEVER NULL
+def information_schema GEOMETRY_COLUMNS STORAGE_TYPE 9 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
+def information_schema GLOBAL_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema INDEX_STATISTICS INDEX_NAME 3 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) NEVER NULL
+def information_schema INDEX_STATISTICS ROWS_READ 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema INDEX_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) NEVER NULL
+def information_schema INDEX_STATISTICS TABLE_SCHEMA 1 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) NEVER NULL
+def information_schema KEYWORDS WORD 1 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema KEY_CACHES BLOCK_SIZE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema KEY_CACHES DIRTY_BLOCKS 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema KEY_CACHES FULL_SIZE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema KEY_CACHES KEY_CACHE_NAME 1 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) NEVER NULL
+def information_schema KEY_CACHES READS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema KEY_CACHES READ_REQUESTS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema KEY_CACHES SEGMENTS 2 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned NEVER NULL
+def information_schema KEY_CACHES SEGMENT_NUMBER 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned NEVER NULL
+def information_schema KEY_CACHES UNUSED_BLOCKS 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema KEY_CACHES USED_BLOCKS 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema KEY_CACHES WRITES 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema KEY_CACHES WRITE_REQUESTS 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL
+def information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL
+def information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES 4 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) NEVER NULL
+def information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(20) NEVER NULL
+def information_schema OPTIMIZER_TRACE QUERY 1 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema OPTIMIZER_TRACE TRACE 2 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema PARAMETERS CHARACTER_MAXIMUM_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
+def information_schema PARAMETERS CHARACTER_OCTET_LENGTH 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
+def information_schema PARAMETERS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARAMETERS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARAMETERS DATA_TYPE 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARAMETERS DATETIME_PRECISION 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARAMETERS DTD_IDENTIFIER 15 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema PARAMETERS NUMERIC_PRECISION 10 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
+def information_schema PARAMETERS NUMERIC_SCALE 11 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
+def information_schema PARAMETERS ORDINAL_POSITION 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
+def information_schema PARAMETERS PARAMETER_MODE 5 NULL YES varchar 5 15 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(5) NEVER NULL
+def information_schema PARAMETERS PARAMETER_NAME 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARAMETERS ROUTINE_TYPE 16 NULL NO varchar 9 27 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(9) NEVER NULL
+def information_schema PARAMETERS SPECIFIC_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema PARAMETERS SPECIFIC_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARAMETERS SPECIFIC_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARTITIONS AVG_ROW_LENGTH 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema PARTITIONS DATA_FREE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARTITIONS DATA_LENGTH 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARTITIONS INDEX_LENGTH 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARTITIONS NODEGROUP 24 NULL NO varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) NEVER NULL
+def information_schema PARTITIONS PARTITION_COMMENT 23 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL
+def information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(18) NEVER NULL
+def information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) NEVER NULL
+def information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARTITIONS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema PARTITIONS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARTITIONS TABLE_ROWS 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema PARTITIONS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema PLUGINS LOAD_OPTION 11 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PLUGINS PLUGIN_AUTH_VERSION 13 NULL YES varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL
+def information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL
+def information_schema PLUGINS PLUGIN_LICENSE 10 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL
+def information_schema PLUGINS PLUGIN_MATURITY 12 NULL NO varchar 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(12) NEVER NULL
+def information_schema PLUGINS PLUGIN_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PLUGINS PLUGIN_STATUS 3 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) NEVER NULL
+def information_schema PLUGINS PLUGIN_TYPE 4 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL
+def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL
+def information_schema PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL
+def information_schema PROCESSLIST COMMAND 5 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) NEVER NULL
+def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PROCESSLIST EXAMINED_ROWS 15 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL
+def information_schema PROCESSLIST HOST 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PROCESSLIST ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema PROCESSLIST INFO_BINARY 17 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
+def information_schema PROCESSLIST MAX_MEMORY_USED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL
+def information_schema PROCESSLIST MAX_STAGE 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
+def information_schema PROCESSLIST MEMORY_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL
+def information_schema PROCESSLIST PROGRESS 12 NULL NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) NEVER NULL
+def information_schema PROCESSLIST QUERY_ID 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema PROCESSLIST STAGE 10 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
+def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema PROCESSLIST TID 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema PROCESSLIST TIME 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL
+def information_schema PROCESSLIST TIME_MS 9 NULL NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) NEVER NULL
+def information_schema PROCESSLIST USER 2 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES CHARACTER_MAXIMUM_LENGTH 7 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
+def information_schema ROUTINES CHARACTER_OCTET_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
+def information_schema ROUTINES CHARACTER_SET_CLIENT 29 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL
+def information_schema ROUTINES CHARACTER_SET_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES COLLATION_CONNECTION 30 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES COLLATION_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES CREATED 24 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema ROUTINES DATABASE_COLLATION 31 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES DATA_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES DATETIME_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema ROUTINES DEFINER 28 NULL NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(384) NEVER NULL
+def information_schema ROUTINES DTD_IDENTIFIER 14 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema ROUTINES EXTERNAL_LANGUAGE 18 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES EXTERNAL_NAME 17 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES IS_DETERMINISTIC 20 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema ROUTINES LAST_ALTERED 25 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema ROUTINES NUMERIC_PRECISION 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
+def information_schema ROUTINES NUMERIC_SCALE 10 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
+def information_schema ROUTINES PARAMETER_STYLE 19 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) NEVER NULL
+def information_schema ROUTINES ROUTINE_BODY 15 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) NEVER NULL
+def information_schema ROUTINES ROUTINE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema ROUTINES ROUTINE_COMMENT 27 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema ROUTINES ROUTINE_DEFINITION 16 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema ROUTINES ROUTINE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES ROUTINE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES ROUTINE_TYPE 5 NULL NO varchar 13 39 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(13) NEVER NULL
+def information_schema ROUTINES SECURITY_TYPE 23 NULL NO varchar 7 21 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(7) NEVER NULL
+def information_schema ROUTINES SPECIFIC_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES SQL_DATA_ACCESS 21 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema ROUTINES SQL_MODE 26 NULL NO varchar 8192 24576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8192) NEVER NULL
+def information_schema ROUTINES SQL_PATH 22 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SCHEMATA CATALOG_NAME 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL
+def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SCHEMATA SCHEMA_COMMENT 6 NULL NO varchar 1024 3072 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1024) NEVER NULL
+def information_schema SCHEMATA SCHEMA_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema SCHEMA_PRIVILEGES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) NEVER NULL
+def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SESSION_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema SPATIAL_REF_SYS AUTH_SRID 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(5) NEVER NULL
+def information_schema SPATIAL_REF_SYS SRID 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) NEVER NULL
+def information_schema SPATIAL_REF_SYS SRTEXT 4 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SQL_FUNCTIONS FUNCTION 1 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1) NEVER NULL
+def information_schema STATISTICS COLUMN_NAME 8 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) NEVER NULL
+def information_schema STATISTICS IGNORED 17 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema STATISTICS INDEX_COMMENT 16 NULL NO varchar 1024 3072 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1024) NEVER NULL
+def information_schema STATISTICS INDEX_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema STATISTICS INDEX_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema STATISTICS INDEX_TYPE 14 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) NEVER NULL
+def information_schema STATISTICS NON_UNIQUE 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(1) NEVER NULL
+def information_schema STATISTICS NULLABLE 13 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(10) NEVER NULL
+def information_schema STATISTICS SEQ_IN_INDEX 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(2) NEVER NULL
+def information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL
+def information_schema STATISTICS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema STATISTICS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema STATISTICS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT 14 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SYSTEM_VARIABLES DEFAULT_VALUE 5 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema SYSTEM_VARIABLES GLOBAL_VALUE 3 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_PATH 15 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 11 NULL YES varchar 21 63 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(21) NEVER NULL
+def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 10 NULL YES varchar 21 63 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(21) NEVER NULL
+def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(21) NEVER NULL
+def information_schema SYSTEM_VARIABLES READ_ONLY 13 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema SYSTEM_VARIABLES SESSION_VALUE 2 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT 8 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SYSTEM_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema SYSTEM_VARIABLES VARIABLE_TYPE 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLES MAX_INDEX_LENGTH 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(10) NEVER NULL
+def information_schema TABLES TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLES TABLE_COMMENT 21 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema TABLES TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLES TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLES TABLE_TYPE 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLES TEMPORARY 23 NULL YES varchar 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(1) NEVER NULL
+def information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLESPACES AUTOEXTEND_SIZE 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLESPACES ENGINE 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLESPACES EXTENT_SIZE 5 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLESPACES LOGFILE_GROUP_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLESPACES MAXIMUM_SIZE 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLESPACES NODEGROUP_ID 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema TABLESPACES TABLESPACE_COMMENT 9 NULL YES varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema TABLESPACES TABLESPACE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLESPACES TABLESPACE_TYPE 3 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLE_PRIVILEGES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) NEVER NULL
+def information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema TABLE_PRIVILEGES TABLE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TABLE_STATISTICS ROWS_CHANGED 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES 5 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema TABLE_STATISTICS ROWS_READ 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema TABLE_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) NEVER NULL
+def information_schema TABLE_STATISTICS TABLE_SCHEMA 1 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) NEVER NULL
+def information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema TRIGGERS ACTION_ORDER 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
+def information_schema TRIGGERS ACTION_ORIENTATION 11 NULL NO varchar 9 27 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(9) NEVER NULL
+def information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+def information_schema TRIGGERS ACTION_TIMING 12 NULL NO varchar 6 18 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(6) NEVER NULL
+def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL
+def information_schema TRIGGERS COLLATION_CONNECTION 21 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL 2 NULL NULL datetime(2) NEVER NULL
+def information_schema TRIGGERS DATABASE_COLLATION 22 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TRIGGERS DEFINER 19 NULL NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(384) NEVER NULL
+def information_schema TRIGGERS EVENT_MANIPULATION 4 NULL NO varchar 6 18 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(6) NEVER NULL
+def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TRIGGERS SQL_MODE 18 NULL NO varchar 8192 24576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8192) NEVER NULL
+def information_schema TRIGGERS TRIGGER_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema TRIGGERS TRIGGER_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema TRIGGERS TRIGGER_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema USER_PRIVILEGES GRANTEE 1 NULL NO varchar 385 1155 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(385) NEVER NULL
+def information_schema USER_PRIVILEGES IS_GRANTABLE 4 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema USER_STATISTICS ACCESS_DENIED 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS BUSY_TIME 5 NULL NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL
+def information_schema USER_STATISTICS BYTES_RECEIVED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS BYTES_SENT 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS COMMIT_TRANSACTIONS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS CONCURRENT_CONNECTIONS 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def information_schema USER_STATISTICS CONNECTED_TIME 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def information_schema USER_STATISTICS CPU_TIME 6 NULL NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL
+def information_schema USER_STATISTICS DENIED_CONNECTIONS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS EMPTY_QUERIES 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS LOST_CONNECTIONS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS OTHER_COMMANDS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS ROWS_DELETED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS ROWS_INSERTED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS ROWS_READ 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS ROWS_SENT 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS ROWS_UPDATED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS SELECT_COMMANDS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS TOTAL_CONNECTIONS 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def information_schema USER_STATISTICS TOTAL_SSL_CONNECTIONS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def information_schema USER_STATISTICS UPDATE_COMMANDS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def information_schema USER_STATISTICS USER 1 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) NEVER NULL
+def information_schema VIEWS ALGORITHM 11 NULL NO varchar 10 30 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(10) NEVER NULL
+def information_schema VIEWS CHARACTER_SET_CLIENT 9 NULL NO varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL
+def information_schema VIEWS CHECK_OPTION 5 NULL NO varchar 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(8) NEVER NULL
+def information_schema VIEWS COLLATION_CONNECTION 10 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema VIEWS DEFINER 7 NULL NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(384) NEVER NULL
+def information_schema VIEWS IS_UPDATABLE 6 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL
+def information_schema VIEWS SECURITY_TYPE 8 NULL NO varchar 7 21 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(7) NEVER NULL
+def information_schema VIEWS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def information_schema VIEWS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema VIEWS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+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
+1.0000 blob NULL NULL
+1.0000 longtext utf8mb3 utf8mb3_general_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+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
+3.0000 varchar utf8mb3 utf8mb3_general_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+NULL bigint NULL NULL
+NULL datetime NULL NULL
+NULL decimal NULL NULL
+NULL double NULL NULL
+NULL int NULL NULL
+NULL smallint NULL NULL
+NULL tinyint NULL NULL
+--> 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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+3.0000 information_schema ALL_PLUGINS PLUGIN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ALL_PLUGINS PLUGIN_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema ALL_PLUGINS PLUGIN_STATUS varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+3.0000 information_schema ALL_PLUGINS PLUGIN_TYPE varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema ALL_PLUGINS PLUGIN_LIBRARY varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ALL_PLUGINS PLUGIN_LIBRARY_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema ALL_PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema ALL_PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema ALL_PLUGINS PLUGIN_LICENSE varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema ALL_PLUGINS LOAD_OPTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ALL_PLUGINS PLUGIN_MATURITY varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+3.0000 information_schema ALL_PLUGINS PLUGIN_AUTH_VERSION varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema APPLICABLE_ROLES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema APPLICABLE_ROLES ROLE_NAME varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+3.0000 information_schema APPLICABLE_ROLES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema APPLICABLE_ROLES IS_DEFAULT varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8mb3 utf8mb3_general_ci varchar(60)
+NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3)
+3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema CHECK_CONSTRAINTS LEVEL varchar 6 18 utf8mb3 utf8mb3_general_ci varchar(6)
+1.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS CONNECTED_TIME bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS BUSY_TIME double NULL NULL NULL NULL double
+NULL information_schema CLIENT_STATISTICS CPU_TIME double NULL NULL NULL NULL double
+NULL information_schema CLIENT_STATISTICS BYTES_RECEIVED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS BYTES_SENT bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_SENT bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_DELETED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_INSERTED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROWS_UPDATED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS SELECT_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS UPDATE_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS OTHER_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS DENIED_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS LOST_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS ACCESS_DENIED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS EMPTY_QUERIES bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema CLIENT_STATISTICS TOTAL_SSL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema CLIENT_STATISTICS MAX_STATEMENT_TIME_EXCEEDED bigint NULL NULL NULL NULL bigint(21)
+3.0000 information_schema COLLATIONS COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLLATIONS CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11)
+3.0000 information_schema COLLATIONS IS_DEFAULT varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema COLLATIONS IS_COMPILED varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3)
+3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY FULL_COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY ID bigint NULL NULL NULL NULL bigint(11)
+3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY IS_DEFAULT varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema COLUMNS TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned
+1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema COLUMNS EXTRA varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8mb3 utf8mb3_general_ci varchar(1024)
+3.0000 information_schema COLUMNS IS_GENERATED varchar 6 18 utf8mb3 utf8mb3_general_ci varchar(6)
+1.0000 information_schema COLUMNS GENERATION_EXPRESSION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema ENABLED_ROLES ROLE_NAME varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+3.0000 information_schema ENGINES ENGINE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ENGINES SUPPORT varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+3.0000 information_schema ENGINES COMMENT varchar 160 480 utf8mb3 utf8mb3_general_ci varchar(160)
+3.0000 information_schema ENGINES TRANSACTIONS varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema ENGINES XA varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema ENGINES SAVEPOINTS varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema EVENTS EVENT_CATALOG varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS DEFINER varchar 384 1152 utf8mb3 utf8mb3_general_ci varchar(384)
+3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema EVENTS EVENT_TYPE varchar 9 27 utf8mb3 utf8mb3_general_ci varchar(9)
+NULL information_schema EVENTS EXECUTE_AT datetime NULL NULL NULL NULL datetime
+3.0000 information_schema EVENTS INTERVAL_VALUE varchar 256 768 utf8mb3 utf8mb3_general_ci varchar(256)
+3.0000 information_schema EVENTS INTERVAL_FIELD varchar 18 54 utf8mb3 utf8mb3_general_ci varchar(18)
+3.0000 information_schema EVENTS SQL_MODE varchar 8192 24576 utf8mb3 utf8mb3_general_ci varchar(8192)
+NULL information_schema EVENTS STARTS datetime NULL NULL NULL NULL datetime
+NULL information_schema EVENTS ENDS datetime NULL NULL NULL NULL datetime
+3.0000 information_schema EVENTS STATUS varchar 18 54 utf8mb3 utf8mb3_general_ci varchar(18)
+3.0000 information_schema EVENTS ON_COMPLETION varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+NULL information_schema EVENTS CREATED datetime NULL NULL NULL NULL datetime
+NULL information_schema EVENTS LAST_ALTERED datetime NULL NULL NULL NULL datetime
+NULL information_schema EVENTS LAST_EXECUTED datetime NULL NULL NULL NULL datetime
+3.0000 information_schema EVENTS EVENT_COMMENT varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema EVENTS ORIGINATOR bigint NULL NULL NULL NULL bigint(10)
+3.0000 information_schema EVENTS CHARACTER_SET_CLIENT varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema EVENTS COLLATION_CONNECTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema EVENTS DATABASE_COLLATION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema FILES FILE_ID bigint NULL NULL NULL NULL bigint(4)
+3.0000 information_schema FILES FILE_NAME varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema FILES FILE_TYPE varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema FILES TABLESPACE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES TABLE_CATALOG varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES LOGFILE_GROUP_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema FILES LOGFILE_GROUP_NUMBER bigint NULL NULL NULL NULL bigint(4)
+3.0000 information_schema FILES ENGINE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema FILES FULLTEXT_KEYS varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema FILES DELETED_ROWS bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES UPDATE_COUNT bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES FREE_EXTENTS bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES TOTAL_EXTENTS bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES CREATION_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES LAST_UPDATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES LAST_ACCESS_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4)
+NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8mb3 utf8mb3_general_ci varchar(10)
+NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema FILES CREATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES UPDATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES CHECK_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema FILES STATUS varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema FILES EXTRA varchar 255 765 utf8mb3 utf8mb3_general_ci varchar(255)
+3.0000 information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS F_TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS G_TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema GEOMETRY_COLUMNS STORAGE_TYPE tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE int NULL NULL NULL NULL int(7)
+NULL information_schema GEOMETRY_COLUMNS COORD_DIMENSION tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema GEOMETRY_COLUMNS MAX_PPR tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema GEOMETRY_COLUMNS SRID smallint NULL NULL NULL NULL smallint(5)
+3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema GLOBAL_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema GLOBAL_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema INDEX_STATISTICS TABLE_SCHEMA varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+3.0000 information_schema INDEX_STATISTICS TABLE_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+3.0000 information_schema INDEX_STATISTICS INDEX_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+NULL information_schema INDEX_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
+3.0000 information_schema KEYWORDS WORD varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_CACHES KEY_CACHE_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+NULL information_schema KEY_CACHES SEGMENTS int NULL NULL NULL NULL int(3) unsigned
+NULL information_schema KEY_CACHES SEGMENT_NUMBER int NULL NULL NULL NULL int(3) unsigned
+NULL information_schema KEY_CACHES FULL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES BLOCK_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES USED_BLOCKS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES UNUSED_BLOCKS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES DIRTY_BLOCKS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES READ_REQUESTS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES READS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES WRITE_REQUESTS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema KEY_CACHES WRITES bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema KEY_COLUMN_USAGE TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(10)
+NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NULL NULL NULL NULL bigint(10)
+3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema OPTIMIZER_TRACE QUERY longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+1.0000 information_schema OPTIMIZER_TRACE TRACE longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+NULL information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE int NULL NULL NULL NULL int(20)
+NULL information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES tinyint NULL NULL NULL NULL tinyint(1)
+3.0000 information_schema PARAMETERS SPECIFIC_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema PARAMETERS SPECIFIC_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARAMETERS SPECIFIC_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema PARAMETERS ORDINAL_POSITION int NULL NULL NULL NULL int(21)
+3.0000 information_schema PARAMETERS PARAMETER_MODE varchar 5 15 utf8mb3 utf8mb3_general_ci varchar(5)
+3.0000 information_schema PARAMETERS PARAMETER_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARAMETERS DATA_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema PARAMETERS CHARACTER_MAXIMUM_LENGTH int NULL NULL NULL NULL int(21)
+NULL information_schema PARAMETERS CHARACTER_OCTET_LENGTH int NULL NULL NULL NULL int(21)
+NULL information_schema PARAMETERS NUMERIC_PRECISION int NULL NULL NULL NULL int(21)
+NULL information_schema PARAMETERS NUMERIC_SCALE int NULL NULL NULL NULL int(21)
+NULL information_schema PARAMETERS DATETIME_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema PARAMETERS CHARACTER_SET_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARAMETERS COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema PARAMETERS DTD_IDENTIFIER longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema PARAMETERS ROUTINE_TYPE varchar 9 27 utf8mb3 utf8mb3_general_ci varchar(9)
+3.0000 information_schema PARTITIONS TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema PARTITIONS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARTITIONS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARTITIONS PARTITION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PARTITIONS SUBPARTITION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema PARTITIONS PARTITION_METHOD varchar 18 54 utf8mb3 utf8mb3_general_ci varchar(18)
+3.0000 information_schema PARTITIONS SUBPARTITION_METHOD varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+1.0000 information_schema PARTITIONS PARTITION_EXPRESSION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+1.0000 information_schema PARTITIONS SUBPARTITION_EXPRESSION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+1.0000 information_schema PARTITIONS PARTITION_DESCRIPTION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema PARTITIONS CREATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema PARTITIONS UPDATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema PARTITIONS CHECK_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PLUGINS PLUGIN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PLUGINS PLUGIN_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema PLUGINS PLUGIN_STATUS varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+3.0000 information_schema PLUGINS PLUGIN_TYPE varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema PLUGINS PLUGIN_TYPE_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema PLUGINS PLUGIN_LIBRARY varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PLUGINS PLUGIN_LIBRARY_VERSION varchar 20 60 utf8mb3 utf8mb3_general_ci varchar(20)
+3.0000 information_schema PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema PLUGINS PLUGIN_LICENSE varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+3.0000 information_schema PLUGINS LOAD_OPTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PLUGINS PLUGIN_MATURITY varchar 12 36 utf8mb3 utf8mb3_general_ci varchar(12)
+3.0000 information_schema PLUGINS PLUGIN_AUTH_VERSION varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
+NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4)
+3.0000 information_schema PROCESSLIST USER varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PROCESSLIST DB varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema PROCESSLIST COMMAND varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+NULL information_schema PROCESSLIST TIME int NULL NULL NULL NULL int(7)
+3.0000 information_schema PROCESSLIST STATE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema PROCESSLIST INFO longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+NULL information_schema PROCESSLIST TIME_MS decimal NULL NULL NULL NULL decimal(22,3)
+NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2)
+NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3)
+NULL information_schema PROCESSLIST MEMORY_USED bigint NULL NULL NULL NULL bigint(7)
+NULL information_schema PROCESSLIST MAX_MEMORY_USED bigint NULL NULL NULL NULL bigint(7)
+NULL information_schema PROCESSLIST EXAMINED_ROWS int NULL NULL NULL NULL int(7)
+NULL information_schema PROCESSLIST QUERY_ID bigint NULL NULL NULL NULL bigint(4)
+1.0000 information_schema PROCESSLIST INFO_BINARY blob 65535 65535 NULL NULL blob
+NULL information_schema PROCESSLIST TID bigint NULL NULL NULL NULL bigint(4)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES SPECIFIC_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES ROUTINE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema ROUTINES ROUTINE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES ROUTINE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES ROUTINE_TYPE varchar 13 39 utf8mb3 utf8mb3_general_ci varchar(13)
+3.0000 information_schema ROUTINES DATA_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema ROUTINES CHARACTER_MAXIMUM_LENGTH int NULL NULL NULL NULL int(21)
+NULL information_schema ROUTINES CHARACTER_OCTET_LENGTH int NULL NULL NULL NULL int(21)
+NULL information_schema ROUTINES NUMERIC_PRECISION int NULL NULL NULL NULL int(21)
+NULL information_schema ROUTINES NUMERIC_SCALE int NULL NULL NULL NULL int(21)
+NULL information_schema ROUTINES DATETIME_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema ROUTINES CHARACTER_SET_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema ROUTINES DTD_IDENTIFIER longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema ROUTINES ROUTINE_BODY varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+1.0000 information_schema ROUTINES ROUTINE_DEFINITION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema ROUTINES EXTERNAL_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES EXTERNAL_LANGUAGE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES PARAMETER_STYLE varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+3.0000 information_schema ROUTINES IS_DETERMINISTIC varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema ROUTINES SQL_DATA_ACCESS varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES SQL_PATH varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES SECURITY_TYPE varchar 7 21 utf8mb3 utf8mb3_general_ci varchar(7)
+NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime
+NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime
+3.0000 information_schema ROUTINES SQL_MODE varchar 8192 24576 utf8mb3 utf8mb3_general_ci varchar(8192)
+1.0000 information_schema ROUTINES ROUTINE_COMMENT longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema ROUTINES DEFINER varchar 384 1152 utf8mb3 utf8mb3_general_ci varchar(384)
+3.0000 information_schema ROUTINES CHARACTER_SET_CLIENT varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema ROUTINES COLLATION_CONNECTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema ROUTINES DATABASE_COLLATION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMATA CATALOG_NAME varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema SCHEMATA SCHEMA_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema SCHEMATA SCHEMA_COMMENT varchar 1024 3072 utf8mb3 utf8mb3_general_ci varchar(1024)
+3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema SESSION_STATUS VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SESSION_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+NULL information_schema SPATIAL_REF_SYS SRID smallint NULL NULL NULL NULL smallint(5)
+3.0000 information_schema SPATIAL_REF_SYS AUTH_NAME varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+NULL information_schema SPATIAL_REF_SYS AUTH_SRID int NULL NULL NULL NULL int(5)
+3.0000 information_schema SPATIAL_REF_SYS SRTEXT varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SQL_FUNCTIONS FUNCTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema STATISTICS NON_UNIQUE bigint NULL NULL NULL NULL bigint(1)
+3.0000 information_schema STATISTICS INDEX_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema STATISTICS INDEX_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema STATISTICS SEQ_IN_INDEX bigint NULL NULL NULL NULL bigint(2)
+3.0000 information_schema STATISTICS COLUMN_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema STATISTICS COLLATION varchar 1 3 utf8mb3 utf8mb3_general_ci varchar(1)
+NULL information_schema STATISTICS CARDINALITY bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3)
+3.0000 information_schema STATISTICS PACKED varchar 10 30 utf8mb3 utf8mb3_general_ci varchar(10)
+3.0000 information_schema STATISTICS NULLABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema STATISTICS INDEX_TYPE varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+3.0000 information_schema STATISTICS COMMENT varchar 16 48 utf8mb3 utf8mb3_general_ci varchar(16)
+3.0000 information_schema STATISTICS INDEX_COMMENT varchar 1024 3072 utf8mb3 utf8mb3_general_ci varchar(1024)
+3.0000 information_schema STATISTICS IGNORED varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema SYSTEM_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES SESSION_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES DEFAULT_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SYSTEM_VARIABLES VARIABLE_SCOPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES VARIABLE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES VARIABLE_COMMENT varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE varchar 21 63 utf8mb3 utf8mb3_general_ci varchar(21)
+3.0000 information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE varchar 21 63 utf8mb3 utf8mb3_general_ci varchar(21)
+3.0000 information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE varchar 21 63 utf8mb3 utf8mb3_general_ci varchar(21)
+1.0000 information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema SYSTEM_VARIABLES READ_ONLY varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE_PATH varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema TABLES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLES ENGINE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8mb3 utf8mb3_general_ci varchar(10)
+NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime
+NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime
+3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema TABLES CREATE_OPTIONS varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema TABLES TABLE_COMMENT varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+NULL information_schema TABLES MAX_INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema TABLES TEMPORARY varchar 1 3 utf8mb3 utf8mb3_general_ci varchar(1)
+3.0000 information_schema TABLESPACES TABLESPACE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLESPACES ENGINE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLESPACES TABLESPACE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLESPACES LOGFILE_GROUP_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema TABLESPACES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLESPACES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLESPACES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema TABLESPACES NODEGROUP_ID bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema TABLESPACES TABLESPACE_COMMENT varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TABLE_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema TABLE_STATISTICS TABLE_SCHEMA varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+3.0000 information_schema TABLE_STATISTICS TABLE_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
+NULL information_schema TABLE_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema TABLE_STATISTICS ROWS_CHANGED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES bigint NULL NULL NULL NULL bigint(21)
+3.0000 information_schema TRIGGERS TRIGGER_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TRIGGERS TRIGGER_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS TRIGGER_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS EVENT_MANIPULATION varchar 6 18 utf8mb3 utf8mb3_general_ci varchar(6)
+3.0000 information_schema TRIGGERS EVENT_OBJECT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema TRIGGERS EVENT_OBJECT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS EVENT_OBJECT_TABLE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(4)
+1.0000 information_schema TRIGGERS ACTION_CONDITION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+1.0000 information_schema TRIGGERS ACTION_STATEMENT longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema TRIGGERS ACTION_ORIENTATION varchar 9 27 utf8mb3 utf8mb3_general_ci varchar(9)
+3.0000 information_schema TRIGGERS ACTION_TIMING varchar 6 18 utf8mb3 utf8mb3_general_ci varchar(6)
+3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime(2)
+3.0000 information_schema TRIGGERS SQL_MODE varchar 8192 24576 utf8mb3 utf8mb3_general_ci varchar(8192)
+3.0000 information_schema TRIGGERS DEFINER varchar 384 1152 utf8mb3 utf8mb3_general_ci varchar(384)
+3.0000 information_schema TRIGGERS CHARACTER_SET_CLIENT varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema TRIGGERS COLLATION_CONNECTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema TRIGGERS DATABASE_COLLATION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 385 1155 utf8mb3 utf8mb3_general_ci varchar(385)
+3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema USER_STATISTICS USER varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+NULL information_schema USER_STATISTICS TOTAL_CONNECTIONS int NULL NULL NULL NULL int(11)
+NULL information_schema USER_STATISTICS CONCURRENT_CONNECTIONS int NULL NULL NULL NULL int(11)
+NULL information_schema USER_STATISTICS CONNECTED_TIME int NULL NULL NULL NULL int(11)
+NULL information_schema USER_STATISTICS BUSY_TIME double NULL NULL NULL NULL double
+NULL information_schema USER_STATISTICS CPU_TIME double NULL NULL NULL NULL double
+NULL information_schema USER_STATISTICS BYTES_RECEIVED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS BYTES_SENT bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_SENT bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_DELETED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_INSERTED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROWS_UPDATED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS SELECT_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS UPDATE_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS OTHER_COMMANDS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS COMMIT_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS DENIED_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS LOST_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS ACCESS_DENIED bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS EMPTY_QUERIES bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema USER_STATISTICS TOTAL_SSL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED bigint NULL NULL NULL NULL bigint(21)
+3.0000 information_schema VIEWS TABLE_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+3.0000 information_schema VIEWS TABLE_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema VIEWS TABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8mb3 utf8mb3_general_ci longtext
+3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8mb3 utf8mb3_general_ci varchar(8)
+3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
+3.0000 information_schema VIEWS DEFINER varchar 384 1152 utf8mb3 utf8mb3_general_ci varchar(384)
+3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8mb3 utf8mb3_general_ci varchar(7)
+3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
+3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 information_schema VIEWS ALGORITHM varchar 10 30 utf8mb3 utf8mb3_general_ci varchar(10)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result
new file mode 100644
index 00000000..b33d6a28
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result
@@ -0,0 +1,1087 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+USE test;
+drop table if exists tb1 ;
+create table tb1 (
+f1 char,
+f2 char binary,
+f3 char ascii,
+f12 binary,
+f13 tinyint,
+f14 tinyint unsigned,
+f15 tinyint zerofill,
+f16 tinyint unsigned zerofill,
+f17 smallint,
+f18 smallint unsigned,
+f19 smallint zerofill,
+f20 smallint unsigned zerofill,
+f21 mediumint,
+f22 mediumint unsigned,
+f23 mediumint zerofill,
+f24 mediumint unsigned zerofill,
+f25 int,
+f26 int unsigned,
+f27 int zerofill,
+f28 int unsigned zerofill,
+f29 bigint,
+f30 bigint unsigned,
+f31 bigint zerofill,
+f32 bigint unsigned zerofill,
+f33 decimal not null DEFAULT 9.9,
+f34 decimal unsigned not null DEFAULT 9.9,
+f35 decimal zerofill not null DEFAULT 9.9,
+f36 decimal unsigned zerofill not null DEFAULT 9.9,
+f37 decimal (0) not null DEFAULT 9.9,
+f38 decimal (64) not null DEFAULT 9.9,
+f39 decimal (0) unsigned not null DEFAULT 9.9,
+f40 decimal (64) unsigned not null DEFAULT 9.9,
+f41 decimal (0) zerofill not null DEFAULT 9.9,
+f42 decimal (64) zerofill not null DEFAULT 9.9,
+f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
+f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
+f45 decimal (0,0) not null DEFAULT 9.9,
+f46 decimal (63,30) not null DEFAULT 9.9,
+f47 decimal (0,0) unsigned not null DEFAULT 9.9,
+f48 decimal (63,30) unsigned not null DEFAULT 9.9,
+f49 decimal (0,0) zerofill not null DEFAULT 9.9,
+f50 decimal (63,30) zerofill not null DEFAULT 9.9,
+f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
+f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
+f53 numeric not null DEFAULT 99,
+f54 numeric unsigned not null DEFAULT 99,
+f55 numeric zerofill not null DEFAULT 99,
+f56 numeric unsigned zerofill not null DEFAULT 99,
+f57 numeric (0) not null DEFAULT 99,
+f58 numeric (64) not null DEFAULT 99
+) engine = memory;
+Warnings:
+Note 1265 Data truncated for column 'f33' at row 0
+Note 1265 Data truncated for column 'f34' at row 0
+Note 1265 Data truncated for column 'f35' at row 0
+Note 1265 Data truncated for column 'f36' at row 0
+Note 1265 Data truncated for column 'f37' at row 0
+Note 1265 Data truncated for column 'f38' at row 0
+Note 1265 Data truncated for column 'f39' at row 0
+Note 1265 Data truncated for column 'f40' at row 0
+Note 1265 Data truncated for column 'f41' at row 0
+Note 1265 Data truncated for column 'f42' at row 0
+Note 1265 Data truncated for column 'f43' at row 0
+Note 1265 Data truncated for column 'f44' at row 0
+Note 1265 Data truncated for column 'f45' at row 0
+Note 1265 Data truncated for column 'f47' at row 0
+Note 1265 Data truncated for column 'f49' at row 0
+Note 1265 Data truncated for column 'f51' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb1.txt'
+into table tb1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = memory;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
+into table tb2 ;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = memory;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
+drop table if exists tb4 ;
+create table tb4 (
+f176 numeric (0) unsigned not null DEFAULT 9,
+f177 numeric (64) unsigned not null DEFAULT 9,
+f178 numeric (0) zerofill not null DEFAULT 9,
+f179 numeric (64) zerofill not null DEFAULT 9,
+f180 numeric (0) unsigned zerofill not null DEFAULT 9,
+f181 numeric (64) unsigned zerofill not null DEFAULT 9,
+f182 numeric (0,0) not null DEFAULT 9,
+f183 numeric (63,30) not null DEFAULT 9,
+f184 numeric (0,0) unsigned not null DEFAULT 9,
+f185 numeric (63,30) unsigned not null DEFAULT 9,
+f186 numeric (0,0) zerofill not null DEFAULT 9,
+f187 numeric (63,30) zerofill not null DEFAULT 9,
+f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
+f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
+f190 real not null DEFAULT 88.8,
+f191 real unsigned not null DEFAULT 88.8,
+f192 real zerofill not null DEFAULT 88.8,
+f193 real unsigned zerofill not null DEFAULT 88.8,
+f194 double not null DEFAULT 55.5,
+f195 double unsigned not null DEFAULT 55.5,
+f196 double zerofill not null DEFAULT 55.5,
+f197 double unsigned zerofill not null DEFAULT 55.5,
+f198 float,
+f199 float unsigned,
+f200 float zerofill,
+f201 float unsigned zerofill,
+f202 float(0),
+f203 float(23),
+f204 float(0) unsigned,
+f205 float(23) unsigned,
+f206 float(0) zerofill,
+f207 float(23) zerofill,
+f208 float(0) unsigned zerofill,
+f209 float(23) unsigned zerofill,
+f210 float(24),
+f211 float(53),
+f212 float(24) unsigned,
+f213 float(53) unsigned,
+f214 float(24) zerofill,
+f215 float(53) zerofill,
+f216 float(24) unsigned zerofill,
+f217 float(53) unsigned zerofill,
+f218 date,
+f219 time,
+f220 datetime,
+f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+f222 year,
+f223 year(3),
+f224 year(4),
+f225 enum("1enum","2enum"),
+f226 set("1set","2set"),
+f236 char(95),
+f241 char(255),
+f237 char(130) binary,
+f238 varchar(25000) binary,
+f239 varbinary(0),
+f240 varchar(1200)
+) engine = memory;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb4.txt'
+into table tb4;
+USE test1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = memory;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
+into table tb2 ;
+USE test;
+USE test;
+DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
+CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MEMORY;
+CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MEMORY;
+CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MEMORY;
+CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MEMORY;
+CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MEMORY;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t1;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t2;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t4;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t10;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t11;
+drop TABLE if exists t3;
+CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' INTO TABLE t3;
+drop database if exists test4;
+CREATE database test4;
+use test4;
+CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
+ENGINE = MEMORY;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t6;
+use test;
+drop TABLE if exists t7, t8;
+CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
+CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
+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
+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
+drop TABLE if exists t9;
+CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MEMORY;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' INTO TABLE t9;
+SELECT * FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t1 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t1 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t10 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t10 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t10 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t11 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t11 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t11 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t2 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t2 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t2 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t3 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t3 f2 2 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t4 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t4 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t4 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t7 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t7 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t8 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t8 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t9 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test tb1 f1 1 NULL YES char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb1 f12 4 NULL YES binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
+def test tb1 f13 5 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) select,insert,update,references NEVER NULL
+def test tb1 f14 6 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
+def test tb1 f15 7 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f16 8 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f17 9 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(6) select,insert,update,references NEVER NULL
+def test tb1 f18 10 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references NEVER NULL
+def test tb1 f19 11 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f2 2 NULL YES char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
+def test tb1 f20 12 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f21 13 NULL YES mediumint NULL NULL 7 0 NULL NULL NULL mediumint(9) select,insert,update,references NEVER NULL
+def test tb1 f22 14 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned select,insert,update,references NEVER NULL
+def test tb1 f23 15 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f24 16 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f25 17 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test tb1 f26 18 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def test tb1 f27 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f28 20 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f29 21 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def test tb1 f3 3 NULL YES char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb1 f30 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def test tb1 f31 23 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f32 24 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f33 25 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f34 26 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f35 27 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f36 28 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f37 29 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f38 30 10 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb1 f39 31 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f40 32 10 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f41 33 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f42 34 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f43 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f44 36 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f45 37 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f46 38 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb1 f47 39 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f48 40 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb1 f49 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f50 42 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f51 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f52 44 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f53 45 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f54 46 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f55 47 0000000099 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f56 48 0000000099 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f57 49 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f58 50 99 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
+def test tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def test tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
+def test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
+def test tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
+def test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f118 1 'a' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb3 f119 2 '' NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
+def test tb3 f120 3 '' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb3 f121 4 NULL YES char 50 50 NULL NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references NEVER NULL
+def test tb3 f122 5 NULL YES char 50 50 NULL NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references NEVER NULL
+def test tb3 f129 6 '' NO binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
+def test tb3 f130 7 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) select,insert,update,references NEVER NULL
+def test tb3 f131 8 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
+def test tb3 f132 9 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f133 10 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f134 11 999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(6) select,insert,update,references NEVER NULL
+def test tb3 f135 12 999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references NEVER NULL
+def test tb3 f136 13 00999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f137 14 00999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f138 15 9999 NO mediumint NULL NULL 7 0 NULL NULL NULL mediumint(9) select,insert,update,references NEVER NULL
+def test tb3 f139 16 9999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned select,insert,update,references NEVER NULL
+def test tb3 f140 17 00009999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f141 18 00009999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f142 19 99999 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test tb3 f143 20 99999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def test tb3 f144 21 0000099999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f145 22 0000099999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f146 23 999999 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def test tb3 f147 24 999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def test tb3 f148 25 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f149 26 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f150 27 1000 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f151 28 999 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f152 29 0000001000 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f153 30 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f154 31 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f155 32 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb3 f156 33 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f157 34 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f158 35 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f159 36 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f160 37 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f161 38 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f162 39 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f163 40 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb3 f164 41 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f165 42 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb3 f166 43 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f167 44 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f168 45 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f169 46 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f170 47 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f171 48 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f172 49 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f173 50 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f174 51 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f175 52 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb4 f191 16 88.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb4 f192 17 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f193 18 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb4 f195 20 55.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb4 f196 21 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f197 22 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f199 24 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f200 25 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f201 26 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f204 29 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f205 30 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f206 31 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f207 32 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f208 33 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f209 34 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb4 f212 37 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f213 38 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb4 f214 39 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f215 40 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f216 41 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f217 42 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test tb4 f219 44 NULL YES time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
+def test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def test tb4 f221 46 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb4 f225 50 NULL YES enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
+def test tb4 f226 51 NULL YES set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
+def test tb4 f236 52 NULL YES char 95 95 NULL NULL NULL latin1 latin1_swedish_ci char(95) select,insert,update,references NEVER NULL
+def test tb4 f237 54 NULL YES char 130 130 NULL NULL NULL latin1 latin1_bin char(130) select,insert,update,references NEVER NULL
+def test tb4 f238 55 NULL YES varchar 25000 25000 NULL NULL NULL latin1 latin1_bin varchar(25000) select,insert,update,references NEVER NULL
+def test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL NULL varbinary(0) select,insert,update,references NEVER NULL
+def test tb4 f240 57 NULL YES varchar 1200 1200 NULL NULL NULL latin1 latin1_swedish_ci varchar(1200) select,insert,update,references NEVER NULL
+def test tb4 f241 53 NULL YES char 255 255 NULL NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references NEVER NULL
+def test1 tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test1 tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
+def test1 tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def test1 tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
+def test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test1 tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
+def test1 tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
+def test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test1 tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test1 tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test1 tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test4 t6 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test4 t6 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test4 t6 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+1.0000 binary NULL NULL
+1.0000 char latin1 latin1_bin
+1.0000 varchar latin1 latin1_bin
+1.0000 char latin1 latin1_swedish_ci
+1.0000 enum latin1 latin1_swedish_ci
+1.0000 set latin1 latin1_swedish_ci
+1.0000 varchar latin1 latin1_swedish_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+NULL bigint NULL NULL
+NULL date NULL NULL
+NULL datetime NULL NULL
+NULL decimal NULL NULL
+NULL double NULL NULL
+NULL float NULL NULL
+NULL int NULL NULL
+NULL mediumint NULL NULL
+NULL smallint NULL NULL
+NULL time NULL NULL
+NULL timestamp NULL NULL
+NULL tinyint NULL NULL
+NULL varbinary NULL NULL
+NULL year NULL NULL
+--> 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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+1.0000 test t1 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t1 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t1 f3 date NULL NULL NULL NULL date
+NULL test t1 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t1 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t1 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t10 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t10 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t10 f3 date NULL NULL NULL NULL date
+NULL test t10 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t10 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t10 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t11 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t11 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t11 f3 date NULL NULL NULL NULL date
+NULL test t11 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t11 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t11 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t2 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t2 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t2 f3 date NULL NULL NULL NULL date
+NULL test t2 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t2 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t2 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t3 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t3 f2 char 20 20 latin1 latin1_swedish_ci char(20)
+NULL test t3 f3 int NULL NULL NULL NULL int(11)
+1.0000 test t4 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t4 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t4 f3 date NULL NULL NULL NULL date
+NULL test t4 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t4 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t4 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t7 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t7 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t7 f3 date NULL NULL NULL NULL date
+NULL test t7 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t8 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t8 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t8 f3 date NULL NULL NULL NULL date
+NULL test t8 f4 int NULL NULL NULL NULL int(11)
+NULL test t9 f1 int NULL NULL NULL NULL int(11)
+1.0000 test t9 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t9 f3 int NULL NULL NULL NULL int(11)
+1.0000 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1)
+1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1)
+NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4)
+NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned
+NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6)
+NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned
+NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9)
+NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned
+NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb1 f25 int NULL NULL NULL NULL int(11)
+NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned
+NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20)
+NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb2 f73 double NULL NULL NULL NULL double
+NULL test tb2 f74 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f75 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f76 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f77 double NULL NULL NULL NULL double
+NULL test tb2 f78 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f79 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f80 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f81 float NULL NULL NULL NULL float
+NULL test tb2 f82 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f83 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f84 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f85 float NULL NULL NULL NULL float
+NULL test tb2 f86 float NULL NULL NULL NULL float
+NULL test tb2 f87 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f88 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f89 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f90 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f91 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f92 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f93 float NULL NULL NULL NULL float
+NULL test tb2 f94 double NULL NULL NULL NULL double
+NULL test tb2 f95 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f96 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f97 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f98 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f99 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f100 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f101 date NULL NULL NULL NULL date
+NULL test tb2 f102 time NULL NULL NULL NULL time
+NULL test tb2 f103 datetime NULL NULL NULL NULL datetime
+NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp
+NULL test tb2 f105 year NULL NULL NULL NULL year(4)
+NULL test tb2 f106 year NULL NULL NULL NULL year(4)
+NULL test tb2 f107 year NULL NULL NULL NULL year(4)
+1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1)
+1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb3 f121 char 50 50 latin1 latin1_swedish_ci char(50)
+1.0000 test tb3 f122 char 50 50 latin1 latin1_swedish_ci char(50)
+1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1)
+NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4)
+NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned
+NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6)
+NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned
+NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9)
+NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned
+NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb3 f142 int NULL NULL NULL NULL int(11)
+NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned
+NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20)
+NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb4 f190 double NULL NULL NULL NULL double
+NULL test tb4 f191 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f192 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f193 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f194 double NULL NULL NULL NULL double
+NULL test tb4 f195 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f196 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f197 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f198 float NULL NULL NULL NULL float
+NULL test tb4 f199 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f200 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f201 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f202 float NULL NULL NULL NULL float
+NULL test tb4 f203 float NULL NULL NULL NULL float
+NULL test tb4 f204 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f205 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f206 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f207 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f208 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f209 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f210 float NULL NULL NULL NULL float
+NULL test tb4 f211 double NULL NULL NULL NULL double
+NULL test tb4 f212 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f213 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f214 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f215 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f216 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f217 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f218 date NULL NULL NULL NULL date
+NULL test tb4 f219 time NULL NULL NULL NULL time
+NULL test tb4 f220 datetime NULL NULL NULL NULL datetime
+NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp
+NULL test tb4 f222 year NULL NULL NULL NULL year(4)
+NULL test tb4 f223 year NULL NULL NULL NULL year(4)
+NULL test tb4 f224 year NULL NULL NULL NULL year(4)
+1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test tb4 f236 char 95 95 latin1 latin1_swedish_ci char(95)
+1.0000 test tb4 f241 char 255 255 latin1 latin1_swedish_ci char(255)
+1.0000 test tb4 f237 char 130 130 latin1 latin1_bin char(130)
+1.0000 test tb4 f238 varchar 25000 25000 latin1 latin1_bin varchar(25000)
+NULL test tb4 f239 varbinary 0 0 NULL NULL varbinary(0)
+1.0000 test tb4 f240 varchar 1200 1200 latin1 latin1_swedish_ci varchar(1200)
+NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test1 tb2 f73 double NULL NULL NULL NULL double
+NULL test1 tb2 f74 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f75 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f76 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f77 double NULL NULL NULL NULL double
+NULL test1 tb2 f78 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f79 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f80 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f81 float NULL NULL NULL NULL float
+NULL test1 tb2 f82 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f83 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f84 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f85 float NULL NULL NULL NULL float
+NULL test1 tb2 f86 float NULL NULL NULL NULL float
+NULL test1 tb2 f87 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f88 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f89 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f90 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f91 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f92 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f93 float NULL NULL NULL NULL float
+NULL test1 tb2 f94 double NULL NULL NULL NULL double
+NULL test1 tb2 f95 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f96 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f97 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f98 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f99 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f100 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f101 date NULL NULL NULL NULL date
+NULL test1 tb2 f102 time NULL NULL NULL NULL time
+NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime
+NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp
+NULL test1 tb2 f105 year NULL NULL NULL NULL year(4)
+NULL test1 tb2 f106 year NULL NULL NULL NULL year(4)
+NULL test1 tb2 f107 year NULL NULL NULL NULL year(4)
+1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test4 t6 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test4 t6 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+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)
+DROP DATABASE test1;
+DROP DATABASE test4;
+DROP TABLE test.t1;
+DROP TABLE test.t2;
+DROP TABLE test.t3;
+DROP TABLE test.t4;
+DROP TABLE test.t7;
+DROP TABLE test.t8;
+DROP TABLE test.t9;
+DROP TABLE test.t10;
+DROP TABLE test.t11;
+DROP TABLE test.tb1;
+DROP TABLE test.tb2;
+DROP TABLE test.tb3;
+DROP TABLE test.tb4;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result
new file mode 100644
index 00000000..e7a8a176
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result
@@ -0,0 +1,1216 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+USE test;
+drop table if exists tb1 ;
+create table tb1 (
+f1 char,
+f2 char binary,
+f3 char ascii,
+f4 tinytext,
+f5 text,
+f6 mediumtext,
+f7 longtext,
+f8 tinyblob,
+f9 blob,
+f10 mediumblob,
+f11 longblob,
+f12 binary,
+f13 tinyint,
+f14 tinyint unsigned,
+f15 tinyint zerofill,
+f16 tinyint unsigned zerofill,
+f17 smallint,
+f18 smallint unsigned,
+f19 smallint zerofill,
+f20 smallint unsigned zerofill,
+f21 mediumint,
+f22 mediumint unsigned,
+f23 mediumint zerofill,
+f24 mediumint unsigned zerofill,
+f25 int,
+f26 int unsigned,
+f27 int zerofill,
+f28 int unsigned zerofill,
+f29 bigint,
+f30 bigint unsigned,
+f31 bigint zerofill,
+f32 bigint unsigned zerofill,
+f33 decimal not null DEFAULT 9.9,
+f34 decimal unsigned not null DEFAULT 9.9,
+f35 decimal zerofill not null DEFAULT 9.9,
+f36 decimal unsigned zerofill not null DEFAULT 9.9,
+f37 decimal (0) not null DEFAULT 9.9,
+f38 decimal (64) not null DEFAULT 9.9,
+f39 decimal (0) unsigned not null DEFAULT 9.9,
+f40 decimal (64) unsigned not null DEFAULT 9.9,
+f41 decimal (0) zerofill not null DEFAULT 9.9,
+f42 decimal (64) zerofill not null DEFAULT 9.9,
+f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
+f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
+f45 decimal (0,0) not null DEFAULT 9.9,
+f46 decimal (63,30) not null DEFAULT 9.9,
+f47 decimal (0,0) unsigned not null DEFAULT 9.9,
+f48 decimal (63,30) unsigned not null DEFAULT 9.9,
+f49 decimal (0,0) zerofill not null DEFAULT 9.9,
+f50 decimal (63,30) zerofill not null DEFAULT 9.9,
+f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
+f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
+f53 numeric not null DEFAULT 99,
+f54 numeric unsigned not null DEFAULT 99,
+f55 numeric zerofill not null DEFAULT 99,
+f56 numeric unsigned zerofill not null DEFAULT 99,
+f57 numeric (0) not null DEFAULT 99,
+f58 numeric (64) not null DEFAULT 99
+) engine = myisam;
+Warnings:
+Note 1265 Data truncated for column 'f33' at row 0
+Note 1265 Data truncated for column 'f34' at row 0
+Note 1265 Data truncated for column 'f35' at row 0
+Note 1265 Data truncated for column 'f36' at row 0
+Note 1265 Data truncated for column 'f37' at row 0
+Note 1265 Data truncated for column 'f38' at row 0
+Note 1265 Data truncated for column 'f39' at row 0
+Note 1265 Data truncated for column 'f40' at row 0
+Note 1265 Data truncated for column 'f41' at row 0
+Note 1265 Data truncated for column 'f42' at row 0
+Note 1265 Data truncated for column 'f43' at row 0
+Note 1265 Data truncated for column 'f44' at row 0
+Note 1265 Data truncated for column 'f45' at row 0
+Note 1265 Data truncated for column 'f47' at row 0
+Note 1265 Data truncated for column 'f49' at row 0
+Note 1265 Data truncated for column 'f51' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb1.txt'
+into table tb1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set",
+f110 VARBINARY(64) null,
+f111 VARBINARY(27) null ,
+f112 VARBINARY(64) null ,
+f113 VARBINARY(192) null ,
+f114 VARBINARY(192) ,
+f115 VARBINARY(27) null ,
+f116 VARBINARY(64) null,
+f117 VARBINARY(192) null
+) engine = myisam;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
+into table tb2;
+drop table if exists tb3 ;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 tinytext,
+f122 text,
+f123 mediumtext,
+f124 longtext,
+f125 tinyblob,
+f126 blob,
+f127 mediumblob,
+f128 longblob,
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) Engine = myisam;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb3.txt'
+into table tb3;
+drop table if exists tb4 ;
+create table tb4 (
+f176 numeric (0) unsigned not null DEFAULT 9,
+f177 numeric (64) unsigned not null DEFAULT 9,
+f178 numeric (0) zerofill not null DEFAULT 9,
+f179 numeric (64) zerofill not null DEFAULT 9,
+f180 numeric (0) unsigned zerofill not null DEFAULT 9,
+f181 numeric (64) unsigned zerofill not null DEFAULT 9,
+f182 numeric (0,0) not null DEFAULT 9,
+f183 numeric (63,30) not null DEFAULT 9,
+f184 numeric (0,0) unsigned not null DEFAULT 9,
+f185 numeric (63,30) unsigned not null DEFAULT 9,
+f186 numeric (0,0) zerofill not null DEFAULT 9,
+f187 numeric (63,30) zerofill not null DEFAULT 9,
+f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
+f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
+f190 real not null DEFAULT 88.8,
+f191 real unsigned not null DEFAULT 88.8,
+f192 real zerofill not null DEFAULT 88.8,
+f193 real unsigned zerofill not null DEFAULT 88.8,
+f194 double not null DEFAULT 55.5,
+f195 double unsigned not null DEFAULT 55.5,
+f196 double zerofill not null DEFAULT 55.5,
+f197 double unsigned zerofill not null DEFAULT 55.5,
+f198 float,
+f199 float unsigned,
+f200 float zerofill,
+f201 float unsigned zerofill,
+f202 float(0),
+f203 float(23),
+f204 float(0) unsigned,
+f205 float(23) unsigned,
+f206 float(0) zerofill,
+f207 float(23) zerofill,
+f208 float(0) unsigned zerofill,
+f209 float(23) unsigned zerofill,
+f210 float(24),
+f211 float(53),
+f212 float(24) unsigned,
+f213 float(53) unsigned,
+f214 float(24) zerofill,
+f215 float(53) zerofill,
+f216 float(24) unsigned zerofill,
+f217 float(53) unsigned zerofill,
+f218 date,
+f219 time,
+f220 datetime,
+f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+f222 year,
+f223 year(3),
+f224 year(4),
+f225 enum("1enum","2enum"),
+f226 set("1set","2set"),
+f227 VARBINARY(64),
+f228 VARBINARY(27),
+f229 VARBINARY(64),
+f230 VARBINARY(192),
+f231 VARBINARY(192),
+f232 VARBINARY(27),
+f233 VARBINARY(64),
+f234 VARBINARY(192),
+f235 char(255),
+f236 char(60) ascii,
+f237 char(255) binary,
+f238 varchar(0) binary,
+f239 varbinary(1000),
+f240 varchar(120),
+f241 char(100),
+f242 bit(30)
+) engine = myisam;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb4.txt'
+into table tb4;
+USE test1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set",
+f110 VARBINARY(64) null,
+f111 VARBINARY(27) null ,
+f112 VARBINARY(64) null ,
+f113 VARBINARY(192) null ,
+f114 VARBINARY(192) ,
+f115 VARBINARY(27) null ,
+f116 VARBINARY(64) null,
+f117 VARBINARY(192) null
+) engine = myisam;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
+into table tb2;
+USE test;
+USE test;
+DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
+CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t1;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t2;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t4;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t10;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t11;
+drop TABLE if exists t3;
+CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' INTO TABLE t3;
+drop database if exists test4;
+CREATE database test4;
+use test4;
+CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
+ENGINE = MyISAM;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t6;
+use test;
+drop TABLE if exists t7, t8;
+CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
+CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
+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
+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
+drop TABLE if exists t9;
+CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' INTO TABLE t9;
+SELECT * FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t1 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t1 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t10 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t10 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t10 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t11 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t11 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t11 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t2 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t2 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t2 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t3 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t3 f2 2 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t4 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t4 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t4 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t7 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t7 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t8 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test t8 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test t9 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test tb1 f1 1 NULL YES char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL NULL mediumblob select,insert,update,references NEVER NULL
+def test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
+def test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) select,insert,update,references NEVER NULL
+def test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
+def test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(6) select,insert,update,references NEVER NULL
+def test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references NEVER NULL
+def test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f2 2 NULL YES char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
+def test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL NULL mediumint(9) select,insert,update,references NEVER NULL
+def test tb1 f22 22 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned select,insert,update,references NEVER NULL
+def test tb1 f23 23 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f24 24 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def test tb1 f3 3 NULL YES char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb1 f30 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def test tb1 f31 31 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f32 32 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f4 4 NULL YES tinytext 255 255 NULL NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NEVER NULL
+def test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f5 5 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
+def test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references NEVER NULL
+def test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references NEVER NULL
+def test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob select,insert,update,references NEVER NULL
+def test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
+def test tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
+def test tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def test tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
+def test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
+def test tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
+def test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
+def test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) select,insert,update,references NEVER NULL
+def test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
+def test tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) select,insert,update,references NEVER NULL
+def test tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) select,insert,update,references NEVER NULL
+def test tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) select,insert,update,references NEVER NULL
+def test tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
+def test tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) select,insert,update,references NEVER NULL
+def test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f118 1 'a' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb3 f119 2 '' NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
+def test tb3 f120 3 '' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
+def test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NEVER NULL
+def test tb3 f122 5 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
+def test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references NEVER NULL
+def test tb3 f124 7 NULL YES longtext 4294967295 4294967295 NULL NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references NEVER NULL
+def test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob select,insert,update,references NEVER NULL
+def test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
+def test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL NULL mediumblob select,insert,update,references NEVER NULL
+def test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def test tb3 f129 12 '' NO binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
+def test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) select,insert,update,references NEVER NULL
+def test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
+def test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(6) select,insert,update,references NEVER NULL
+def test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references NEVER NULL
+def test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL NULL mediumint(9) select,insert,update,references NEVER NULL
+def test tb3 f139 22 9999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned select,insert,update,references NEVER NULL
+def test tb3 f140 23 00009999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f141 24 00009999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def test tb3 f147 30 999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
+def test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb4 f191 16 88.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb4 f192 17 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f193 18 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb4 f195 20 55.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb4 f196 21 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f197 22 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f199 24 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f200 25 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f201 26 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f204 29 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f205 30 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f206 31 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f207 32 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f208 33 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f209 34 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test tb4 f212 37 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test tb4 f213 38 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test tb4 f214 39 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f215 40 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f216 41 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f217 42 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test tb4 f219 44 NULL YES time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
+def test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def test tb4 f221 46 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test tb4 f225 50 NULL YES enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
+def test tb4 f226 51 NULL YES set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
+def test tb4 f227 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
+def test tb4 f228 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) select,insert,update,references NEVER NULL
+def test tb4 f229 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
+def test tb4 f230 55 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) select,insert,update,references NEVER NULL
+def test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) select,insert,update,references NEVER NULL
+def test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) select,insert,update,references NEVER NULL
+def test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
+def test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) select,insert,update,references NEVER NULL
+def test tb4 f235 60 NULL YES char 255 255 NULL NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references NEVER NULL
+def test tb4 f236 61 NULL YES char 60 60 NULL NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references NEVER NULL
+def test tb4 f237 62 NULL YES char 255 255 NULL NULL NULL latin1 latin1_bin char(255) select,insert,update,references NEVER NULL
+def test tb4 f238 63 NULL YES varchar 0 0 NULL NULL NULL latin1 latin1_bin varchar(0) select,insert,update,references NEVER NULL
+def test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL NULL varbinary(1000) select,insert,update,references NEVER NULL
+def test tb4 f240 65 NULL YES varchar 120 120 NULL NULL NULL latin1 latin1_swedish_ci varchar(120) select,insert,update,references NEVER NULL
+def test tb4 f241 66 NULL YES char 100 100 NULL NULL NULL latin1 latin1_swedish_ci char(100) select,insert,update,references NEVER NULL
+def test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL NULL bit(30) select,insert,update,references NEVER NULL
+def test1 tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test1 tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
+def test1 tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def test1 tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
+def test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
+def test1 tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
+def test1 tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
+def test1 tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
+def test1 tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) select,insert,update,references NEVER NULL
+def test1 tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
+def test1 tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) select,insert,update,references NEVER NULL
+def test1 tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) select,insert,update,references NEVER NULL
+def test1 tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) select,insert,update,references NEVER NULL
+def test1 tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
+def test1 tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) select,insert,update,references NEVER NULL
+def test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
+def test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) select,insert,update,references NEVER NULL
+def test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test1 tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test1 tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references NEVER NULL
+def test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
+def test1 tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned select,insert,update,references NEVER NULL
+def test1 tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
+def test1 tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
+def test4 t6 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references NEVER NULL
+def test4 t6 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
+def test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def test4 t6 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references NEVER NULL
+def test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+1.0000 binary NULL NULL
+1.0000 blob NULL NULL
+1.0000 longblob NULL NULL
+1.0000 mediumblob NULL NULL
+1.0000 tinyblob NULL NULL
+1.0000 varbinary NULL NULL
+1.0000 char latin1 latin1_bin
+1.0000 char latin1 latin1_swedish_ci
+1.0000 enum latin1 latin1_swedish_ci
+1.0000 longtext latin1 latin1_swedish_ci
+1.0000 mediumtext latin1 latin1_swedish_ci
+1.0000 set latin1 latin1_swedish_ci
+1.0000 text latin1 latin1_swedish_ci
+1.0000 tinytext latin1 latin1_swedish_ci
+1.0000 varchar latin1 latin1_swedish_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+NULL bigint NULL NULL
+NULL bit NULL NULL
+NULL date NULL NULL
+NULL datetime NULL NULL
+NULL decimal NULL NULL
+NULL double NULL NULL
+NULL float NULL NULL
+NULL int NULL NULL
+NULL mediumint NULL NULL
+NULL smallint NULL NULL
+NULL time NULL NULL
+NULL timestamp NULL NULL
+NULL tinyint NULL NULL
+NULL year NULL NULL
+NULL varchar latin1 latin1_bin
+--> 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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+1.0000 test t1 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t1 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t1 f3 date NULL NULL NULL NULL date
+NULL test t1 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t1 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t1 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t10 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t10 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t10 f3 date NULL NULL NULL NULL date
+NULL test t10 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t10 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t10 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t11 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t11 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t11 f3 date NULL NULL NULL NULL date
+NULL test t11 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t11 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t11 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t2 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t2 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t2 f3 date NULL NULL NULL NULL date
+NULL test t2 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t2 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t2 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t3 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t3 f2 char 20 20 latin1 latin1_swedish_ci char(20)
+NULL test t3 f3 int NULL NULL NULL NULL int(11)
+1.0000 test t4 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t4 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t4 f3 date NULL NULL NULL NULL date
+NULL test t4 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t4 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t4 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t7 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t7 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t7 f3 date NULL NULL NULL NULL date
+NULL test t7 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t8 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t8 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t8 f3 date NULL NULL NULL NULL date
+NULL test t8 f4 int NULL NULL NULL NULL int(11)
+NULL test t9 f1 int NULL NULL NULL NULL int(11)
+1.0000 test t9 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t9 f3 int NULL NULL NULL NULL int(11)
+1.0000 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1)
+1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb1 f4 tinytext 255 255 latin1 latin1_swedish_ci tinytext
+1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text
+1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
+1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
+1.0000 test tb1 f8 tinyblob 255 255 NULL NULL tinyblob
+1.0000 test tb1 f9 blob 65535 65535 NULL NULL blob
+1.0000 test tb1 f10 mediumblob 16777215 16777215 NULL NULL mediumblob
+1.0000 test tb1 f11 longblob 4294967295 4294967295 NULL NULL longblob
+1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1)
+NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4)
+NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned
+NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6)
+NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned
+NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9)
+NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned
+NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb1 f25 int NULL NULL NULL NULL int(11)
+NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned
+NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20)
+NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb2 f73 double NULL NULL NULL NULL double
+NULL test tb2 f74 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f75 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f76 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f77 double NULL NULL NULL NULL double
+NULL test tb2 f78 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f79 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f80 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f81 float NULL NULL NULL NULL float
+NULL test tb2 f82 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f83 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f84 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f85 float NULL NULL NULL NULL float
+NULL test tb2 f86 float NULL NULL NULL NULL float
+NULL test tb2 f87 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f88 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f89 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f90 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f91 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f92 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f93 float NULL NULL NULL NULL float
+NULL test tb2 f94 double NULL NULL NULL NULL double
+NULL test tb2 f95 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f96 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f97 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f98 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f99 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f100 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f101 date NULL NULL NULL NULL date
+NULL test tb2 f102 time NULL NULL NULL NULL time
+NULL test tb2 f103 datetime NULL NULL NULL NULL datetime
+NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp
+NULL test tb2 f105 year NULL NULL NULL NULL year(4)
+NULL test tb2 f106 year NULL NULL NULL NULL year(4)
+NULL test tb2 f107 year NULL NULL NULL NULL year(4)
+1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test tb2 f110 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb2 f111 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test tb2 f112 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb2 f113 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb2 f114 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb2 f115 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test tb2 f116 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb2 f117 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1)
+1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext
+1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text
+1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
+1.0000 test tb3 f124 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
+1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob
+1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob
+1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob
+1.0000 test tb3 f128 longblob 4294967295 4294967295 NULL NULL longblob
+1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1)
+NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4)
+NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned
+NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6)
+NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned
+NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9)
+NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned
+NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb3 f142 int NULL NULL NULL NULL int(11)
+NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned
+NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20)
+NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb4 f190 double NULL NULL NULL NULL double
+NULL test tb4 f191 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f192 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f193 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f194 double NULL NULL NULL NULL double
+NULL test tb4 f195 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f196 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f197 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f198 float NULL NULL NULL NULL float
+NULL test tb4 f199 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f200 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f201 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f202 float NULL NULL NULL NULL float
+NULL test tb4 f203 float NULL NULL NULL NULL float
+NULL test tb4 f204 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f205 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f206 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f207 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f208 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f209 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f210 float NULL NULL NULL NULL float
+NULL test tb4 f211 double NULL NULL NULL NULL double
+NULL test tb4 f212 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f213 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f214 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f215 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f216 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f217 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f218 date NULL NULL NULL NULL date
+NULL test tb4 f219 time NULL NULL NULL NULL time
+NULL test tb4 f220 datetime NULL NULL NULL NULL datetime
+NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp
+NULL test tb4 f222 year NULL NULL NULL NULL year(4)
+NULL test tb4 f223 year NULL NULL NULL NULL year(4)
+NULL test tb4 f224 year NULL NULL NULL NULL year(4)
+1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test tb4 f227 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb4 f228 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test tb4 f229 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb4 f230 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb4 f231 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb4 f232 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test tb4 f233 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb4 f234 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb4 f235 char 255 255 latin1 latin1_swedish_ci char(255)
+1.0000 test tb4 f236 char 60 60 latin1 latin1_swedish_ci char(60)
+1.0000 test tb4 f237 char 255 255 latin1 latin1_bin char(255)
+NULL test tb4 f238 varchar 0 0 latin1 latin1_bin varchar(0)
+1.0000 test tb4 f239 varbinary 1000 1000 NULL NULL varbinary(1000)
+1.0000 test tb4 f240 varchar 120 120 latin1 latin1_swedish_ci varchar(120)
+1.0000 test tb4 f241 char 100 100 latin1 latin1_swedish_ci char(100)
+NULL test tb4 f242 bit NULL NULL NULL NULL bit(30)
+NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test1 tb2 f73 double NULL NULL NULL NULL double
+NULL test1 tb2 f74 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f75 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f76 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f77 double NULL NULL NULL NULL double
+NULL test1 tb2 f78 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f79 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f80 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f81 float NULL NULL NULL NULL float
+NULL test1 tb2 f82 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f83 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f84 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f85 float NULL NULL NULL NULL float
+NULL test1 tb2 f86 float NULL NULL NULL NULL float
+NULL test1 tb2 f87 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f88 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f89 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f90 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f91 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f92 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f93 float NULL NULL NULL NULL float
+NULL test1 tb2 f94 double NULL NULL NULL NULL double
+NULL test1 tb2 f95 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f96 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f97 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f98 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f99 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f100 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f101 date NULL NULL NULL NULL date
+NULL test1 tb2 f102 time NULL NULL NULL NULL time
+NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime
+NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp
+NULL test1 tb2 f105 year NULL NULL NULL NULL year(4)
+NULL test1 tb2 f106 year NULL NULL NULL NULL year(4)
+NULL test1 tb2 f107 year NULL NULL NULL NULL year(4)
+1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test1 tb2 f110 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test1 tb2 f111 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test1 tb2 f112 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test1 tb2 f113 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test1 tb2 f114 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test1 tb2 f115 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test1 tb2 f116 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test1 tb2 f117 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test4 t6 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test4 t6 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+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)
+DROP DATABASE test1;
+DROP DATABASE test4;
+DROP TABLE test.t1;
+DROP TABLE test.t2;
+DROP TABLE test.t3;
+DROP TABLE test.t4;
+DROP TABLE test.t7;
+DROP TABLE test.t8;
+DROP TABLE test.t9;
+DROP TABLE test.t10;
+DROP TABLE test.t11;
+DROP TABLE test.tb1;
+DROP TABLE test.tb2;
+DROP TABLE test.tb3;
+DROP TABLE test.tb4;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
new file mode 100644
index 00000000..d44732f5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
@@ -0,0 +1,1216 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+USE test;
+drop table if exists tb1 ;
+create table tb1 (
+f1 char,
+f2 char binary,
+f3 char ascii,
+f4 tinytext,
+f5 text,
+f6 mediumtext,
+f7 longtext,
+f8 tinyblob,
+f9 blob,
+f10 mediumblob,
+f11 longblob,
+f12 binary,
+f13 tinyint,
+f14 tinyint unsigned,
+f15 tinyint zerofill,
+f16 tinyint unsigned zerofill,
+f17 smallint,
+f18 smallint unsigned,
+f19 smallint zerofill,
+f20 smallint unsigned zerofill,
+f21 mediumint,
+f22 mediumint unsigned,
+f23 mediumint zerofill,
+f24 mediumint unsigned zerofill,
+f25 int,
+f26 int unsigned,
+f27 int zerofill,
+f28 int unsigned zerofill,
+f29 bigint,
+f30 bigint unsigned,
+f31 bigint zerofill,
+f32 bigint unsigned zerofill,
+f33 decimal not null DEFAULT 9.9,
+f34 decimal unsigned not null DEFAULT 9.9,
+f35 decimal zerofill not null DEFAULT 9.9,
+f36 decimal unsigned zerofill not null DEFAULT 9.9,
+f37 decimal (0) not null DEFAULT 9.9,
+f38 decimal (64) not null DEFAULT 9.9,
+f39 decimal (0) unsigned not null DEFAULT 9.9,
+f40 decimal (64) unsigned not null DEFAULT 9.9,
+f41 decimal (0) zerofill not null DEFAULT 9.9,
+f42 decimal (64) zerofill not null DEFAULT 9.9,
+f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
+f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
+f45 decimal (0,0) not null DEFAULT 9.9,
+f46 decimal (63,30) not null DEFAULT 9.9,
+f47 decimal (0,0) unsigned not null DEFAULT 9.9,
+f48 decimal (63,30) unsigned not null DEFAULT 9.9,
+f49 decimal (0,0) zerofill not null DEFAULT 9.9,
+f50 decimal (63,30) zerofill not null DEFAULT 9.9,
+f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
+f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
+f53 numeric not null DEFAULT 99,
+f54 numeric unsigned not null DEFAULT 99,
+f55 numeric zerofill not null DEFAULT 99,
+f56 numeric unsigned zerofill not null DEFAULT 99,
+f57 numeric (0) not null DEFAULT 99,
+f58 numeric (64) not null DEFAULT 99
+) engine = myisam;
+Warnings:
+Note 1265 Data truncated for column 'f33' at row 0
+Note 1265 Data truncated for column 'f34' at row 0
+Note 1265 Data truncated for column 'f35' at row 0
+Note 1265 Data truncated for column 'f36' at row 0
+Note 1265 Data truncated for column 'f37' at row 0
+Note 1265 Data truncated for column 'f38' at row 0
+Note 1265 Data truncated for column 'f39' at row 0
+Note 1265 Data truncated for column 'f40' at row 0
+Note 1265 Data truncated for column 'f41' at row 0
+Note 1265 Data truncated for column 'f42' at row 0
+Note 1265 Data truncated for column 'f43' at row 0
+Note 1265 Data truncated for column 'f44' at row 0
+Note 1265 Data truncated for column 'f45' at row 0
+Note 1265 Data truncated for column 'f47' at row 0
+Note 1265 Data truncated for column 'f49' at row 0
+Note 1265 Data truncated for column 'f51' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb1.txt'
+into table tb1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set",
+f110 VARBINARY(64) null,
+f111 VARBINARY(27) null ,
+f112 VARBINARY(64) null ,
+f113 VARBINARY(192) null ,
+f114 VARBINARY(192) ,
+f115 VARBINARY(27) null ,
+f116 VARBINARY(64) null,
+f117 VARBINARY(192) null
+) engine = myisam;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
+into table tb2;
+drop table if exists tb3 ;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 tinytext,
+f122 text,
+f123 mediumtext,
+f124 longtext,
+f125 tinyblob,
+f126 blob,
+f127 mediumblob,
+f128 longblob,
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) Engine = myisam;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb3.txt'
+into table tb3;
+drop table if exists tb4 ;
+create table tb4 (
+f176 numeric (0) unsigned not null DEFAULT 9,
+f177 numeric (64) unsigned not null DEFAULT 9,
+f178 numeric (0) zerofill not null DEFAULT 9,
+f179 numeric (64) zerofill not null DEFAULT 9,
+f180 numeric (0) unsigned zerofill not null DEFAULT 9,
+f181 numeric (64) unsigned zerofill not null DEFAULT 9,
+f182 numeric (0,0) not null DEFAULT 9,
+f183 numeric (63,30) not null DEFAULT 9,
+f184 numeric (0,0) unsigned not null DEFAULT 9,
+f185 numeric (63,30) unsigned not null DEFAULT 9,
+f186 numeric (0,0) zerofill not null DEFAULT 9,
+f187 numeric (63,30) zerofill not null DEFAULT 9,
+f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
+f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
+f190 real not null DEFAULT 88.8,
+f191 real unsigned not null DEFAULT 88.8,
+f192 real zerofill not null DEFAULT 88.8,
+f193 real unsigned zerofill not null DEFAULT 88.8,
+f194 double not null DEFAULT 55.5,
+f195 double unsigned not null DEFAULT 55.5,
+f196 double zerofill not null DEFAULT 55.5,
+f197 double unsigned zerofill not null DEFAULT 55.5,
+f198 float,
+f199 float unsigned,
+f200 float zerofill,
+f201 float unsigned zerofill,
+f202 float(0),
+f203 float(23),
+f204 float(0) unsigned,
+f205 float(23) unsigned,
+f206 float(0) zerofill,
+f207 float(23) zerofill,
+f208 float(0) unsigned zerofill,
+f209 float(23) unsigned zerofill,
+f210 float(24),
+f211 float(53),
+f212 float(24) unsigned,
+f213 float(53) unsigned,
+f214 float(24) zerofill,
+f215 float(53) zerofill,
+f216 float(24) unsigned zerofill,
+f217 float(53) unsigned zerofill,
+f218 date,
+f219 time,
+f220 datetime,
+f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+f222 year,
+f223 year(3),
+f224 year(4),
+f225 enum("1enum","2enum"),
+f226 set("1set","2set"),
+f227 VARBINARY(64),
+f228 VARBINARY(27),
+f229 VARBINARY(64),
+f230 VARBINARY(192),
+f231 VARBINARY(192),
+f232 VARBINARY(27),
+f233 VARBINARY(64),
+f234 VARBINARY(192),
+f235 char(255),
+f236 char(60) ascii,
+f237 char(255) binary,
+f238 varchar(0) binary,
+f239 varbinary(1000),
+f240 varchar(120),
+f241 char(100),
+f242 bit(30)
+) engine = myisam;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb4.txt'
+into table tb4;
+USE test1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set",
+f110 VARBINARY(64) null,
+f111 VARBINARY(27) null ,
+f112 VARBINARY(64) null ,
+f113 VARBINARY(192) null ,
+f114 VARBINARY(192) ,
+f115 VARBINARY(27) null ,
+f116 VARBINARY(64) null,
+f117 VARBINARY(192) null
+) engine = myisam;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
+into table tb2;
+USE test;
+USE test;
+DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
+CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+ENGINE = MyISAM;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t1;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t2;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t4;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t10;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t11;
+drop TABLE if exists t3;
+CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' INTO TABLE t3;
+drop database if exists test4;
+CREATE database test4;
+use test4;
+CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
+ENGINE = MyISAM;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' INTO TABLE t6;
+use test;
+drop TABLE if exists t7, t8;
+CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
+CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
+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
+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
+drop TABLE if exists t9;
+CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM;
+LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' INTO TABLE t9;
+SELECT * FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test t1 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t1 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t10 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test t10 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t10 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t11 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test t11 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t11 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t2 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test t2 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t2 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t3 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test t3 f2 2 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t4 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test t4 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t4 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t7 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test t7 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t8 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test t8 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t9 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test tb1 f1 1 NULL YES char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) NEVER NULL
+def test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL NULL mediumblob NEVER NULL
+def test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
+def test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL NULL binary(1) NEVER NULL
+def test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) NEVER NULL
+def test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned NEVER NULL
+def test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill NEVER NULL
+def test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill NEVER NULL
+def test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(6) NEVER NULL
+def test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned NEVER NULL
+def test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill NEVER NULL
+def test tb1 f2 2 NULL YES char 1 1 NULL NULL NULL latin1 latin1_bin char(1) NEVER NULL
+def test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill NEVER NULL
+def test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL NULL mediumint(9) NEVER NULL
+def test tb1 f22 22 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned NEVER NULL
+def test tb1 f23 23 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill NEVER NULL
+def test tb1 f24 24 NULL YES mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill NEVER NULL
+def test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
+def test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill NEVER NULL
+def test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill NEVER NULL
+def test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) NEVER NULL
+def test tb1 f3 3 NULL YES char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) NEVER NULL
+def test tb1 f30 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def test tb1 f31 31 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill NEVER NULL
+def test tb1 f32 32 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill NEVER NULL
+def test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) NEVER NULL
+def test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb1 f4 4 NULL YES tinytext 255 255 NULL NULL NULL latin1 latin1_swedish_ci tinytext NEVER NULL
+def test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned NEVER NULL
+def test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) NEVER NULL
+def test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned NEVER NULL
+def test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb1 f5 5 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text NEVER NULL
+def test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) NEVER NULL
+def test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL NULL latin1 latin1_swedish_ci mediumtext NEVER NULL
+def test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL NULL latin1 latin1_swedish_ci longtext NEVER NULL
+def test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob NEVER NULL
+def test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
+def test tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time NEVER NULL
+def test tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def test tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp NEVER NULL
+def test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
+def test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
+def test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
+def test tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') NEVER NULL
+def test tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') NEVER NULL
+def test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
+def test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) NEVER NULL
+def test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
+def test tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) NEVER NULL
+def test tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) NEVER NULL
+def test tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) NEVER NULL
+def test tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
+def test tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) NEVER NULL
+def test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned NEVER NULL
+def test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) NEVER NULL
+def test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned NEVER NULL
+def test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL NULL double NEVER NULL
+def test tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned NEVER NULL
+def test tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double NEVER NULL
+def test tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned NEVER NULL
+def test tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double NEVER NULL
+def test tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned NEVER NULL
+def test tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb3 f118 1 'a' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) NEVER NULL
+def test tb3 f119 2 '' NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) NEVER NULL
+def test tb3 f120 3 '' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) NEVER NULL
+def test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL NULL latin1 latin1_swedish_ci tinytext NEVER NULL
+def test tb3 f122 5 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text NEVER NULL
+def test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL NULL latin1 latin1_swedish_ci mediumtext NEVER NULL
+def test tb3 f124 7 NULL YES longtext 4294967295 4294967295 NULL NULL NULL latin1 latin1_swedish_ci longtext NEVER NULL
+def test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob NEVER NULL
+def test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
+def test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL NULL mediumblob NEVER NULL
+def test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
+def test tb3 f129 12 '' NO binary 1 1 NULL NULL NULL NULL NULL binary(1) NEVER NULL
+def test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) NEVER NULL
+def test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned NEVER NULL
+def test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill NEVER NULL
+def test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill NEVER NULL
+def test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(6) NEVER NULL
+def test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned NEVER NULL
+def test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill NEVER NULL
+def test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned zerofill NEVER NULL
+def test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL NULL mediumint(9) NEVER NULL
+def test tb3 f139 22 9999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned NEVER NULL
+def test tb3 f140 23 00009999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill NEVER NULL
+def test tb3 f141 24 00009999 NO mediumint NULL NULL 8 0 NULL NULL NULL mediumint(8) unsigned zerofill NEVER NULL
+def test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
+def test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill NEVER NULL
+def test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned zerofill NEVER NULL
+def test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) NEVER NULL
+def test tb3 f147 30 999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill NEVER NULL
+def test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned zerofill NEVER NULL
+def test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) NEVER NULL
+def test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned NEVER NULL
+def test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) NEVER NULL
+def test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned NEVER NULL
+def test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) NEVER NULL
+def test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned NEVER NULL
+def test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) NEVER NULL
+def test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned NEVER NULL
+def test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL NULL double NEVER NULL
+def test tb4 f191 16 88.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned NEVER NULL
+def test tb4 f192 17 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb4 f193 18 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL NULL double NEVER NULL
+def test tb4 f195 20 55.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned NEVER NULL
+def test tb4 f196 21 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb4 f197 22 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test tb4 f199 24 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test tb4 f200 25 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb4 f201 26 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test tb4 f204 29 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test tb4 f205 30 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test tb4 f206 31 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb4 f207 32 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb4 f208 33 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb4 f209 34 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL NULL double NEVER NULL
+def test tb4 f212 37 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test tb4 f213 38 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned NEVER NULL
+def test tb4 f214 39 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb4 f215 40 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb4 f216 41 NULL YES float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test tb4 f217 42 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test tb4 f219 44 NULL YES time NULL NULL NULL NULL 0 NULL NULL time NEVER NULL
+def test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def test tb4 f221 46 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL
+def test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
+def test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
+def test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
+def test tb4 f225 50 NULL YES enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') NEVER NULL
+def test tb4 f226 51 NULL YES set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') NEVER NULL
+def test tb4 f227 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
+def test tb4 f228 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) NEVER NULL
+def test tb4 f229 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
+def test tb4 f230 55 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) NEVER NULL
+def test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) NEVER NULL
+def test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) NEVER NULL
+def test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
+def test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) NEVER NULL
+def test tb4 f235 60 NULL YES char 255 255 NULL NULL NULL latin1 latin1_swedish_ci char(255) NEVER NULL
+def test tb4 f236 61 NULL YES char 60 60 NULL NULL NULL latin1 latin1_swedish_ci char(60) NEVER NULL
+def test tb4 f237 62 NULL YES char 255 255 NULL NULL NULL latin1 latin1_bin char(255) NEVER NULL
+def test tb4 f238 63 NULL YES varchar 0 0 NULL NULL NULL latin1 latin1_bin varchar(0) NEVER NULL
+def test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL NULL varbinary(1000) NEVER NULL
+def test tb4 f240 65 NULL YES varchar 120 120 NULL NULL NULL latin1 latin1_swedish_ci varchar(120) NEVER NULL
+def test tb4 f241 66 NULL YES char 100 100 NULL NULL NULL latin1 latin1_swedish_ci char(100) NEVER NULL
+def test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL NULL bit(30) NEVER NULL
+def test1 tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test1 tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test1 tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time NEVER NULL
+def test1 tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def test1 tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp NEVER NULL
+def test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
+def test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
+def test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
+def test1 tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') NEVER NULL
+def test1 tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') NEVER NULL
+def test1 tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
+def test1 tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) NEVER NULL
+def test1 tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
+def test1 tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) NEVER NULL
+def test1 tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) NEVER NULL
+def test1 tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) NEVER NULL
+def test1 tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
+def test1 tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL NULL varbinary(192) NEVER NULL
+def test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned NEVER NULL
+def test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned zerofill NEVER NULL
+def test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) NEVER NULL
+def test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) NEVER NULL
+def test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned NEVER NULL
+def test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned NEVER NULL
+def test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill NEVER NULL
+def test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL NULL decimal(63,30) unsigned zerofill NEVER NULL
+def test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL NULL double NEVER NULL
+def test1 tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned NEVER NULL
+def test1 tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test1 tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double NEVER NULL
+def test1 tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned NEVER NULL
+def test1 tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test1 tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test1 tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test1 tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test1 tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test1 tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test1 tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test1 tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test1 tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test1 tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test1 tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float NEVER NULL
+def test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double NEVER NULL
+def test1 tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned NEVER NULL
+def test1 tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned NEVER NULL
+def test1 tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test1 tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
+def test1 tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
+def test4 t6 f1 1 NULL YES char 20 20 NULL NULL NULL latin1 latin1_swedish_ci char(20) NEVER NULL
+def test4 t6 f2 2 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
+def test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test4 t6 f5 5 NULL YES char 25 25 NULL NULL NULL latin1 latin1_swedish_ci char(25) NEVER NULL
+def test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+1.0000 binary NULL NULL
+1.0000 blob NULL NULL
+1.0000 longblob NULL NULL
+1.0000 mediumblob NULL NULL
+1.0000 tinyblob NULL NULL
+1.0000 varbinary NULL NULL
+1.0000 char latin1 latin1_bin
+1.0000 char latin1 latin1_swedish_ci
+1.0000 enum latin1 latin1_swedish_ci
+1.0000 longtext latin1 latin1_swedish_ci
+1.0000 mediumtext latin1 latin1_swedish_ci
+1.0000 set latin1 latin1_swedish_ci
+1.0000 text latin1 latin1_swedish_ci
+1.0000 tinytext latin1 latin1_swedish_ci
+1.0000 varchar latin1 latin1_swedish_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+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
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+NULL bigint NULL NULL
+NULL bit NULL NULL
+NULL date NULL NULL
+NULL datetime NULL NULL
+NULL decimal NULL NULL
+NULL double NULL NULL
+NULL float NULL NULL
+NULL int NULL NULL
+NULL mediumint NULL NULL
+NULL smallint NULL NULL
+NULL time NULL NULL
+NULL timestamp NULL NULL
+NULL tinyint NULL NULL
+NULL year NULL NULL
+NULL varchar latin1 latin1_bin
+--> 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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema LIKE 'test%'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+1.0000 test t1 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t1 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t1 f3 date NULL NULL NULL NULL date
+NULL test t1 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t1 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t1 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t10 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t10 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t10 f3 date NULL NULL NULL NULL date
+NULL test t10 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t10 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t10 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t11 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t11 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t11 f3 date NULL NULL NULL NULL date
+NULL test t11 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t11 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t11 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t2 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t2 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t2 f3 date NULL NULL NULL NULL date
+NULL test t2 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t2 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t2 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t3 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t3 f2 char 20 20 latin1 latin1_swedish_ci char(20)
+NULL test t3 f3 int NULL NULL NULL NULL int(11)
+1.0000 test t4 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t4 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t4 f3 date NULL NULL NULL NULL date
+NULL test t4 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t4 f5 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t4 f6 int NULL NULL NULL NULL int(11)
+1.0000 test t7 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t7 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t7 f3 date NULL NULL NULL NULL date
+NULL test t7 f4 int NULL NULL NULL NULL int(11)
+1.0000 test t8 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test t8 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t8 f3 date NULL NULL NULL NULL date
+NULL test t8 f4 int NULL NULL NULL NULL int(11)
+NULL test t9 f1 int NULL NULL NULL NULL int(11)
+1.0000 test t9 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+NULL test t9 f3 int NULL NULL NULL NULL int(11)
+1.0000 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1)
+1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb1 f4 tinytext 255 255 latin1 latin1_swedish_ci tinytext
+1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text
+1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
+1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
+1.0000 test tb1 f8 tinyblob 255 255 NULL NULL tinyblob
+1.0000 test tb1 f9 blob 65535 65535 NULL NULL blob
+1.0000 test tb1 f10 mediumblob 16777215 16777215 NULL NULL mediumblob
+1.0000 test tb1 f11 longblob 4294967295 4294967295 NULL NULL longblob
+1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1)
+NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4)
+NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned
+NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6)
+NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned
+NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9)
+NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned
+NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb1 f25 int NULL NULL NULL NULL int(11)
+NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned
+NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20)
+NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb2 f73 double NULL NULL NULL NULL double
+NULL test tb2 f74 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f75 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f76 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f77 double NULL NULL NULL NULL double
+NULL test tb2 f78 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f79 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f80 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f81 float NULL NULL NULL NULL float
+NULL test tb2 f82 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f83 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f84 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f85 float NULL NULL NULL NULL float
+NULL test tb2 f86 float NULL NULL NULL NULL float
+NULL test tb2 f87 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f88 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f89 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f90 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f91 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f92 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f93 float NULL NULL NULL NULL float
+NULL test tb2 f94 double NULL NULL NULL NULL double
+NULL test tb2 f95 float NULL NULL NULL NULL float unsigned
+NULL test tb2 f96 double NULL NULL NULL NULL double unsigned
+NULL test tb2 f97 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f98 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f99 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb2 f100 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb2 f101 date NULL NULL NULL NULL date
+NULL test tb2 f102 time NULL NULL NULL NULL time
+NULL test tb2 f103 datetime NULL NULL NULL NULL datetime
+NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp
+NULL test tb2 f105 year NULL NULL NULL NULL year(4)
+NULL test tb2 f106 year NULL NULL NULL NULL year(4)
+NULL test tb2 f107 year NULL NULL NULL NULL year(4)
+1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test tb2 f110 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb2 f111 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test tb2 f112 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb2 f113 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb2 f114 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb2 f115 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test tb2 f116 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb2 f117 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1)
+1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1)
+1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext
+1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text
+1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
+1.0000 test tb3 f124 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
+1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob
+1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob
+1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob
+1.0000 test tb3 f128 longblob 4294967295 4294967295 NULL NULL longblob
+1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1)
+NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4)
+NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned
+NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill
+NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6)
+NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned
+NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill
+NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9)
+NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned
+NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill
+NULL test tb3 f142 int NULL NULL NULL NULL int(11)
+NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned
+NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill
+NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20)
+NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill
+NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0)
+NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test tb4 f190 double NULL NULL NULL NULL double
+NULL test tb4 f191 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f192 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f193 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f194 double NULL NULL NULL NULL double
+NULL test tb4 f195 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f196 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f197 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f198 float NULL NULL NULL NULL float
+NULL test tb4 f199 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f200 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f201 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f202 float NULL NULL NULL NULL float
+NULL test tb4 f203 float NULL NULL NULL NULL float
+NULL test tb4 f204 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f205 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f206 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f207 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f208 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f209 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f210 float NULL NULL NULL NULL float
+NULL test tb4 f211 double NULL NULL NULL NULL double
+NULL test tb4 f212 float NULL NULL NULL NULL float unsigned
+NULL test tb4 f213 double NULL NULL NULL NULL double unsigned
+NULL test tb4 f214 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f215 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f216 float NULL NULL NULL NULL float unsigned zerofill
+NULL test tb4 f217 double NULL NULL NULL NULL double unsigned zerofill
+NULL test tb4 f218 date NULL NULL NULL NULL date
+NULL test tb4 f219 time NULL NULL NULL NULL time
+NULL test tb4 f220 datetime NULL NULL NULL NULL datetime
+NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp
+NULL test tb4 f222 year NULL NULL NULL NULL year(4)
+NULL test tb4 f223 year NULL NULL NULL NULL year(4)
+NULL test tb4 f224 year NULL NULL NULL NULL year(4)
+1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test tb4 f227 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb4 f228 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test tb4 f229 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb4 f230 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb4 f231 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb4 f232 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test tb4 f233 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test tb4 f234 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test tb4 f235 char 255 255 latin1 latin1_swedish_ci char(255)
+1.0000 test tb4 f236 char 60 60 latin1 latin1_swedish_ci char(60)
+1.0000 test tb4 f237 char 255 255 latin1 latin1_bin char(255)
+NULL test tb4 f238 varchar 0 0 latin1 latin1_bin varchar(0)
+1.0000 test tb4 f239 varbinary 1000 1000 NULL NULL varbinary(1000)
+1.0000 test tb4 f240 varchar 120 120 latin1 latin1_swedish_ci varchar(120)
+1.0000 test tb4 f241 char 100 100 latin1 latin1_swedish_ci char(100)
+NULL test tb4 f242 bit NULL NULL NULL NULL bit(30)
+NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
+NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill
+NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0)
+NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30)
+NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned
+NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned
+NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
+NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill
+NULL test1 tb2 f73 double NULL NULL NULL NULL double
+NULL test1 tb2 f74 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f75 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f76 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f77 double NULL NULL NULL NULL double
+NULL test1 tb2 f78 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f79 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f80 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f81 float NULL NULL NULL NULL float
+NULL test1 tb2 f82 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f83 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f84 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f85 float NULL NULL NULL NULL float
+NULL test1 tb2 f86 float NULL NULL NULL NULL float
+NULL test1 tb2 f87 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f88 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f89 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f90 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f91 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f92 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f93 float NULL NULL NULL NULL float
+NULL test1 tb2 f94 double NULL NULL NULL NULL double
+NULL test1 tb2 f95 float NULL NULL NULL NULL float unsigned
+NULL test1 tb2 f96 double NULL NULL NULL NULL double unsigned
+NULL test1 tb2 f97 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f98 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f99 float NULL NULL NULL NULL float unsigned zerofill
+NULL test1 tb2 f100 double NULL NULL NULL NULL double unsigned zerofill
+NULL test1 tb2 f101 date NULL NULL NULL NULL date
+NULL test1 tb2 f102 time NULL NULL NULL NULL time
+NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime
+NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp
+NULL test1 tb2 f105 year NULL NULL NULL NULL year(4)
+NULL test1 tb2 f106 year NULL NULL NULL NULL year(4)
+NULL test1 tb2 f107 year NULL NULL NULL NULL year(4)
+1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
+1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
+1.0000 test1 tb2 f110 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test1 tb2 f111 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test1 tb2 f112 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test1 tb2 f113 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test1 tb2 f114 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test1 tb2 f115 varbinary 27 27 NULL NULL varbinary(27)
+1.0000 test1 tb2 f116 varbinary 64 64 NULL NULL varbinary(64)
+1.0000 test1 tb2 f117 varbinary 192 192 NULL NULL varbinary(192)
+1.0000 test4 t6 f1 char 20 20 latin1 latin1_swedish_ci char(20)
+1.0000 test4 t6 f2 char 25 25 latin1 latin1_swedish_ci char(25)
+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)
+DROP DATABASE test1;
+DROP DATABASE test4;
+DROP TABLE test.t1;
+DROP TABLE test.t2;
+DROP TABLE test.t3;
+DROP TABLE test.t4;
+DROP TABLE test.t7;
+DROP TABLE test.t8;
+DROP TABLE test.t9;
+DROP TABLE test.t10;
+DROP TABLE test.t11;
+DROP TABLE test.tb1;
+DROP TABLE test.tb2;
+DROP TABLE test.tb3;
+DROP TABLE test.tb4;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
new file mode 100644
index 00000000..154eaef5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
@@ -0,0 +1,585 @@
+SELECT * FROM information_schema.columns
+WHERE table_schema = 'mysql'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def mysql columns_priv Column_name 5 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql columns_priv Column_priv 7 '' NO set 31 93 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','References') select,insert,update,references NEVER NULL
+def mysql columns_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql columns_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI select,insert,update,references NEVER NULL
+def mysql columns_priv Table_name 4 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql columns_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def mysql columns_priv User 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI select,insert,update,references NEVER NULL
+def mysql column_stats avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL
+def mysql column_stats avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL
+def mysql column_stats column_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql column_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql column_stats histogram 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def mysql column_stats hist_size 9 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
+def mysql column_stats hist_type 10 NULL YES enum 14 42 NULL NULL NULL utf8mb3 utf8mb3_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB') select,insert,update,references NEVER NULL
+def mysql column_stats max_value 5 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) select,insert,update,references NEVER NULL
+def mysql column_stats min_value 4 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) select,insert,update,references NEVER NULL
+def mysql column_stats nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL
+def mysql column_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql db Alter_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Alter_routine_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Create_routine_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Create_tmp_table_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Create_view_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Db 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql db Delete_history_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Event_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Execute_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Grant_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI select,insert,update,references NEVER NULL
+def mysql db Index_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Lock_tables_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db References_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Show_view_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Trigger_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql db User 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI select,insert,update,references NEVER NULL
+def mysql event body 3 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def mysql event body_utf8 22 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def mysql event character_set_client 19 NULL YES char 32 96 NULL NULL NULL utf8mb3 utf8mb3_bin char(32) select,insert,update,references NEVER NULL
+def mysql event collation_connection 20 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) select,insert,update,references NEVER NULL
+def mysql event comment 16 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) select,insert,update,references NEVER NULL
+def mysql event created 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def mysql event db 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql event db_collation 21 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) select,insert,update,references NEVER NULL
+def mysql event definer 4 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) select,insert,update,references NEVER NULL
+def mysql event ends 12 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def mysql event interval_field 7 NULL YES enum 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references NEVER NULL
+def mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def mysql event modified 9 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
+def mysql event name 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI select,insert,update,references NEVER NULL
+def mysql event on_completion 14 'DROP' NO enum 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('DROP','PRESERVE') select,insert,update,references NEVER NULL
+def mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def mysql event sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') select,insert,update,references NEVER NULL
+def mysql event starts 11 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
+def mysql event status 13 'ENABLED' NO enum 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NEVER NULL
+def mysql event time_zone 18 'SYSTEM' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NEVER NULL
+def mysql func dl 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) select,insert,update,references NEVER NULL
+def mysql func name 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select,insert,update,references NEVER NULL
+def mysql func type 4 NULL NO enum 9 27 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('function','aggregate') select,insert,update,references NEVER NULL
+def mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8mb3 utf8mb3_general_ci mediumtext select,insert,update,references NEVER NULL
+def mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select,insert,update,references NEVER NULL
+def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update current_timestamp(6) select,insert,update,references NEVER NULL
+def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL
+def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8mb3 utf8mb3_general_ci mediumtext select,insert,update,references NEVER NULL
+def mysql global_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI select,insert,update,references NEVER NULL
+def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql global_priv User 2 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI select,insert,update,references NEVER NULL
+def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
+def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def mysql gtid_slave_pos sub_id 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references NEVER NULL
+def mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned PRI select,insert,update,references NEVER NULL
+def mysql help_category name 2 NULL NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) UNI select,insert,update,references NEVER NULL
+def mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references NEVER NULL
+def mysql help_category url 4 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_general_ci text select,insert,update,references NEVER NULL
+def mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
+def mysql help_keyword name 2 NULL NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) UNI select,insert,update,references NEVER NULL
+def mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
+def mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
+def mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_general_ci text select,insert,update,references NEVER NULL
+def mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_general_ci text select,insert,update,references NEVER NULL
+def mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references NEVER NULL
+def mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
+def mysql help_topic name 2 NULL NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) UNI select,insert,update,references NEVER NULL
+def mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_general_ci text select,insert,update,references NEVER NULL
+def mysql index_stats avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL
+def mysql index_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql index_stats prefix_arity 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned PRI select,insert,update,references NEVER NULL
+def mysql index_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql innodb_index_stats database_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql innodb_index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql innodb_index_stats last_update 4 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def mysql innodb_index_stats sample_size 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql innodb_index_stats stat_description 8 NULL NO varchar 1024 3072 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(1024) select,insert,update,references NEVER NULL
+def mysql innodb_index_stats stat_name 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql innodb_index_stats stat_value 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql innodb_index_stats table_name 2 NULL NO varchar 199 597 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(199) PRI select,insert,update,references NEVER NULL
+def mysql innodb_table_stats clustered_index_size 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql innodb_table_stats database_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql innodb_table_stats last_update 3 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def mysql innodb_table_stats n_rows 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql innodb_table_stats sum_of_other_index_sizes 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql innodb_table_stats table_name 2 NULL NO varchar 199 597 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(199) PRI select,insert,update,references NEVER NULL
+def mysql plugin dl 2 '' NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) select,insert,update,references NEVER NULL
+def mysql plugin name 1 '' NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql proc aggregate 21 'NONE' NO enum 5 15 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('NONE','GROUP') select,insert,update,references NEVER NULL
+def mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def mysql proc body_utf8 20 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def mysql proc character_set_client 17 NULL YES char 32 96 NULL NULL NULL utf8mb3 utf8mb3_bin char(32) select,insert,update,references NEVER NULL
+def mysql proc collation_connection 18 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) select,insert,update,references NEVER NULL
+def mysql proc comment 16 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_bin text select,insert,update,references NEVER NULL
+def mysql proc created 13 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def mysql proc db 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql proc db_collation 19 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) select,insert,update,references NEVER NULL
+def mysql proc definer 12 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) select,insert,update,references NEVER NULL
+def mysql proc is_deterministic 7 'NO' NO enum 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
+def mysql proc language 5 'SQL' NO enum 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('SQL') select,insert,update,references NEVER NULL
+def mysql proc modified 14 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
+def mysql proc name 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI select,insert,update,references NEVER NULL
+def mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
+def mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+def mysql proc security_type 8 'DEFINER' NO enum 7 21 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('INVOKER','DEFINER') select,insert,update,references NEVER NULL
+def mysql proc specific_name 4 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) select,insert,update,references NEVER NULL
+def mysql proc sql_data_access 6 'CONTAINS_SQL' NO enum 17 51 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NEVER NULL
+def mysql proc sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') select,insert,update,references NEVER NULL
+def mysql proc type 3 NULL NO enum 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI select,insert,update,references NEVER NULL
+def mysql procs_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql procs_priv Grantor 6 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) MUL select,insert,update,references NEVER NULL
+def mysql procs_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI select,insert,update,references NEVER NULL
+def mysql procs_priv Proc_priv 7 '' NO set 27 81 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references NEVER NULL
+def mysql procs_priv Routine_name 4 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI select,insert,update,references NEVER NULL
+def mysql procs_priv Routine_type 5 NULL NO enum 12 36 NULL NULL NULL utf8mb3 utf8mb3_bin enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI select,insert,update,references NEVER NULL
+def mysql procs_priv Timestamp 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def mysql procs_priv User 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI select,insert,update,references NEVER NULL
+def mysql proxies_priv Grantor 6 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) MUL select,insert,update,references NEVER NULL
+def mysql proxies_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI select,insert,update,references NEVER NULL
+def mysql proxies_priv Proxied_host 3 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI select,insert,update,references NEVER NULL
+def mysql proxies_priv Proxied_user 4 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI select,insert,update,references NEVER NULL
+def mysql proxies_priv Timestamp 7 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def mysql proxies_priv User 2 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI select,insert,update,references NEVER NULL
+def mysql proxies_priv With_grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select,insert,update,references NEVER NULL
+def mysql roles_mapping Admin_option 4 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') select,insert,update,references NEVER NULL
+def mysql roles_mapping Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI select,insert,update,references NEVER NULL
+def mysql roles_mapping Role 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI select,insert,update,references NEVER NULL
+def mysql roles_mapping User 2 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI select,insert,update,references NEVER NULL
+def mysql servers Db 3 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) select,insert,update,references NEVER NULL
+def mysql servers Host 2 '' NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select,insert,update,references NEVER NULL
+def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select,insert,update,references NEVER NULL
+def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) select,insert,update,references NEVER NULL
+def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) select,insert,update,references NEVER NULL
+def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI select,insert,update,references NEVER NULL
+def mysql servers Socket 7 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) select,insert,update,references NEVER NULL
+def mysql servers Username 4 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(128) select,insert,update,references NEVER NULL
+def mysql servers Wrapper 8 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) select,insert,update,references NEVER NULL
+def mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select,insert,update,references NEVER NULL
+def mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL 6 NULL NULL time(6) select,insert,update,references NEVER NULL
+def mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL 6 NULL NULL time(6) select,insert,update,references NEVER NULL
+def mysql slow_log rows_affected 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql slow_log rows_examined 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql slow_log rows_sent 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8mb3 utf8mb3_general_ci mediumtext select,insert,update,references NEVER NULL
+def mysql slow_log start_time 1 current_timestamp(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update current_timestamp(6) select,insert,update,references NEVER NULL
+def mysql slow_log thread_id 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL
+def mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8mb3 utf8mb3_general_ci mediumtext select,insert,update,references NEVER NULL
+def mysql tables_priv Column_priv 8 '' NO set 31 93 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','References') select,insert,update,references NEVER NULL
+def mysql tables_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql tables_priv Grantor 5 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) MUL select,insert,update,references NEVER NULL
+def mysql tables_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI select,insert,update,references NEVER NULL
+def mysql tables_priv Table_name 4 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI select,insert,update,references NEVER NULL
+def mysql tables_priv Table_priv 7 '' NO set 121 363 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') select,insert,update,references NEVER NULL
+def mysql tables_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def mysql tables_priv User 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI select,insert,update,references NEVER NULL
+def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL
+def mysql table_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql table_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
+def mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references NEVER NULL
+def mysql time_zone Use_leap_seconds 2 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('Y','N') select,insert,update,references NEVER NULL
+def mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) PRI select,insert,update,references NEVER NULL
+def mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI select,insert,update,references NEVER NULL
+def mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
+def mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) PRI select,insert,update,references NEVER NULL
+def mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def mysql time_zone_transition_type Abbreviation 5 '' NO char 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(8) select,insert,update,references NEVER NULL
+def mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
+def mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
+def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
+def mysql transaction_registry begin_timestamp 3 '0000-00-00 00:00:00.000000' NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) MUL select,insert,update,references NEVER NULL
+def mysql transaction_registry commit_id 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned UNI select,insert,update,references NEVER NULL
+def mysql transaction_registry commit_timestamp 4 '0000-00-00 00:00:00.000000' NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) MUL select,insert,update,references NEVER NULL
+def mysql transaction_registry isolation_level 5 NULL NO enum 16 48 NULL NULL NULL utf8mb3 utf8mb3_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') select,insert,update,references NEVER NULL
+def mysql transaction_registry transaction_id 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references NEVER NULL
+def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) select,insert,update,references NEVER NULL
+def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) select,insert,update,references NEVER NULL
+def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select,insert,update,references NEVER NULL
+def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) select,insert,update,references NEVER NULL
+def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user User 2 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) select,insert,update,references NEVER NULL
+def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'mysql'
+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
+1.0000 blob NULL NULL
+1.0000 longblob NULL NULL
+1.0000 varbinary NULL NULL
+1.0000 char latin1 latin1_swedish_ci
+1.0000 varchar latin1 latin1_swedish_ci
+1.0000 text utf8mb3 utf8mb3_bin
+1.0000 mediumtext utf8mb3 utf8mb3_general_ci
+1.0000 text utf8mb3 utf8mb3_general_ci
+1.0000 longtext utf8mb4 utf8mb4_bin
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'mysql'
+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
+3.0000 char utf8mb3 utf8mb3_bin
+3.0000 enum utf8mb3 utf8mb3_bin
+3.0000 varchar utf8mb3 utf8mb3_bin
+3.0000 char utf8mb3 utf8mb3_general_ci
+3.0000 enum utf8mb3 utf8mb3_general_ci
+3.0000 set utf8mb3 utf8mb3_general_ci
+3.0000 varchar utf8mb3 utf8mb3_general_ci
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'mysql'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+NULL bigint NULL NULL
+NULL datetime NULL NULL
+NULL decimal NULL NULL
+NULL int NULL NULL
+NULL smallint NULL NULL
+NULL time NULL NULL
+NULL timestamp NULL NULL
+NULL tinyint NULL NULL
+--> 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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema = 'mysql'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+3.0000 mysql columns_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql columns_priv Db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql columns_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql columns_priv Table_name char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql columns_priv Column_name char 64 192 utf8mb3 utf8mb3_bin char(64)
+NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql columns_priv Column_priv set 31 93 utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','References')
+3.0000 mysql column_stats db_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql column_stats table_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql column_stats column_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+1.0000 mysql column_stats min_value varbinary 255 255 NULL NULL varbinary(255)
+1.0000 mysql column_stats max_value varbinary 255 255 NULL NULL varbinary(255)
+NULL mysql column_stats nulls_ratio decimal NULL NULL NULL NULL decimal(12,4)
+NULL mysql column_stats avg_length decimal NULL NULL NULL NULL decimal(12,4)
+NULL mysql column_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
+NULL mysql column_stats hist_size tinyint NULL NULL NULL NULL tinyint(3) unsigned
+3.0000 mysql column_stats hist_type enum 14 42 utf8mb3 utf8mb3_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB')
+1.0000 mysql column_stats histogram longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql db Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql db Db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql db User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql db Select_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Insert_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Update_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Delete_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Create_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Drop_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Grant_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db References_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Index_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Alter_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Create_tmp_table_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Lock_tables_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Create_view_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Show_view_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Create_routine_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Alter_routine_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Execute_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Event_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Trigger_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Delete_history_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql event db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql event name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+1.0000 mysql event body longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql event definer varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+NULL mysql event execute_at datetime NULL NULL NULL NULL datetime
+NULL mysql event interval_value int NULL NULL NULL NULL int(11)
+3.0000 mysql event interval_field enum 18 54 utf8mb3 utf8mb3_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND')
+NULL mysql event created timestamp NULL NULL NULL NULL timestamp
+NULL mysql event modified timestamp NULL NULL NULL NULL timestamp
+NULL mysql event last_executed datetime NULL NULL NULL NULL datetime
+NULL mysql event starts datetime NULL NULL NULL NULL datetime
+NULL mysql event ends datetime NULL NULL NULL NULL datetime
+3.0000 mysql event status enum 18 54 utf8mb3 utf8mb3_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
+3.0000 mysql event on_completion enum 8 24 utf8mb3 utf8mb3_general_ci enum('DROP','PRESERVE')
+3.0000 mysql event sql_mode set 561 1683 utf8mb3 utf8mb3_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
+3.0000 mysql event comment char 64 192 utf8mb3 utf8mb3_bin char(64)
+NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
+1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
+3.0000 mysql event character_set_client char 32 96 utf8mb3 utf8mb3_bin char(32)
+3.0000 mysql event collation_connection char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql event db_collation char 64 192 utf8mb3 utf8mb3_bin char(64)
+1.0000 mysql event body_utf8 longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql func name char 64 192 utf8mb3 utf8mb3_bin char(64)
+NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1)
+3.0000 mysql func dl char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql func type enum 9 27 utf8mb3 utf8mb3_general_ci enum('function','aggregate')
+NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp(6)
+1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8mb3 utf8mb3_general_ci mediumtext
+NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
+3.0000 mysql general_log command_type varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8mb3 utf8mb3_general_ci mediumtext
+3.0000 mysql global_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql global_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql gtid_slave_pos seq_no bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
+3.0000 mysql help_category name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
+1.0000 mysql help_category url text 65535 65535 utf8mb3 utf8mb3_general_ci text
+NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned
+3.0000 mysql help_keyword name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql help_relation help_keyword_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned
+3.0000 mysql help_topic name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
+1.0000 mysql help_topic description text 65535 65535 utf8mb3 utf8mb3_general_ci text
+1.0000 mysql help_topic example text 65535 65535 utf8mb3 utf8mb3_general_ci text
+1.0000 mysql help_topic url text 65535 65535 utf8mb3 utf8mb3_general_ci text
+3.0000 mysql index_stats db_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql index_stats table_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql index_stats index_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+NULL mysql index_stats prefix_arity int NULL NULL NULL NULL int(11) unsigned
+NULL mysql index_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
+3.0000 mysql innodb_index_stats database_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql innodb_index_stats table_name varchar 199 597 utf8mb3 utf8mb3_bin varchar(199)
+3.0000 mysql innodb_index_stats index_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+NULL mysql innodb_index_stats last_update timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql innodb_index_stats stat_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+NULL mysql innodb_index_stats stat_value bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql innodb_index_stats sample_size bigint NULL NULL NULL NULL bigint(20) unsigned
+3.0000 mysql innodb_index_stats stat_description varchar 1024 3072 utf8mb3 utf8mb3_bin varchar(1024)
+3.0000 mysql innodb_table_stats database_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql innodb_table_stats table_name varchar 199 597 utf8mb3 utf8mb3_bin varchar(199)
+NULL mysql innodb_table_stats last_update timestamp NULL NULL NULL NULL timestamp
+NULL mysql innodb_table_stats n_rows bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql innodb_table_stats clustered_index_size bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql innodb_table_stats sum_of_other_index_sizes bigint NULL NULL NULL NULL bigint(20) unsigned
+3.0000 mysql plugin name varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 mysql plugin dl varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+3.0000 mysql proc db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql proc name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql proc type enum 12 36 utf8mb3 utf8mb3_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY')
+3.0000 mysql proc specific_name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql proc language enum 3 9 utf8mb3 utf8mb3_general_ci enum('SQL')
+3.0000 mysql proc sql_data_access enum 17 51 utf8mb3 utf8mb3_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA')
+3.0000 mysql proc is_deterministic enum 3 9 utf8mb3 utf8mb3_general_ci enum('YES','NO')
+3.0000 mysql proc security_type enum 7 21 utf8mb3 utf8mb3_general_ci enum('INVOKER','DEFINER')
+1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob
+1.0000 mysql proc returns longblob 4294967295 4294967295 NULL NULL longblob
+1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql proc definer varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
+NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql proc sql_mode set 561 1683 utf8mb3 utf8mb3_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
+1.0000 mysql proc comment text 65535 65535 utf8mb3 utf8mb3_bin text
+3.0000 mysql proc character_set_client char 32 96 utf8mb3 utf8mb3_bin char(32)
+3.0000 mysql proc collation_connection char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql proc db_collation char 64 192 utf8mb3 utf8mb3_bin char(64)
+1.0000 mysql proc body_utf8 longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql proc aggregate enum 5 15 utf8mb3 utf8mb3_general_ci enum('NONE','GROUP')
+3.0000 mysql procs_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql procs_priv Db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql procs_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql procs_priv Routine_name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql procs_priv Routine_type enum 12 36 utf8mb3 utf8mb3_bin enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY')
+3.0000 mysql procs_priv Grantor varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+3.0000 mysql procs_priv Proc_priv set 27 81 utf8mb3 utf8mb3_general_ci set('Execute','Alter Routine','Grant')
+NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql proxies_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql proxies_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql proxies_priv Proxied_host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql proxies_priv Proxied_user char 128 384 utf8mb3 utf8mb3_bin char(128)
+NULL mysql proxies_priv With_grant tinyint NULL NULL NULL NULL tinyint(1)
+3.0000 mysql proxies_priv Grantor varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql roles_mapping Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql roles_mapping User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql roles_mapping Role char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql roles_mapping Admin_option enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql servers Server_name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql servers Host varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 mysql servers Db char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql servers Username char 128 384 utf8mb3 utf8mb3_general_ci char(128)
+3.0000 mysql servers Password char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql servers Port int NULL NULL NULL NULL int(4)
+3.0000 mysql servers Socket char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql servers Wrapper char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql servers Owner varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6)
+1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8mb3 utf8mb3_general_ci mediumtext
+NULL mysql slow_log query_time time NULL NULL NULL NULL time(6)
+NULL mysql slow_log lock_time time NULL NULL NULL NULL time(6)
+NULL mysql slow_log rows_sent bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql slow_log rows_examined bigint NULL NULL NULL NULL bigint(20) unsigned
+3.0000 mysql slow_log db varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+NULL mysql slow_log last_insert_id int NULL NULL NULL NULL int(11)
+NULL mysql slow_log insert_id int NULL NULL NULL NULL int(11)
+NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned
+1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8mb3 utf8mb3_general_ci mediumtext
+NULL mysql slow_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL mysql slow_log rows_affected bigint NULL NULL NULL NULL bigint(20) unsigned
+3.0000 mysql tables_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql tables_priv Db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql tables_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql tables_priv Table_name char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql tables_priv Grantor varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql tables_priv Table_priv set 121 363 utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows')
+3.0000 mysql tables_priv Column_priv set 31 93 utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','References')
+3.0000 mysql table_stats db_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql table_stats table_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+NULL mysql table_stats cardinality bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned
+3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8mb3 utf8mb3_general_ci enum('Y','N')
+NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20)
+NULL mysql time_zone_leap_second Correction int NULL NULL NULL NULL int(11)
+3.0000 mysql time_zone_name Name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql time_zone_name Time_zone_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition Time_zone_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition Transition_time bigint NULL NULL NULL NULL bigint(20)
+NULL mysql time_zone_transition Transition_type_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition_type Time_zone_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition_type Transition_type_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition_type Offset int NULL NULL NULL NULL int(11)
+NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(3) unsigned
+3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8mb3 utf8mb3_general_ci char(8)
+NULL mysql transaction_registry transaction_id bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql transaction_registry commit_id bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql transaction_registry begin_timestamp timestamp NULL NULL NULL NULL timestamp(6)
+NULL mysql transaction_registry commit_timestamp timestamp NULL NULL NULL NULL timestamp(6)
+3.0000 mysql transaction_registry isolation_level enum 16 48 utf8mb3 utf8mb3_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE')
+3.0000 mysql user Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql user User char 128 384 utf8mb3 utf8mb3_bin char(128)
+1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9)
+1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21)
+1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
new file mode 100644
index 00000000..9fac1a22
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
@@ -0,0 +1,567 @@
+SELECT * FROM information_schema.columns
+WHERE table_schema = 'mysql'
+ORDER BY table_schema, table_name, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def mysql columns_priv Column_name 5 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql columns_priv Column_priv 7 '' NO set 31 93 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','References') NEVER NULL
+def mysql columns_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql columns_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI NEVER NULL
+def mysql columns_priv Table_name 4 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql columns_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL
+def mysql columns_priv User 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI NEVER NULL
+def mysql column_stats avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) NEVER NULL
+def mysql column_stats avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) NEVER NULL
+def mysql column_stats column_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI NEVER NULL
+def mysql column_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI NEVER NULL
+def mysql column_stats histogram 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
+def mysql column_stats hist_size 9 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned NEVER NULL
+def mysql column_stats hist_type 10 NULL YES enum 14 42 NULL NULL NULL utf8mb3 utf8mb3_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB') NEVER NULL
+def mysql column_stats max_value 5 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) NEVER NULL
+def mysql column_stats min_value 4 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) NEVER NULL
+def mysql column_stats nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) NEVER NULL
+def mysql column_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI NEVER NULL
+def mysql db Alter_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Alter_routine_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Create_routine_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Create_tmp_table_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Create_view_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Db 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql db Delete_history_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Event_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Execute_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Grant_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI NEVER NULL
+def mysql db Index_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Lock_tables_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db References_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Show_view_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Trigger_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql db User 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI NEVER NULL
+def mysql event body 3 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
+def mysql event body_utf8 22 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
+def mysql event character_set_client 19 NULL YES char 32 96 NULL NULL NULL utf8mb3 utf8mb3_bin char(32) NEVER NULL
+def mysql event collation_connection 20 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) NEVER NULL
+def mysql event comment 16 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) NEVER NULL
+def mysql event created 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL
+def mysql event db 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql event db_collation 21 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) NEVER NULL
+def mysql event definer 4 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) NEVER NULL
+def mysql event ends 12 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def mysql event interval_field 7 NULL YES enum 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') NEVER NULL
+def mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def mysql event modified 9 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp NEVER NULL
+def mysql event name 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI NEVER NULL
+def mysql event on_completion 14 'DROP' NO enum 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('DROP','PRESERVE') NEVER NULL
+def mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
+def mysql event sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NEVER NULL
+def mysql event starts 11 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
+def mysql event status 13 'ENABLED' NO enum 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NEVER NULL
+def mysql event time_zone 18 'SYSTEM' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) NEVER NULL
+def mysql func dl 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) NEVER NULL
+def mysql func name 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) NEVER NULL
+def mysql func type 4 NULL NO enum 9 27 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('function','aggregate') NEVER NULL
+def mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8mb3 utf8mb3_general_ci mediumtext NEVER NULL
+def mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
+def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update current_timestamp(6) NEVER NULL
+def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
+def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8mb3 utf8mb3_general_ci mediumtext NEVER NULL
+def mysql global_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI NEVER NULL
+def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql global_priv User 2 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI NEVER NULL
+def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
+def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
+def mysql gtid_slave_pos sub_id 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI NEVER NULL
+def mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned PRI NEVER NULL
+def mysql help_category name 2 NULL NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) UNI NEVER NULL
+def mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned NEVER NULL
+def mysql help_category url 4 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_general_ci text NEVER NULL
+def mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
+def mysql help_keyword name 2 NULL NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) UNI NEVER NULL
+def mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
+def mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
+def mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_general_ci text NEVER NULL
+def mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_general_ci text NEVER NULL
+def mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned NEVER NULL
+def mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
+def mysql help_topic name 2 NULL NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) UNI NEVER NULL
+def mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_general_ci text NEVER NULL
+def mysql index_stats avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) NEVER NULL
+def mysql index_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI NEVER NULL
+def mysql index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI NEVER NULL
+def mysql index_stats prefix_arity 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned PRI NEVER NULL
+def mysql index_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI NEVER NULL
+def mysql plugin dl 2 '' NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) NEVER NULL
+def mysql plugin name 1 '' NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) PRI NEVER NULL
+def mysql proc aggregate 21 'NONE' NO enum 5 15 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('NONE','GROUP') NEVER NULL
+def mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
+def mysql proc body_utf8 20 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
+def mysql proc character_set_client 17 NULL YES char 32 96 NULL NULL NULL utf8mb3 utf8mb3_bin char(32) NEVER NULL
+def mysql proc collation_connection 18 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) NEVER NULL
+def mysql proc comment 16 NULL NO text 65535 65535 NULL NULL NULL utf8mb3 utf8mb3_bin text NEVER NULL
+def mysql proc created 13 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL
+def mysql proc db 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql proc db_collation 19 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) NEVER NULL
+def mysql proc definer 12 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) NEVER NULL
+def mysql proc is_deterministic 7 'NO' NO enum 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('YES','NO') NEVER NULL
+def mysql proc language 5 'SQL' NO enum 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('SQL') NEVER NULL
+def mysql proc modified 14 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp NEVER NULL
+def mysql proc name 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI NEVER NULL
+def mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
+def mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
+def mysql proc security_type 8 'DEFINER' NO enum 7 21 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('INVOKER','DEFINER') NEVER NULL
+def mysql proc specific_name 4 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) NEVER NULL
+def mysql proc sql_data_access 6 'CONTAINS_SQL' NO enum 17 51 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NEVER NULL
+def mysql proc sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NEVER NULL
+def mysql proc type 3 NULL NO enum 12 36 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI NEVER NULL
+def mysql procs_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql procs_priv Grantor 6 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) MUL NEVER NULL
+def mysql procs_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI NEVER NULL
+def mysql procs_priv Proc_priv 7 '' NO set 27 81 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('Execute','Alter Routine','Grant') NEVER NULL
+def mysql procs_priv Routine_name 4 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI NEVER NULL
+def mysql procs_priv Routine_type 5 NULL NO enum 12 36 NULL NULL NULL utf8mb3 utf8mb3_bin enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI NEVER NULL
+def mysql procs_priv Timestamp 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL
+def mysql procs_priv User 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI NEVER NULL
+def mysql proxies_priv Grantor 6 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) MUL NEVER NULL
+def mysql proxies_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI NEVER NULL
+def mysql proxies_priv Proxied_host 3 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI NEVER NULL
+def mysql proxies_priv Proxied_user 4 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI NEVER NULL
+def mysql proxies_priv Timestamp 7 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL
+def mysql proxies_priv User 2 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI NEVER NULL
+def mysql proxies_priv With_grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) NEVER NULL
+def mysql roles_mapping Admin_option 4 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('N','Y') NEVER NULL
+def mysql roles_mapping Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI NEVER NULL
+def mysql roles_mapping Role 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI NEVER NULL
+def mysql roles_mapping User 2 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI NEVER NULL
+def mysql servers Db 3 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) NEVER NULL
+def mysql servers Host 2 '' NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) NEVER NULL
+def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) NEVER NULL
+def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI NEVER NULL
+def mysql servers Socket 7 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) NEVER NULL
+def mysql servers Username 4 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(128) NEVER NULL
+def mysql servers Wrapper 8 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) NEVER NULL
+def mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
+def mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL 6 NULL NULL time(6) NEVER NULL
+def mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL 6 NULL NULL time(6) NEVER NULL
+def mysql slow_log rows_affected 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql slow_log rows_examined 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql slow_log rows_sent 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
+def mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8mb3 utf8mb3_general_ci mediumtext NEVER NULL
+def mysql slow_log start_time 1 current_timestamp(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update current_timestamp(6) NEVER NULL
+def mysql slow_log thread_id 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8mb3 utf8mb3_general_ci mediumtext NEVER NULL
+def mysql tables_priv Column_priv 8 '' NO set 31 93 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','References') NEVER NULL
+def mysql tables_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql tables_priv Grantor 5 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) MUL NEVER NULL
+def mysql tables_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) PRI NEVER NULL
+def mysql tables_priv Table_name 4 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) PRI NEVER NULL
+def mysql tables_priv Table_priv 7 '' NO set 121 363 NULL NULL NULL utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') NEVER NULL
+def mysql tables_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL
+def mysql tables_priv User 3 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) PRI NEVER NULL
+def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
+def mysql table_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI NEVER NULL
+def mysql table_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI NEVER NULL
+def mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI auto_increment NEVER NULL
+def mysql time_zone Use_leap_seconds 2 'N' NO enum 1 3 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('Y','N') NEVER NULL
+def mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) PRI NEVER NULL
+def mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI NEVER NULL
+def mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
+def mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
+def mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) PRI NEVER NULL
+def mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
+def mysql time_zone_transition_type Abbreviation 5 '' NO char 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(8) NEVER NULL
+def mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned NEVER NULL
+def mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
+def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
+def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Host 1 '' NO char 255 765 NULL NULL NULL utf8mb3 utf8mb3_bin char(255) NEVER NULL
+def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) NEVER NULL
+def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) NEVER NULL
+def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user User 2 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_bin char(128) NEVER NULL
+def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+##########################################################################
+# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
+##########################################################################
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'mysql'
+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
+1.0000 blob NULL NULL
+1.0000 longblob NULL NULL
+1.0000 varbinary NULL NULL
+1.0000 char latin1 latin1_swedish_ci
+1.0000 varchar latin1 latin1_swedish_ci
+1.0000 text utf8mb3 utf8mb3_bin
+1.0000 mediumtext utf8mb3 utf8mb3_general_ci
+1.0000 text utf8mb3 utf8mb3_general_ci
+1.0000 longtext utf8mb4 utf8mb4_bin
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'mysql'
+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
+3.0000 char utf8mb3 utf8mb3_bin
+3.0000 enum utf8mb3 utf8mb3_bin
+3.0000 varchar utf8mb3 utf8mb3_bin
+3.0000 char utf8mb3 utf8mb3_general_ci
+3.0000 enum utf8mb3 utf8mb3_general_ci
+3.0000 set utf8mb3 utf8mb3_general_ci
+3.0000 varchar utf8mb3 utf8mb3_general_ci
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+SELECT DISTINCT
+CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
+DATA_TYPE,
+CHARACTER_SET_NAME,
+COLLATION_NAME
+FROM information_schema.columns
+WHERE table_schema = 'mysql'
+AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
+ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
+COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+NULL bigint NULL NULL
+NULL datetime NULL NULL
+NULL decimal NULL NULL
+NULL int NULL NULL
+NULL smallint NULL NULL
+NULL time NULL NULL
+NULL timestamp NULL NULL
+NULL tinyint NULL NULL
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+--> 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,
+TABLE_SCHEMA,
+TABLE_NAME,
+COLUMN_NAME,
+DATA_TYPE,
+CHARACTER_MAXIMUM_LENGTH,
+CHARACTER_OCTET_LENGTH,
+CHARACTER_SET_NAME,
+COLLATION_NAME,
+COLUMN_TYPE
+FROM information_schema.columns
+WHERE table_schema = 'mysql'
+ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
+COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
+3.0000 mysql columns_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql columns_priv Db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql columns_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql columns_priv Table_name char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql columns_priv Column_name char 64 192 utf8mb3 utf8mb3_bin char(64)
+NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql columns_priv Column_priv set 31 93 utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','References')
+3.0000 mysql column_stats db_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql column_stats table_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql column_stats column_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+1.0000 mysql column_stats min_value varbinary 255 255 NULL NULL varbinary(255)
+1.0000 mysql column_stats max_value varbinary 255 255 NULL NULL varbinary(255)
+NULL mysql column_stats nulls_ratio decimal NULL NULL NULL NULL decimal(12,4)
+NULL mysql column_stats avg_length decimal NULL NULL NULL NULL decimal(12,4)
+NULL mysql column_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
+NULL mysql column_stats hist_size tinyint NULL NULL NULL NULL tinyint(3) unsigned
+3.0000 mysql column_stats hist_type enum 14 42 utf8mb3 utf8mb3_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB')
+1.0000 mysql column_stats histogram longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql db Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql db Db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql db User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql db Select_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Insert_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Update_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Delete_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Create_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Drop_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Grant_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db References_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Index_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Alter_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Create_tmp_table_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Lock_tables_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Create_view_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Show_view_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Create_routine_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Alter_routine_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Execute_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Event_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Trigger_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql db Delete_history_priv enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql event db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql event name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+1.0000 mysql event body longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql event definer varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+NULL mysql event execute_at datetime NULL NULL NULL NULL datetime
+NULL mysql event interval_value int NULL NULL NULL NULL int(11)
+3.0000 mysql event interval_field enum 18 54 utf8mb3 utf8mb3_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND')
+NULL mysql event created timestamp NULL NULL NULL NULL timestamp
+NULL mysql event modified timestamp NULL NULL NULL NULL timestamp
+NULL mysql event last_executed datetime NULL NULL NULL NULL datetime
+NULL mysql event starts datetime NULL NULL NULL NULL datetime
+NULL mysql event ends datetime NULL NULL NULL NULL datetime
+3.0000 mysql event status enum 18 54 utf8mb3 utf8mb3_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
+3.0000 mysql event on_completion enum 8 24 utf8mb3 utf8mb3_general_ci enum('DROP','PRESERVE')
+3.0000 mysql event sql_mode set 561 1683 utf8mb3 utf8mb3_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
+3.0000 mysql event comment char 64 192 utf8mb3 utf8mb3_bin char(64)
+NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
+1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
+3.0000 mysql event character_set_client char 32 96 utf8mb3 utf8mb3_bin char(32)
+3.0000 mysql event collation_connection char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql event db_collation char 64 192 utf8mb3 utf8mb3_bin char(64)
+1.0000 mysql event body_utf8 longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql func name char 64 192 utf8mb3 utf8mb3_bin char(64)
+NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1)
+3.0000 mysql func dl char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql func type enum 9 27 utf8mb3 utf8mb3_general_ci enum('function','aggregate')
+NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp(6)
+1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8mb3 utf8mb3_general_ci mediumtext
+NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
+3.0000 mysql general_log command_type varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8mb3 utf8mb3_general_ci mediumtext
+3.0000 mysql global_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql global_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql gtid_slave_pos seq_no bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
+3.0000 mysql help_category name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
+1.0000 mysql help_category url text 65535 65535 utf8mb3 utf8mb3_general_ci text
+NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned
+3.0000 mysql help_keyword name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql help_relation help_keyword_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned
+3.0000 mysql help_topic name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
+1.0000 mysql help_topic description text 65535 65535 utf8mb3 utf8mb3_general_ci text
+1.0000 mysql help_topic example text 65535 65535 utf8mb3 utf8mb3_general_ci text
+1.0000 mysql help_topic url text 65535 65535 utf8mb3 utf8mb3_general_ci text
+3.0000 mysql index_stats db_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql index_stats table_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql index_stats index_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+NULL mysql index_stats prefix_arity int NULL NULL NULL NULL int(11) unsigned
+NULL mysql index_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
+3.0000 mysql plugin name varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
+3.0000 mysql plugin dl varchar 128 384 utf8mb3 utf8mb3_general_ci varchar(128)
+3.0000 mysql proc db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql proc name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql proc type enum 12 36 utf8mb3 utf8mb3_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY')
+3.0000 mysql proc specific_name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql proc language enum 3 9 utf8mb3 utf8mb3_general_ci enum('SQL')
+3.0000 mysql proc sql_data_access enum 17 51 utf8mb3 utf8mb3_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA')
+3.0000 mysql proc is_deterministic enum 3 9 utf8mb3 utf8mb3_general_ci enum('YES','NO')
+3.0000 mysql proc security_type enum 7 21 utf8mb3 utf8mb3_general_ci enum('INVOKER','DEFINER')
+1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob
+1.0000 mysql proc returns longblob 4294967295 4294967295 NULL NULL longblob
+1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql proc definer varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
+NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql proc sql_mode set 561 1683 utf8mb3 utf8mb3_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
+1.0000 mysql proc comment text 65535 65535 utf8mb3 utf8mb3_bin text
+3.0000 mysql proc character_set_client char 32 96 utf8mb3 utf8mb3_bin char(32)
+3.0000 mysql proc collation_connection char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql proc db_collation char 64 192 utf8mb3 utf8mb3_bin char(64)
+1.0000 mysql proc body_utf8 longblob 4294967295 4294967295 NULL NULL longblob
+3.0000 mysql proc aggregate enum 5 15 utf8mb3 utf8mb3_general_ci enum('NONE','GROUP')
+3.0000 mysql procs_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql procs_priv Db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql procs_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql procs_priv Routine_name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql procs_priv Routine_type enum 12 36 utf8mb3 utf8mb3_bin enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY')
+3.0000 mysql procs_priv Grantor varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+3.0000 mysql procs_priv Proc_priv set 27 81 utf8mb3 utf8mb3_general_ci set('Execute','Alter Routine','Grant')
+NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql proxies_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql proxies_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql proxies_priv Proxied_host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql proxies_priv Proxied_user char 128 384 utf8mb3 utf8mb3_bin char(128)
+NULL mysql proxies_priv With_grant tinyint NULL NULL NULL NULL tinyint(1)
+3.0000 mysql proxies_priv Grantor varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql roles_mapping Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql roles_mapping User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql roles_mapping Role char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql roles_mapping Admin_option enum 1 3 utf8mb3 utf8mb3_general_ci enum('N','Y')
+3.0000 mysql servers Server_name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql servers Host varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 mysql servers Db char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql servers Username char 128 384 utf8mb3 utf8mb3_general_ci char(128)
+3.0000 mysql servers Password char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql servers Port int NULL NULL NULL NULL int(4)
+3.0000 mysql servers Socket char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql servers Wrapper char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+3.0000 mysql servers Owner varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6)
+1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8mb3 utf8mb3_general_ci mediumtext
+NULL mysql slow_log query_time time NULL NULL NULL NULL time(6)
+NULL mysql slow_log lock_time time NULL NULL NULL NULL time(6)
+NULL mysql slow_log rows_sent bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql slow_log rows_examined bigint NULL NULL NULL NULL bigint(20) unsigned
+3.0000 mysql slow_log db varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
+NULL mysql slow_log last_insert_id int NULL NULL NULL NULL int(11)
+NULL mysql slow_log insert_id int NULL NULL NULL NULL int(11)
+NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned
+1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8mb3 utf8mb3_general_ci mediumtext
+NULL mysql slow_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL mysql slow_log rows_affected bigint NULL NULL NULL NULL bigint(20) unsigned
+3.0000 mysql tables_priv Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql tables_priv Db char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql tables_priv User char 128 384 utf8mb3 utf8mb3_bin char(128)
+3.0000 mysql tables_priv Table_name char 64 192 utf8mb3 utf8mb3_bin char(64)
+3.0000 mysql tables_priv Grantor varchar 384 1152 utf8mb3 utf8mb3_bin varchar(384)
+NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp
+3.0000 mysql tables_priv Table_priv set 121 363 utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows')
+3.0000 mysql tables_priv Column_priv set 31 93 utf8mb3 utf8mb3_general_ci set('Select','Insert','Update','References')
+3.0000 mysql table_stats db_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+3.0000 mysql table_stats table_name varchar 64 192 utf8mb3 utf8mb3_bin varchar(64)
+NULL mysql table_stats cardinality bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned
+3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8mb3 utf8mb3_general_ci enum('Y','N')
+NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20)
+NULL mysql time_zone_leap_second Correction int NULL NULL NULL NULL int(11)
+3.0000 mysql time_zone_name Name char 64 192 utf8mb3 utf8mb3_general_ci char(64)
+NULL mysql time_zone_name Time_zone_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition Time_zone_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition Transition_time bigint NULL NULL NULL NULL bigint(20)
+NULL mysql time_zone_transition Transition_type_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition_type Time_zone_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition_type Transition_type_id int NULL NULL NULL NULL int(10) unsigned
+NULL mysql time_zone_transition_type Offset int NULL NULL NULL NULL int(11)
+NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(3) unsigned
+3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8mb3 utf8mb3_general_ci char(8)
+3.0000 mysql user Host char 255 765 utf8mb3 utf8mb3_bin char(255)
+3.0000 mysql user User char 128 384 utf8mb3 utf8mb3_bin char(128)
+1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9)
+1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21)
+1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6)
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
diff --git a/mysql-test/suite/funcs_1/r/is_engines.result b/mysql-test/suite/funcs_1/r/is_engines.result
new file mode 100644
index 00000000..ad774caa
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines.result
@@ -0,0 +1,84 @@
+SHOW TABLES FROM information_schema LIKE 'ENGINES';
+Tables_in_information_schema (ENGINES)
+ENGINES
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.ENGINES;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.ENGINES;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.ENGINES;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.ENGINES;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.12.1: INFORMATION_SCHEMA.ENGINES layout
+#########################################################################
+DESCRIBE information_schema.ENGINES;
+Field Type Null Key Default Extra
+ENGINE varchar(64) NO NULL
+SUPPORT varchar(8) NO NULL
+COMMENT varchar(160) NO NULL
+TRANSACTIONS varchar(3) YES NULL
+XA varchar(3) YES NULL
+SAVEPOINTS varchar(3) YES NULL
+SHOW CREATE TABLE information_schema.ENGINES;
+Table Create Table
+ENGINES CREATE TEMPORARY TABLE `ENGINES` (
+ `ENGINE` varchar(64) NOT NULL,
+ `SUPPORT` varchar(8) NOT NULL,
+ `COMMENT` varchar(160) NOT NULL,
+ `TRANSACTIONS` varchar(3),
+ `XA` varchar(3),
+ `SAVEPOINTS` varchar(3)
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.ENGINES;
+Field Type Null Key Default Extra
+ENGINE varchar(64) NO NULL
+SUPPORT varchar(8) NO NULL
+COMMENT varchar(160) NO NULL
+TRANSACTIONS varchar(3) YES NULL
+XA varchar(3) YES NULL
+SAVEPOINTS varchar(3) YES NULL
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = <engine_type>;
+INSERT INTO information_schema.engines
+SELECT * FROM information_schema.engines;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.engines SET engine = '1234567';
+Got one of the listed errors
+DELETE FROM information_schema.engines WHERE support IN ('DEFAULT','YES');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.engines;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_engines ON information_schema.engines(engine);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.engines DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.engines ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.engines;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.engines RENAME db_datadict.engines;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.engines RENAME information_schema.xengines;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_engines_archive.result b/mysql-test/suite/funcs_1/r/is_engines_archive.result
new file mode 100644
index 00000000..52802b17
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines_archive.result
@@ -0,0 +1,8 @@
+SELECT * FROM information_schema.engines
+WHERE ENGINE = 'ARCHIVE';
+ENGINE ARCHIVE
+SUPPORT YES
+COMMENT gzip-compresses tables for a low storage footprint
+TRANSACTIONS NO
+XA NO
+SAVEPOINTS NO
diff --git a/mysql-test/suite/funcs_1/r/is_engines_blackhole.result b/mysql-test/suite/funcs_1/r/is_engines_blackhole.result
new file mode 100644
index 00000000..021422e7
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines_blackhole.result
@@ -0,0 +1,8 @@
+SELECT * FROM information_schema.engines
+WHERE ENGINE = 'BLACKHOLE';
+ENGINE BLACKHOLE
+SUPPORT YES
+COMMENT /dev/null storage engine (anything you write to it disappears)
+TRANSACTIONS NO
+XA NO
+SAVEPOINTS NO
diff --git a/mysql-test/suite/funcs_1/r/is_engines_csv.result b/mysql-test/suite/funcs_1/r/is_engines_csv.result
new file mode 100644
index 00000000..7e413b9a
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines_csv.result
@@ -0,0 +1,8 @@
+SELECT * FROM information_schema.engines
+WHERE ENGINE = 'CSV';
+ENGINE CSV
+SUPPORT YES
+COMMENT Stores tables as CSV files
+TRANSACTIONS NO
+XA NO
+SAVEPOINTS NO
diff --git a/mysql-test/suite/funcs_1/r/is_engines_federated.result b/mysql-test/suite/funcs_1/r/is_engines_federated.result
new file mode 100644
index 00000000..d9da64c7
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines_federated.result
@@ -0,0 +1,8 @@
+SELECT * FROM information_schema.engines
+WHERE ENGINE = 'FEDERATED';
+ENGINE FEDERATED
+SUPPORT YES
+COMMENT Allows one to access tables on other MariaDB servers, supports transactions and more
+TRANSACTIONS YES
+XA NO
+SAVEPOINTS YES
diff --git a/mysql-test/suite/funcs_1/r/is_engines_innodb.result b/mysql-test/suite/funcs_1/r/is_engines_innodb.result
new file mode 100644
index 00000000..b8c6399f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines_innodb.result
@@ -0,0 +1,8 @@
+SELECT * FROM information_schema.engines
+WHERE ENGINE = 'InnoDB';
+ENGINE InnoDB
+SUPPORT YES
+COMMENT Supports transactions, row-level locking, foreign keys and encryption for tables
+TRANSACTIONS YES
+XA YES
+SAVEPOINTS YES
diff --git a/mysql-test/suite/funcs_1/r/is_engines_memory.result b/mysql-test/suite/funcs_1/r/is_engines_memory.result
new file mode 100644
index 00000000..43114adf
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines_memory.result
@@ -0,0 +1,8 @@
+SELECT * FROM information_schema.engines
+WHERE ENGINE = 'MEMORY';
+ENGINE MEMORY
+SUPPORT YES
+COMMENT Hash based, stored in memory, useful for temporary tables
+TRANSACTIONS NO
+XA NO
+SAVEPOINTS NO
diff --git a/mysql-test/suite/funcs_1/r/is_engines_merge.result b/mysql-test/suite/funcs_1/r/is_engines_merge.result
new file mode 100644
index 00000000..b72c98bf
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines_merge.result
@@ -0,0 +1,8 @@
+SELECT * FROM information_schema.engines
+WHERE ENGINE = 'MRG_MYISAM';
+ENGINE MRG_MyISAM
+SUPPORT YES
+COMMENT Collection of identical MyISAM tables
+TRANSACTIONS NO
+XA NO
+SAVEPOINTS NO
diff --git a/mysql-test/suite/funcs_1/r/is_engines_myisam.result b/mysql-test/suite/funcs_1/r/is_engines_myisam.result
new file mode 100644
index 00000000..d307ce4b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines_myisam.result
@@ -0,0 +1,8 @@
+SELECT * FROM information_schema.engines
+WHERE ENGINE = 'MyISAM';
+ENGINE MyISAM
+SUPPORT DEFAULT
+COMMENT Non-transactional engine with good performance and small data footprint
+TRANSACTIONS NO
+XA NO
+SAVEPOINTS NO
diff --git a/mysql-test/suite/funcs_1/r/is_events.result b/mysql-test/suite/funcs_1/r/is_events.result
new file mode 100644
index 00000000..7df12ee2
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_events.result
@@ -0,0 +1,148 @@
+SHOW TABLES FROM information_schema LIKE 'EVENTS';
+Tables_in_information_schema (EVENTS)
+EVENTS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.EVENTS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.EVENTS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.EVENTS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.EVENTS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.12.1: INFORMATION_SCHEMA.EVENTS layout
+#########################################################################
+DESCRIBE information_schema.EVENTS;
+Field Type Null Key Default Extra
+EVENT_CATALOG varchar(64) NO NULL
+EVENT_SCHEMA varchar(64) NO NULL
+EVENT_NAME varchar(64) NO NULL
+DEFINER varchar(384) NO NULL
+TIME_ZONE varchar(64) NO NULL
+EVENT_BODY varchar(8) NO NULL
+EVENT_DEFINITION longtext NO NULL
+EVENT_TYPE varchar(9) NO NULL
+EXECUTE_AT datetime YES NULL
+INTERVAL_VALUE varchar(256) YES NULL
+INTERVAL_FIELD varchar(18) YES NULL
+SQL_MODE varchar(8192) NO NULL
+STARTS datetime YES NULL
+ENDS datetime YES NULL
+STATUS varchar(18) NO NULL
+ON_COMPLETION varchar(12) NO NULL
+CREATED datetime NO NULL
+LAST_ALTERED datetime NO NULL
+LAST_EXECUTED datetime YES NULL
+EVENT_COMMENT varchar(64) NO NULL
+ORIGINATOR bigint(10) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+SHOW CREATE TABLE information_schema.EVENTS;
+Table Create Table
+EVENTS CREATE TEMPORARY TABLE `EVENTS` (
+ `EVENT_CATALOG` varchar(64) NOT NULL,
+ `EVENT_SCHEMA` varchar(64) NOT NULL,
+ `EVENT_NAME` varchar(64) NOT NULL,
+ `DEFINER` varchar(384) NOT NULL,
+ `TIME_ZONE` varchar(64) NOT NULL,
+ `EVENT_BODY` varchar(8) NOT NULL,
+ `EVENT_DEFINITION` longtext NOT NULL,
+ `EVENT_TYPE` varchar(9) NOT NULL,
+ `EXECUTE_AT` datetime,
+ `INTERVAL_VALUE` varchar(256),
+ `INTERVAL_FIELD` varchar(18),
+ `SQL_MODE` varchar(8192) NOT NULL,
+ `STARTS` datetime,
+ `ENDS` datetime,
+ `STATUS` varchar(18) NOT NULL,
+ `ON_COMPLETION` varchar(12) NOT NULL,
+ `CREATED` datetime NOT NULL,
+ `LAST_ALTERED` datetime NOT NULL,
+ `LAST_EXECUTED` datetime,
+ `EVENT_COMMENT` varchar(64) NOT NULL,
+ `ORIGINATOR` bigint(10) NOT NULL,
+ `CHARACTER_SET_CLIENT` varchar(32) NOT NULL,
+ `COLLATION_CONNECTION` varchar(64) NOT NULL,
+ `DATABASE_COLLATION` varchar(64) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.EVENTS;
+Field Type Null Key Default Extra
+EVENT_CATALOG varchar(64) NO NULL
+EVENT_SCHEMA varchar(64) NO NULL
+EVENT_NAME varchar(64) NO NULL
+DEFINER varchar(384) NO NULL
+TIME_ZONE varchar(64) NO NULL
+EVENT_BODY varchar(8) NO NULL
+EVENT_DEFINITION longtext NO NULL
+EVENT_TYPE varchar(9) NO NULL
+EXECUTE_AT datetime YES NULL
+INTERVAL_VALUE varchar(256) YES NULL
+INTERVAL_FIELD varchar(18) YES NULL
+SQL_MODE varchar(8192) NO NULL
+STARTS datetime YES NULL
+ENDS datetime YES NULL
+STATUS varchar(18) NO NULL
+ON_COMPLETION varchar(12) NO NULL
+CREATED datetime NO NULL
+LAST_ALTERED datetime NO NULL
+LAST_EXECUTED datetime YES NULL
+EVENT_COMMENT varchar(64) NO NULL
+ORIGINATOR bigint(10) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+SELECT event_catalog, event_name, event_body, event_type, event_type,
+status, on_completion
+FROM information_schema.events
+WHERE event_catalog IS NOT NULL or
+event_body NOT IN ('SQL') or
+event_type NOT IN ('ONE TIME','RECURRING') or
+status NOT IN ('ENABLED','DISABLED','SLAVESIDE_DISABLED') or
+on_completion NOT IN ('PRESERVE','NOT PRESERVE');
+event_catalog event_name event_body event_type event_type status on_completion
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = <engine_type>;
+INSERT INTO information_schema.events
+SELECT * FROM information_schema.events;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.events SET event_name = '1234567'
+WHERE table_name = 't1';
+Got one of the listed errors
+DELETE FROM information_schema.events WHERE event_catalog IS NULL;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.events;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_events ON information_schema.events(event_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.events DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.events ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.events;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.events RENAME db_datadict.events;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.events RENAME information_schema.xevents;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
new file mode 100644
index 00000000..f721be91
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
@@ -0,0 +1,422 @@
+SHOW TABLES FROM information_schema LIKE 'KEY_COLUMN_USAGE';
+Tables_in_information_schema (KEY_COLUMN_USAGE)
+KEY_COLUMN_USAGE
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.KEY_COLUMN_USAGE;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.KEY_COLUMN_USAGE;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.KEY_COLUMN_USAGE;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.KEY_COLUMN_USAGE;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.7.1: INFORMATION_SCHEMA.KEY_COLUMN_USAGE layout
+#########################################################################
+DESCRIBE information_schema.KEY_COLUMN_USAGE;
+Field Type Null Key Default Extra
+CONSTRAINT_CATALOG varchar(512) NO NULL
+CONSTRAINT_SCHEMA varchar(64) NO NULL
+CONSTRAINT_NAME varchar(64) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+ORDINAL_POSITION bigint(10) NO NULL
+POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL
+REFERENCED_TABLE_SCHEMA varchar(64) YES NULL
+REFERENCED_TABLE_NAME varchar(64) YES NULL
+REFERENCED_COLUMN_NAME varchar(64) YES NULL
+SHOW CREATE TABLE information_schema.KEY_COLUMN_USAGE;
+Table Create Table
+KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` (
+ `CONSTRAINT_CATALOG` varchar(512) NOT NULL,
+ `CONSTRAINT_SCHEMA` varchar(64) NOT NULL,
+ `CONSTRAINT_NAME` varchar(64) NOT NULL,
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `COLUMN_NAME` varchar(64) NOT NULL,
+ `ORDINAL_POSITION` bigint(10) NOT NULL,
+ `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10),
+ `REFERENCED_TABLE_SCHEMA` varchar(64),
+ `REFERENCED_TABLE_NAME` varchar(64),
+ `REFERENCED_COLUMN_NAME` varchar(64)
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.KEY_COLUMN_USAGE;
+Field Type Null Key Default Extra
+CONSTRAINT_CATALOG varchar(512) NO NULL
+CONSTRAINT_SCHEMA varchar(64) NO NULL
+CONSTRAINT_NAME varchar(64) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+ORDINAL_POSITION bigint(10) NO NULL
+POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL
+REFERENCED_TABLE_SCHEMA varchar(64) YES NULL
+REFERENCED_TABLE_NAME varchar(64) YES NULL
+REFERENCED_COLUMN_NAME varchar(64) YES NULL
+SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog,
+table_schema, table_name, column_name
+FROM information_schema.key_column_usage
+WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL
+ORDER BY BINARY table_schema, BINARY table_name, BINARY column_name, BINARY constraint_name;
+constraint_catalog constraint_schema constraint_name table_catalog table_schema table_name column_name
+def mysql PRIMARY def mysql column_stats column_name
+def mysql PRIMARY def mysql column_stats db_name
+def mysql PRIMARY def mysql column_stats table_name
+def mysql PRIMARY def mysql columns_priv Column_name
+def mysql PRIMARY def mysql columns_priv Db
+def mysql PRIMARY def mysql columns_priv Host
+def mysql PRIMARY def mysql columns_priv Table_name
+def mysql PRIMARY def mysql columns_priv User
+def mysql PRIMARY def mysql db Db
+def mysql PRIMARY def mysql db Host
+def mysql PRIMARY def mysql db User
+def mysql PRIMARY def mysql event db
+def mysql PRIMARY def mysql event name
+def mysql PRIMARY def mysql func name
+def mysql PRIMARY def mysql global_priv Host
+def mysql PRIMARY def mysql global_priv User
+def mysql PRIMARY def mysql gtid_slave_pos domain_id
+def mysql PRIMARY def mysql gtid_slave_pos sub_id
+def mysql PRIMARY def mysql help_category help_category_id
+def mysql name def mysql help_category name
+def mysql PRIMARY def mysql help_keyword help_keyword_id
+def mysql name def mysql help_keyword name
+def mysql PRIMARY def mysql help_relation help_keyword_id
+def mysql PRIMARY def mysql help_relation help_topic_id
+def mysql PRIMARY def mysql help_topic help_topic_id
+def mysql name def mysql help_topic name
+def mysql PRIMARY def mysql index_stats db_name
+def mysql PRIMARY def mysql index_stats index_name
+def mysql PRIMARY def mysql index_stats prefix_arity
+def mysql PRIMARY def mysql index_stats table_name
+def mysql PRIMARY def mysql innodb_index_stats database_name
+def mysql PRIMARY def mysql innodb_index_stats index_name
+def mysql PRIMARY def mysql innodb_index_stats stat_name
+def mysql PRIMARY def mysql innodb_index_stats table_name
+def mysql PRIMARY def mysql innodb_table_stats database_name
+def mysql PRIMARY def mysql innodb_table_stats table_name
+def mysql PRIMARY def mysql plugin name
+def mysql PRIMARY def mysql proc db
+def mysql PRIMARY def mysql proc name
+def mysql PRIMARY def mysql proc type
+def mysql PRIMARY def mysql procs_priv Db
+def mysql PRIMARY def mysql procs_priv Host
+def mysql PRIMARY def mysql procs_priv Routine_name
+def mysql PRIMARY def mysql procs_priv Routine_type
+def mysql PRIMARY def mysql procs_priv User
+def mysql PRIMARY def mysql proxies_priv Host
+def mysql PRIMARY def mysql proxies_priv Proxied_host
+def mysql PRIMARY def mysql proxies_priv Proxied_user
+def mysql PRIMARY def mysql proxies_priv User
+def mysql Host def mysql roles_mapping Host
+def mysql Host def mysql roles_mapping Role
+def mysql Host def mysql roles_mapping User
+def mysql PRIMARY def mysql servers Server_name
+def mysql PRIMARY def mysql table_stats db_name
+def mysql PRIMARY def mysql table_stats table_name
+def mysql PRIMARY def mysql tables_priv Db
+def mysql PRIMARY def mysql tables_priv Host
+def mysql PRIMARY def mysql tables_priv Table_name
+def mysql PRIMARY def mysql tables_priv User
+def mysql PRIMARY def mysql time_zone Time_zone_id
+def mysql PRIMARY def mysql time_zone_leap_second Transition_time
+def mysql PRIMARY def mysql time_zone_name Name
+def mysql PRIMARY def mysql time_zone_transition Time_zone_id
+def mysql PRIMARY def mysql time_zone_transition Transition_time
+def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id
+def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id
+def mysql commit_id def mysql transaction_registry commit_id
+def mysql PRIMARY def mysql transaction_registry transaction_id
+def sys PRIMARY def sys sys_config variable
+########################################################################################
+# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
+########################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+USE db_datadict;
+CREATE TABLE t1_1
+(f1 INT NOT NULL, PRIMARY KEY(f1),
+f2 INT, INDEX f2_ind(f2))
+ENGINE = <engine_type>;
+GRANT SELECT ON t1_1 to 'testuser1'@'localhost';
+CREATE TABLE t1_2
+(f1 INT NOT NULL, PRIMARY KEY(f1),
+f2 INT, INDEX f2_ind(f2))
+ENGINE = <engine_type>;
+GRANT SELECT ON t1_2 to 'testuser2'@'localhost';
+SELECT * FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_%'
+ORDER BY constraint_catalog, constraint_schema, constraint_name,
+table_catalog, table_schema, table_name, ordinal_position;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+def db_datadict PRIMARY def db_datadict t1_1 f1 1 NULL NULL NULL NULL
+def db_datadict PRIMARY def db_datadict t1_2 f1 1 NULL NULL NULL NULL
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_%'
+ORDER BY constraint_catalog, constraint_schema, constraint_name,
+table_catalog, table_schema, table_name, ordinal_position;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+def db_datadict PRIMARY def db_datadict t1_1 f1 1 NULL NULL NULL NULL
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_%'
+ORDER BY constraint_catalog, constraint_schema, constraint_name,
+table_catalog, table_schema, table_name, ordinal_position;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+def db_datadict PRIMARY def db_datadict t1_2 f1 1 NULL NULL NULL NULL
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP TABLE t1_1;
+DROP TABLE t1_2;
+DROP DATABASE IF EXISTS db_datadict;
+########################################################################################
+# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.KEY_COLUMN_USAGE modifications
+########################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+DROP TABLE IF EXISTS test.t1_my_table;
+CREATE DATABASE db_datadict;
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_my_table%';
+table_name
+CREATE TABLE test.t1_my_table
+(f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = <engine_type>;
+SELECT * FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_table';
+CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA test
+CONSTRAINT_NAME PRIMARY
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_table
+COLUMN_NAME f1
+ORDINAL_POSITION 1
+POSITION_IN_UNIQUE_CONSTRAINT NULL
+REFERENCED_TABLE_SCHEMA NULL
+REFERENCED_TABLE_NAME NULL
+REFERENCED_COLUMN_NAME NULL
+CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA test
+CONSTRAINT_NAME PRIMARY
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_table
+COLUMN_NAME f2
+ORDINAL_POSITION 2
+POSITION_IN_UNIQUE_CONSTRAINT NULL
+REFERENCED_TABLE_SCHEMA NULL
+REFERENCED_TABLE_NAME NULL
+REFERENCED_COLUMN_NAME NULL
+SELECT DISTINCT table_name FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_table
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT DISTINCT table_name FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_tablex
+SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+test t1_my_tablex
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+db_datadict t1_my_tablex
+SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+table_name column_name
+t1_my_tablex f1
+t1_my_tablex f2
+ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12);
+SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+table_name column_name
+t1_my_tablex f2
+t1_my_tablex first_col
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict f2 db_datadict t1_my_tablex f2 1
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict my_idx db_datadict t1_my_tablex f2 1
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+DROP INDEX my_idx ON db_datadict.t1_my_tablex;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict my_idx db_datadict t1_my_tablex f4 1
+db_datadict my_idx db_datadict t1_my_tablex first_col 2
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+SELECT table_name, column_name
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+table_name column_name
+t1_my_tablex f2
+t1_my_tablex f4
+t1_my_tablex first_col
+t1_my_tablex first_col
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name, column_name
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = <engine_type> AS
+SELECT 1 AS f1;
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1);
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+DROP TABLE IF EXISTS db_datadict.t1;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = <engine_type>;
+INSERT INTO information_schema.key_column_usage
+(constraint_schema, constraint_name, table_name)
+VALUES ( 'mysql', 'primary', 'db');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+INSERT INTO information_schema.key_column_usage
+SELECT * FROM information_schema.key_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.key_column_usage
+SET table_name = 'db1' WHERE constraint_name = 'primary';
+Got one of the listed errors
+DELETE FROM information_schema.key_column_usage WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.key_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX i3 ON information_schema.key_column_usage(table_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.key_column_usage ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.key_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.key_column_usage
+RENAME db_datadict.key_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.key_column_usage
+RENAME information_schema.xkey_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE db_datadict.t1;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result
new file mode 100644
index 00000000..0b9788c4
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result
@@ -0,0 +1,424 @@
+SHOW TABLES FROM information_schema LIKE 'KEY_COLUMN_USAGE';
+Tables_in_information_schema (KEY_COLUMN_USAGE)
+KEY_COLUMN_USAGE
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.KEY_COLUMN_USAGE;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.KEY_COLUMN_USAGE;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.KEY_COLUMN_USAGE;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.KEY_COLUMN_USAGE;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.7.1: INFORMATION_SCHEMA.KEY_COLUMN_USAGE layout
+#########################################################################
+DESCRIBE information_schema.KEY_COLUMN_USAGE;
+Field Type Null Key Default Extra
+CONSTRAINT_CATALOG varchar(512) NO NULL
+CONSTRAINT_SCHEMA varchar(64) NO NULL
+CONSTRAINT_NAME varchar(64) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+ORDINAL_POSITION bigint(10) NO NULL
+POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL
+REFERENCED_TABLE_SCHEMA varchar(64) YES NULL
+REFERENCED_TABLE_NAME varchar(64) YES NULL
+REFERENCED_COLUMN_NAME varchar(64) YES NULL
+SHOW CREATE TABLE information_schema.KEY_COLUMN_USAGE;
+Table Create Table
+KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` (
+ `CONSTRAINT_CATALOG` varchar(512) NOT NULL,
+ `CONSTRAINT_SCHEMA` varchar(64) NOT NULL,
+ `CONSTRAINT_NAME` varchar(64) NOT NULL,
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `COLUMN_NAME` varchar(64) NOT NULL,
+ `ORDINAL_POSITION` bigint(10) NOT NULL,
+ `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10),
+ `REFERENCED_TABLE_SCHEMA` varchar(64),
+ `REFERENCED_TABLE_NAME` varchar(64),
+ `REFERENCED_COLUMN_NAME` varchar(64)
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.KEY_COLUMN_USAGE;
+Field Type Null Key Default Extra
+CONSTRAINT_CATALOG varchar(512) NO NULL
+CONSTRAINT_SCHEMA varchar(64) NO NULL
+CONSTRAINT_NAME varchar(64) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+ORDINAL_POSITION bigint(10) NO NULL
+POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL
+REFERENCED_TABLE_SCHEMA varchar(64) YES NULL
+REFERENCED_TABLE_NAME varchar(64) YES NULL
+REFERENCED_COLUMN_NAME varchar(64) YES NULL
+SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog,
+table_schema, table_name, column_name
+FROM information_schema.key_column_usage
+WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL
+ORDER BY BINARY table_schema, BINARY table_name, BINARY column_name, BINARY constraint_name;
+constraint_catalog constraint_schema constraint_name table_catalog table_schema table_name column_name
+def mysql PRIMARY def mysql column_stats column_name
+def mysql PRIMARY def mysql column_stats db_name
+def mysql PRIMARY def mysql column_stats table_name
+def mysql PRIMARY def mysql columns_priv Column_name
+def mysql PRIMARY def mysql columns_priv Db
+def mysql PRIMARY def mysql columns_priv Host
+def mysql PRIMARY def mysql columns_priv Table_name
+def mysql PRIMARY def mysql columns_priv User
+def mysql PRIMARY def mysql db Db
+def mysql PRIMARY def mysql db Host
+def mysql PRIMARY def mysql db User
+def mysql PRIMARY def mysql event db
+def mysql PRIMARY def mysql event name
+def mysql PRIMARY def mysql func name
+def mysql PRIMARY def mysql global_priv Host
+def mysql PRIMARY def mysql global_priv User
+def mysql PRIMARY def mysql gtid_slave_pos domain_id
+def mysql PRIMARY def mysql gtid_slave_pos sub_id
+def mysql PRIMARY def mysql help_category help_category_id
+def mysql name def mysql help_category name
+def mysql PRIMARY def mysql help_keyword help_keyword_id
+def mysql name def mysql help_keyword name
+def mysql PRIMARY def mysql help_relation help_keyword_id
+def mysql PRIMARY def mysql help_relation help_topic_id
+def mysql PRIMARY def mysql help_topic help_topic_id
+def mysql name def mysql help_topic name
+def mysql PRIMARY def mysql index_stats db_name
+def mysql PRIMARY def mysql index_stats index_name
+def mysql PRIMARY def mysql index_stats prefix_arity
+def mysql PRIMARY def mysql index_stats table_name
+def mysql PRIMARY def mysql innodb_index_stats database_name
+def mysql PRIMARY def mysql innodb_index_stats index_name
+def mysql PRIMARY def mysql innodb_index_stats stat_name
+def mysql PRIMARY def mysql innodb_index_stats table_name
+def mysql PRIMARY def mysql innodb_table_stats database_name
+def mysql PRIMARY def mysql innodb_table_stats table_name
+def mysql PRIMARY def mysql plugin name
+def mysql PRIMARY def mysql proc db
+def mysql PRIMARY def mysql proc name
+def mysql PRIMARY def mysql proc type
+def mysql PRIMARY def mysql procs_priv Db
+def mysql PRIMARY def mysql procs_priv Host
+def mysql PRIMARY def mysql procs_priv Routine_name
+def mysql PRIMARY def mysql procs_priv Routine_type
+def mysql PRIMARY def mysql procs_priv User
+def mysql PRIMARY def mysql proxies_priv Host
+def mysql PRIMARY def mysql proxies_priv Proxied_host
+def mysql PRIMARY def mysql proxies_priv Proxied_user
+def mysql PRIMARY def mysql proxies_priv User
+def mysql Host def mysql roles_mapping Host
+def mysql Host def mysql roles_mapping Role
+def mysql Host def mysql roles_mapping User
+def mysql PRIMARY def mysql servers Server_name
+def mysql PRIMARY def mysql table_stats db_name
+def mysql PRIMARY def mysql table_stats table_name
+def mysql PRIMARY def mysql tables_priv Db
+def mysql PRIMARY def mysql tables_priv Host
+def mysql PRIMARY def mysql tables_priv Table_name
+def mysql PRIMARY def mysql tables_priv User
+def mysql PRIMARY def mysql time_zone Time_zone_id
+def mysql PRIMARY def mysql time_zone_leap_second Transition_time
+def mysql PRIMARY def mysql time_zone_name Name
+def mysql PRIMARY def mysql time_zone_transition Time_zone_id
+def mysql PRIMARY def mysql time_zone_transition Transition_time
+def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id
+def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id
+def mysql commit_id def mysql transaction_registry commit_id
+def mysql PRIMARY def mysql transaction_registry transaction_id
+def sys PRIMARY def sys sys_config variable
+########################################################################################
+# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
+########################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+USE db_datadict;
+CREATE TABLE t1_1
+(f1 INT NOT NULL, PRIMARY KEY(f1),
+f2 INT, INDEX f2_ind(f2))
+ENGINE = <engine_type>;
+GRANT SELECT ON t1_1 to 'testuser1'@'localhost';
+CREATE TABLE t1_2
+(f1 INT NOT NULL, PRIMARY KEY(f1),
+f2 INT, INDEX f2_ind(f2))
+ENGINE = <engine_type>;
+GRANT SELECT ON t1_2 to 'testuser2'@'localhost';
+SELECT * FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_%'
+ORDER BY constraint_catalog, constraint_schema, constraint_name,
+table_catalog, table_schema, table_name, ordinal_position;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+def db_datadict PRIMARY def db_datadict t1_1 f1 1 NULL NULL NULL NULL
+def db_datadict PRIMARY def db_datadict t1_2 f1 1 NULL NULL NULL NULL
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_%'
+ORDER BY constraint_catalog, constraint_schema, constraint_name,
+table_catalog, table_schema, table_name, ordinal_position;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+def db_datadict PRIMARY def db_datadict t1_1 f1 1 NULL NULL NULL NULL
+def db_datadict PRIMARY def db_datadict t1_2 f1 1 NULL NULL NULL NULL
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_%'
+ORDER BY constraint_catalog, constraint_schema, constraint_name,
+table_catalog, table_schema, table_name, ordinal_position;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+def db_datadict PRIMARY def db_datadict t1_1 f1 1 NULL NULL NULL NULL
+def db_datadict PRIMARY def db_datadict t1_2 f1 1 NULL NULL NULL NULL
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP TABLE t1_1;
+DROP TABLE t1_2;
+DROP DATABASE IF EXISTS db_datadict;
+########################################################################################
+# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.KEY_COLUMN_USAGE modifications
+########################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+DROP TABLE IF EXISTS test.t1_my_table;
+CREATE DATABASE db_datadict;
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_my_table%';
+table_name
+CREATE TABLE test.t1_my_table
+(f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = <engine_type>;
+SELECT * FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_table';
+CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA test
+CONSTRAINT_NAME PRIMARY
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_table
+COLUMN_NAME f1
+ORDINAL_POSITION 1
+POSITION_IN_UNIQUE_CONSTRAINT NULL
+REFERENCED_TABLE_SCHEMA NULL
+REFERENCED_TABLE_NAME NULL
+REFERENCED_COLUMN_NAME NULL
+CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA test
+CONSTRAINT_NAME PRIMARY
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_table
+COLUMN_NAME f2
+ORDINAL_POSITION 2
+POSITION_IN_UNIQUE_CONSTRAINT NULL
+REFERENCED_TABLE_SCHEMA NULL
+REFERENCED_TABLE_NAME NULL
+REFERENCED_COLUMN_NAME NULL
+SELECT DISTINCT table_name FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_table
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT DISTINCT table_name FROM information_schema.key_column_usage
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_tablex
+SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+test t1_my_tablex
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+db_datadict t1_my_tablex
+SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+table_name column_name
+t1_my_tablex f1
+t1_my_tablex f2
+ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12);
+SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+table_name column_name
+t1_my_tablex f2
+t1_my_tablex first_col
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict f2 db_datadict t1_my_tablex f2 1
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict my_idx db_datadict t1_my_tablex f2 1
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+DROP INDEX my_idx ON db_datadict.t1_my_tablex;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, column_name, ordinal_position
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY constraint_schema, constraint_name, table_schema,
+table_name, ordinal_position;
+constraint_schema constraint_name table_schema table_name column_name ordinal_position
+db_datadict my_idx db_datadict t1_my_tablex f4 1
+db_datadict my_idx db_datadict t1_my_tablex first_col 2
+db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
+db_datadict PRIMARY db_datadict t1_my_tablex f2 2
+SELECT table_name, column_name
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+table_name column_name
+t1_my_tablex f2
+t1_my_tablex f4
+t1_my_tablex first_col
+t1_my_tablex first_col
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name, column_name
+FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name column_name
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = <engine_type> AS
+SELECT 1 AS f1;
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1);
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.key_column_usage
+WHERE table_name = 't1_my_tablex';
+table_name
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+DROP TABLE IF EXISTS db_datadict.t1;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = <engine_type>;
+INSERT INTO information_schema.key_column_usage
+(constraint_schema, constraint_name, table_name)
+VALUES ( 'mysql', 'primary', 'db');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+INSERT INTO information_schema.key_column_usage
+SELECT * FROM information_schema.key_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.key_column_usage
+SET table_name = 'db1' WHERE constraint_name = 'primary';
+Got one of the listed errors
+DELETE FROM information_schema.key_column_usage WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.key_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX i3 ON information_schema.key_column_usage(table_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.key_column_usage ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.key_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.key_column_usage
+RENAME db_datadict.key_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.key_column_usage
+RENAME information_schema.xkey_column_usage;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE db_datadict.t1;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_routines.result b/mysql-test/suite/funcs_1/r/is_routines.result
new file mode 100644
index 00000000..51477e44
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_routines.result
@@ -0,0 +1,722 @@
+set sql_mode="";
+SHOW TABLES FROM information_schema LIKE 'ROUTINES';
+Tables_in_information_schema (ROUTINES)
+ROUTINES
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.ROUTINES;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.ROUTINES;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.ROUTINES;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.ROUTINES;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.8.1: INFORMATION_SCHEMA.ROUTINES layout
+#########################################################################
+DESCRIBE information_schema.ROUTINES;
+Field Type Null Key Default Extra
+SPECIFIC_NAME varchar(64) NO NULL
+ROUTINE_CATALOG varchar(512) NO NULL
+ROUTINE_SCHEMA varchar(64) NO NULL
+ROUTINE_NAME varchar(64) NO NULL
+ROUTINE_TYPE varchar(13) NO NULL
+DATA_TYPE varchar(64) NO NULL
+CHARACTER_MAXIMUM_LENGTH int(21) YES NULL
+CHARACTER_OCTET_LENGTH int(21) YES NULL
+NUMERIC_PRECISION int(21) YES NULL
+NUMERIC_SCALE int(21) YES NULL
+DATETIME_PRECISION bigint(21) unsigned YES NULL
+CHARACTER_SET_NAME varchar(64) YES NULL
+COLLATION_NAME varchar(64) YES NULL
+DTD_IDENTIFIER longtext YES NULL
+ROUTINE_BODY varchar(8) NO NULL
+ROUTINE_DEFINITION longtext YES NULL
+EXTERNAL_NAME varchar(64) YES NULL
+EXTERNAL_LANGUAGE varchar(64) YES NULL
+PARAMETER_STYLE varchar(8) NO NULL
+IS_DETERMINISTIC varchar(3) NO NULL
+SQL_DATA_ACCESS varchar(64) NO NULL
+SQL_PATH varchar(64) YES NULL
+SECURITY_TYPE varchar(7) NO NULL
+CREATED datetime NO NULL
+LAST_ALTERED datetime NO NULL
+SQL_MODE varchar(8192) NO NULL
+ROUTINE_COMMENT longtext NO NULL
+DEFINER varchar(384) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+SHOW CREATE TABLE information_schema.ROUTINES;
+Table Create Table
+ROUTINES CREATE TEMPORARY TABLE `ROUTINES` (
+ `SPECIFIC_NAME` varchar(64) NOT NULL,
+ `ROUTINE_CATALOG` varchar(512) NOT NULL,
+ `ROUTINE_SCHEMA` varchar(64) NOT NULL,
+ `ROUTINE_NAME` varchar(64) NOT NULL,
+ `ROUTINE_TYPE` varchar(13) NOT NULL,
+ `DATA_TYPE` varchar(64) NOT NULL,
+ `CHARACTER_MAXIMUM_LENGTH` int(21),
+ `CHARACTER_OCTET_LENGTH` int(21),
+ `NUMERIC_PRECISION` int(21),
+ `NUMERIC_SCALE` int(21),
+ `DATETIME_PRECISION` bigint(21) unsigned,
+ `CHARACTER_SET_NAME` varchar(64),
+ `COLLATION_NAME` varchar(64),
+ `DTD_IDENTIFIER` longtext,
+ `ROUTINE_BODY` varchar(8) NOT NULL,
+ `ROUTINE_DEFINITION` longtext,
+ `EXTERNAL_NAME` varchar(64),
+ `EXTERNAL_LANGUAGE` varchar(64),
+ `PARAMETER_STYLE` varchar(8) NOT NULL,
+ `IS_DETERMINISTIC` varchar(3) NOT NULL,
+ `SQL_DATA_ACCESS` varchar(64) NOT NULL,
+ `SQL_PATH` varchar(64),
+ `SECURITY_TYPE` varchar(7) NOT NULL,
+ `CREATED` datetime NOT NULL,
+ `LAST_ALTERED` datetime NOT NULL,
+ `SQL_MODE` varchar(8192) NOT NULL,
+ `ROUTINE_COMMENT` longtext NOT NULL,
+ `DEFINER` varchar(384) NOT NULL,
+ `CHARACTER_SET_CLIENT` varchar(32) NOT NULL,
+ `COLLATION_CONNECTION` varchar(64) NOT NULL,
+ `DATABASE_COLLATION` varchar(64) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.ROUTINES;
+Field Type Null Key Default Extra
+SPECIFIC_NAME varchar(64) NO NULL
+ROUTINE_CATALOG varchar(512) NO NULL
+ROUTINE_SCHEMA varchar(64) NO NULL
+ROUTINE_NAME varchar(64) NO NULL
+ROUTINE_TYPE varchar(13) NO NULL
+DATA_TYPE varchar(64) NO NULL
+CHARACTER_MAXIMUM_LENGTH int(21) YES NULL
+CHARACTER_OCTET_LENGTH int(21) YES NULL
+NUMERIC_PRECISION int(21) YES NULL
+NUMERIC_SCALE int(21) YES NULL
+DATETIME_PRECISION bigint(21) unsigned YES NULL
+CHARACTER_SET_NAME varchar(64) YES NULL
+COLLATION_NAME varchar(64) YES NULL
+DTD_IDENTIFIER longtext YES NULL
+ROUTINE_BODY varchar(8) NO NULL
+ROUTINE_DEFINITION longtext YES NULL
+EXTERNAL_NAME varchar(64) YES NULL
+EXTERNAL_LANGUAGE varchar(64) YES NULL
+PARAMETER_STYLE varchar(8) NO NULL
+IS_DETERMINISTIC varchar(3) NO NULL
+SQL_DATA_ACCESS varchar(64) NO NULL
+SQL_PATH varchar(64) YES NULL
+SECURITY_TYPE varchar(7) NO NULL
+CREATED datetime NO NULL
+LAST_ALTERED datetime NO NULL
+SQL_MODE varchar(8192) NO NULL
+ROUTINE_COMMENT longtext NO NULL
+DEFINER varchar(384) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+USE test;
+DROP PROCEDURE IF EXISTS sp_for_routines;
+DROP FUNCTION IF EXISTS function_for_routines;
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
+SELECT specific_name,routine_catalog,routine_schema,routine_name,routine_type,
+routine_body,external_name,external_language,parameter_style,sql_path
+FROM information_schema.routines
+WHERE routine_schema = 'test' AND
+(routine_catalog IS NOT NULL OR external_name IS NOT NULL
+OR external_language IS NOT NULL OR sql_path IS NOT NULL
+OR routine_body <> 'SQL' OR parameter_style <> 'SQL'
+ OR specific_name <> routine_name);
+specific_name routine_catalog routine_schema routine_name routine_type routine_body external_name external_language parameter_style sql_path
+function_for_routines def test function_for_routines FUNCTION SQL NULL NULL SQL NULL
+sp_for_routines def test sp_for_routines PROCEDURE SQL NULL NULL SQL NULL
+DROP PROCEDURE sp_for_routines;
+DROP FUNCTION function_for_routines;
+################################################################################
+# Testcase 3.2.8.2 + 3.2.8.3: INFORMATION_SCHEMA.ROUTINES accessible information
+################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+DROP DATABASE IF EXISTS db_datadict_2;
+CREATE DATABASE db_datadict;
+USE db_datadict;
+CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT)
+ENGINE = <other_engine_type>;
+INSERT INTO res_6_408002_1(f1, f2, f3, f4)
+VALUES('abc', 'xyz', '1989-11-09', 0815);
+DROP PROCEDURE IF EXISTS sp_6_408002_1;
+CREATE PROCEDURE sp_6_408002_1()
+BEGIN
+SELECT * FROM db_datadict.res_6_408002_1;
+END//
+CREATE DATABASE db_datadict_2;
+USE db_datadict_2;
+CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT)
+ENGINE = <other_engine_type>;
+INSERT INTO res_6_408002_2(f1, f2, f3, f4)
+VALUES('abc', 'xyz', '1990-10-03', 4711);
+DROP PROCEDURE IF EXISTS sp_6_408002_2;
+CREATE PROCEDURE sp_6_408002_2()
+BEGIN
+SELECT * FROM db_datadict_2.res_6_408002_2;
+END//
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+GRANT SELECT ON db_datadict_2.* TO 'testuser1'@'localhost';
+GRANT EXECUTE ON db_datadict_2.* TO 'testuser1'@'localhost';
+GRANT EXECUTE ON db_datadict.* TO 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser2'@'localhost';
+GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2
+TO 'testuser2'@'localhost';
+GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost';
+FLUSH PRIVILEGES;
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.routines where routine_schema <> 'sys';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+sp_6_408002_1 def db_datadict sp_6_408002_1 PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.routines where routine_schema <> 'sys';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connect testuser3, localhost, testuser3, , "*NO-ONE*";
+SELECT * FROM information_schema.routines where routine_schema <> 'sys';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+USE test;
+DROP DATABASE db_datadict;
+DROP DATABASE db_datadict_2;
+#########################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.ROUTINES modifications
+#########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+USE db_datadict;
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
+ORDER BY routine_name;
+SPECIFIC_NAME function_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME function_for_routines
+ROUTINE_TYPE FUNCTION
+DATA_TYPE int
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION 10
+NUMERIC_SCALE 0
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER int(11)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION RETURN 0
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME sp_for_routines
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION SELECT 'db_datadict'
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER;
+ALTER FUNCTION function_for_routines COMMENT 'updated comments';
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
+ORDER BY routine_name;
+SPECIFIC_NAME function_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME function_for_routines
+ROUTINE_TYPE FUNCTION
+DATA_TYPE int
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION 10
+NUMERIC_SCALE 0
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER int(11)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION RETURN 0
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT updated comments
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME sp_for_routines
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION SELECT 'db_datadict'
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+DROP PROCEDURE sp_for_routines;
+DROP FUNCTION function_for_routines;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
+ORDER BY routine_name;
+SPECIFIC_NAME function_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME function_for_routines
+ROUTINE_TYPE FUNCTION
+DATA_TYPE int
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION 10
+NUMERIC_SCALE 0
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER int(11)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION RETURN 0
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME sp_for_routines
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION SELECT 'db_datadict'
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+use test;
+DROP DATABASE db_datadict;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+#########################################################################
+# 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for
+# ROUTINE_DEFINITION column
+#########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+USE db_datadict;
+CREATE TABLE db_datadict.res_6_408004_1
+(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR)
+ENGINE = <other_engine_type>;
+INSERT INTO db_datadict.res_6_408004_1
+VALUES ('abc', 98765 , 99999999 , 98765, 10);
+CREATE TABLE db_datadict.res_6_408004_2
+(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR)
+ENGINE = <other_engine_type>;
+INSERT INTO db_datadict.res_6_408004_2
+VALUES ('abc', 98765 , 99999999 , 98765, 10);
+# Checking the max. possible length of (currently) 4 GByte is not
+# in this environment here.
+CREATE PROCEDURE sp_6_408004 ()
+BEGIN
+DECLARE done INTEGER DEFAULt 0;
+DECLARE variable_number_1 LONGTEXT;
+DECLARE variable_number_2 MEDIUMINT;
+DECLARE variable_number_3 LONGBLOB;
+DECLARE variable_number_4 REAL;
+DECLARE variable_number_5 YEAR;
+DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
+BEGIN
+OPEN cursor_number_1;
+WHILE done <> 1 DO
+FETCH cursor_number_1
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+BEGIN
+BEGIN
+SET done = 0;
+OPEN cursor_number_2;
+WHILE done <> 1 DO
+FETCH cursor_number_2
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES(variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+SET done = 0;
+OPEN cursor_number_3;
+WHILE done <> 1 DO
+FETCH cursor_number_3
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES(variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+END;
+BEGIN
+SET done = 0;
+OPEN cursor_number_4;
+WHILE done <> 1 DO
+FETCH cursor_number_4
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+BEGIN
+SET @a='test row';
+SELECT @a;
+SELECT @a;
+SELECT @a;
+END;
+BEGIN
+SET done = 0;
+OPEN cursor_number_5;
+WHILE done <> 1 DO
+FETCH cursor_number_5
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+BEGIN
+SET @a='test row';
+SELECT @a;
+SELECT @a;
+SELECT @a;
+END;
+END//
+CALL db_datadict.sp_6_408004 ();
+@a
+test row
+@a
+test row
+@a
+test row
+@a
+test row
+@a
+test row
+@a
+test row
+SELECT * FROM db_datadict.res_6_408004_2;
+f1 f2 f3 f4 f5
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+SELECT *, LENGTH(routine_definition) FROM information_schema.routines
+WHERE routine_schema = 'db_datadict';
+SPECIFIC_NAME sp_6_408004
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME sp_6_408004
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+DECLARE done INTEGER DEFAULt 0;
+DECLARE variable_number_1 LONGTEXT;
+DECLARE variable_number_2 MEDIUMINT;
+DECLARE variable_number_3 LONGBLOB;
+DECLARE variable_number_4 REAL;
+DECLARE variable_number_5 YEAR;
+DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
+BEGIN
+OPEN cursor_number_1;
+WHILE done <> 1 DO
+FETCH cursor_number_1
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+BEGIN
+BEGIN
+SET done = 0;
+OPEN cursor_number_2;
+WHILE done <> 1 DO
+FETCH cursor_number_2
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES(variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+SET done = 0;
+OPEN cursor_number_3;
+WHILE done <> 1 DO
+FETCH cursor_number_3
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES(variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+END;
+BEGIN
+SET done = 0;
+OPEN cursor_number_4;
+WHILE done <> 1 DO
+FETCH cursor_number_4
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+BEGIN
+SET @a='test row';
+SELECT @a;
+SELECT @a;
+SELECT @a;
+END;
+BEGIN
+SET done = 0;
+OPEN cursor_number_5;
+WHILE done <> 1 DO
+FETCH cursor_number_5
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+BEGIN
+SET @a='test row';
+SELECT @a;
+SELECT @a;
+SELECT @a;
+END;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED YYYY-MM-DD hh:mm:ss
+LAST_ALTERED YYYY-MM-DD hh:mm:ss
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+LENGTH(routine_definition) 2549
+DROP DATABASE db_datadict;
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+USE db_datadict;
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+USE test;
+INSERT INTO information_schema.routines (routine_name, routine_type )
+VALUES ('p2', 'procedure');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.routines SET routine_name = 'p2'
+WHERE routine_body = 'sql';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM information_schema.routines ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.routines ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX i7 ON information_schema.routines (routine_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.routines ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.routines DISCARD TABLESPACE;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.routines ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.routines RENAME db_datadict.routines;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.routines RENAME information_schema.xroutines;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_routines_embedded.result b/mysql-test/suite/funcs_1/r/is_routines_embedded.result
new file mode 100644
index 00000000..be2a3d45
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result
@@ -0,0 +1,758 @@
+set sql_mode="";
+SHOW TABLES FROM information_schema LIKE 'ROUTINES';
+Tables_in_information_schema (ROUTINES)
+ROUTINES
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.ROUTINES;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.ROUTINES;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.ROUTINES;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.ROUTINES;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.8.1: INFORMATION_SCHEMA.ROUTINES layout
+#########################################################################
+DESCRIBE information_schema.ROUTINES;
+Field Type Null Key Default Extra
+SPECIFIC_NAME varchar(64) NO NULL
+ROUTINE_CATALOG varchar(512) NO NULL
+ROUTINE_SCHEMA varchar(64) NO NULL
+ROUTINE_NAME varchar(64) NO NULL
+ROUTINE_TYPE varchar(13) NO NULL
+DATA_TYPE varchar(64) NO NULL
+CHARACTER_MAXIMUM_LENGTH int(21) YES NULL
+CHARACTER_OCTET_LENGTH int(21) YES NULL
+NUMERIC_PRECISION int(21) YES NULL
+NUMERIC_SCALE int(21) YES NULL
+DATETIME_PRECISION bigint(21) unsigned YES NULL
+CHARACTER_SET_NAME varchar(64) YES NULL
+COLLATION_NAME varchar(64) YES NULL
+DTD_IDENTIFIER longtext YES NULL
+ROUTINE_BODY varchar(8) NO NULL
+ROUTINE_DEFINITION longtext YES NULL
+EXTERNAL_NAME varchar(64) YES NULL
+EXTERNAL_LANGUAGE varchar(64) YES NULL
+PARAMETER_STYLE varchar(8) NO NULL
+IS_DETERMINISTIC varchar(3) NO NULL
+SQL_DATA_ACCESS varchar(64) NO NULL
+SQL_PATH varchar(64) YES NULL
+SECURITY_TYPE varchar(7) NO NULL
+CREATED datetime NO NULL
+LAST_ALTERED datetime NO NULL
+SQL_MODE varchar(8192) NO NULL
+ROUTINE_COMMENT longtext NO NULL
+DEFINER varchar(384) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+SHOW CREATE TABLE information_schema.ROUTINES;
+Table Create Table
+ROUTINES CREATE TEMPORARY TABLE `ROUTINES` (
+ `SPECIFIC_NAME` varchar(64) NOT NULL,
+ `ROUTINE_CATALOG` varchar(512) NOT NULL,
+ `ROUTINE_SCHEMA` varchar(64) NOT NULL,
+ `ROUTINE_NAME` varchar(64) NOT NULL,
+ `ROUTINE_TYPE` varchar(13) NOT NULL,
+ `DATA_TYPE` varchar(64) NOT NULL,
+ `CHARACTER_MAXIMUM_LENGTH` int(21),
+ `CHARACTER_OCTET_LENGTH` int(21),
+ `NUMERIC_PRECISION` int(21),
+ `NUMERIC_SCALE` int(21),
+ `DATETIME_PRECISION` bigint(21) unsigned,
+ `CHARACTER_SET_NAME` varchar(64),
+ `COLLATION_NAME` varchar(64),
+ `DTD_IDENTIFIER` longtext,
+ `ROUTINE_BODY` varchar(8) NOT NULL,
+ `ROUTINE_DEFINITION` longtext,
+ `EXTERNAL_NAME` varchar(64),
+ `EXTERNAL_LANGUAGE` varchar(64),
+ `PARAMETER_STYLE` varchar(8) NOT NULL,
+ `IS_DETERMINISTIC` varchar(3) NOT NULL,
+ `SQL_DATA_ACCESS` varchar(64) NOT NULL,
+ `SQL_PATH` varchar(64),
+ `SECURITY_TYPE` varchar(7) NOT NULL,
+ `CREATED` datetime NOT NULL,
+ `LAST_ALTERED` datetime NOT NULL,
+ `SQL_MODE` varchar(8192) NOT NULL,
+ `ROUTINE_COMMENT` longtext NOT NULL,
+ `DEFINER` varchar(384) NOT NULL,
+ `CHARACTER_SET_CLIENT` varchar(32) NOT NULL,
+ `COLLATION_CONNECTION` varchar(64) NOT NULL,
+ `DATABASE_COLLATION` varchar(64) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.ROUTINES;
+Field Type Null Key Default Extra
+SPECIFIC_NAME varchar(64) NO NULL
+ROUTINE_CATALOG varchar(512) NO NULL
+ROUTINE_SCHEMA varchar(64) NO NULL
+ROUTINE_NAME varchar(64) NO NULL
+ROUTINE_TYPE varchar(13) NO NULL
+DATA_TYPE varchar(64) NO NULL
+CHARACTER_MAXIMUM_LENGTH int(21) YES NULL
+CHARACTER_OCTET_LENGTH int(21) YES NULL
+NUMERIC_PRECISION int(21) YES NULL
+NUMERIC_SCALE int(21) YES NULL
+DATETIME_PRECISION bigint(21) unsigned YES NULL
+CHARACTER_SET_NAME varchar(64) YES NULL
+COLLATION_NAME varchar(64) YES NULL
+DTD_IDENTIFIER longtext YES NULL
+ROUTINE_BODY varchar(8) NO NULL
+ROUTINE_DEFINITION longtext YES NULL
+EXTERNAL_NAME varchar(64) YES NULL
+EXTERNAL_LANGUAGE varchar(64) YES NULL
+PARAMETER_STYLE varchar(8) NO NULL
+IS_DETERMINISTIC varchar(3) NO NULL
+SQL_DATA_ACCESS varchar(64) NO NULL
+SQL_PATH varchar(64) YES NULL
+SECURITY_TYPE varchar(7) NO NULL
+CREATED datetime NO NULL
+LAST_ALTERED datetime NO NULL
+SQL_MODE varchar(8192) NO NULL
+ROUTINE_COMMENT longtext NO NULL
+DEFINER varchar(384) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+USE test;
+DROP PROCEDURE IF EXISTS sp_for_routines;
+DROP FUNCTION IF EXISTS function_for_routines;
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
+SELECT specific_name,routine_catalog,routine_schema,routine_name,routine_type,
+routine_body,external_name,external_language,parameter_style,sql_path
+FROM information_schema.routines
+WHERE routine_schema = 'test' AND
+(routine_catalog IS NOT NULL OR external_name IS NOT NULL
+OR external_language IS NOT NULL OR sql_path IS NOT NULL
+OR routine_body <> 'SQL' OR parameter_style <> 'SQL'
+ OR specific_name <> routine_name);
+specific_name routine_catalog routine_schema routine_name routine_type routine_body external_name external_language parameter_style sql_path
+function_for_routines def test function_for_routines FUNCTION SQL NULL NULL SQL NULL
+sp_for_routines def test sp_for_routines PROCEDURE SQL NULL NULL SQL NULL
+DROP PROCEDURE sp_for_routines;
+DROP FUNCTION function_for_routines;
+################################################################################
+# Testcase 3.2.8.2 + 3.2.8.3: INFORMATION_SCHEMA.ROUTINES accessible information
+################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+DROP DATABASE IF EXISTS db_datadict_2;
+CREATE DATABASE db_datadict;
+USE db_datadict;
+CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT)
+ENGINE = <other_engine_type>;
+INSERT INTO res_6_408002_1(f1, f2, f3, f4)
+VALUES('abc', 'xyz', '1989-11-09', 0815);
+DROP PROCEDURE IF EXISTS sp_6_408002_1;
+CREATE PROCEDURE sp_6_408002_1()
+BEGIN
+SELECT * FROM db_datadict.res_6_408002_1;
+END//
+CREATE DATABASE db_datadict_2;
+USE db_datadict_2;
+CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT)
+ENGINE = <other_engine_type>;
+INSERT INTO res_6_408002_2(f1, f2, f3, f4)
+VALUES('abc', 'xyz', '1990-10-03', 4711);
+DROP PROCEDURE IF EXISTS sp_6_408002_2;
+CREATE PROCEDURE sp_6_408002_2()
+BEGIN
+SELECT * FROM db_datadict_2.res_6_408002_2;
+END//
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+GRANT SELECT ON db_datadict_2.* TO 'testuser1'@'localhost';
+GRANT EXECUTE ON db_datadict_2.* TO 'testuser1'@'localhost';
+GRANT EXECUTE ON db_datadict.* TO 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser2'@'localhost';
+GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2
+TO 'testuser2'@'localhost';
+GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost';
+FLUSH PRIVILEGES;
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.routines where routine_schema <> 'sys';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+sp_6_408002_1 def db_datadict sp_6_408002_1 PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN
+SELECT * FROM db_datadict.res_6_408002_1;
+END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN
+SELECT * FROM db_datadict_2.res_6_408002_2;
+END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8mb3 utf8mb3_general_ci latin1_swedish_ci
+check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' AND variable_name != 'THREAD_POOL_SIZE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert') AND TRIGGER_SCHEMA != 'sys'; SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA != 'sys'; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS != 'INACTIVE'; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8mb3 utf8mb3_general_ci latin1_swedish_ci
+check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8mb3 utf8mb3_general_ci latin1_swedish_ci
+AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+DropGeometryColumn def mysql DropGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.routines where routine_schema <> 'sys';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+sp_6_408002_1 def db_datadict sp_6_408002_1 PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN
+SELECT * FROM db_datadict.res_6_408002_1;
+END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN
+SELECT * FROM db_datadict_2.res_6_408002_2;
+END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8mb3 utf8mb3_general_ci latin1_swedish_ci
+check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' AND variable_name != 'THREAD_POOL_SIZE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert') AND TRIGGER_SCHEMA != 'sys'; SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA != 'sys'; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS != 'INACTIVE'; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8mb3 utf8mb3_general_ci latin1_swedish_ci
+check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8mb3 utf8mb3_general_ci latin1_swedish_ci
+AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+DropGeometryColumn def mysql DropGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connect testuser3, localhost, testuser3, , "*NO-ONE*";
+SELECT * FROM information_schema.routines where routine_schema <> 'sys';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+sp_6_408002_1 def db_datadict sp_6_408002_1 PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN
+SELECT * FROM db_datadict.res_6_408002_1;
+END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN
+SELECT * FROM db_datadict_2.res_6_408002_2;
+END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8mb3 utf8mb3_general_ci latin1_swedish_ci
+check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' AND variable_name != 'THREAD_POOL_SIZE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert') AND TRIGGER_SCHEMA != 'sys'; SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA != 'sys'; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS != 'INACTIVE'; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8mb3 utf8mb3_general_ci latin1_swedish_ci
+check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8mb3 utf8mb3_general_ci latin1_swedish_ci
+AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+DropGeometryColumn def mysql DropGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+USE test;
+DROP DATABASE db_datadict;
+DROP DATABASE db_datadict_2;
+#########################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.ROUTINES modifications
+#########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+USE db_datadict;
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
+ORDER BY routine_name;
+SPECIFIC_NAME function_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME function_for_routines
+ROUTINE_TYPE FUNCTION
+DATA_TYPE int
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION 10
+NUMERIC_SCALE 0
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER int(11)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION RETURN 0
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME sp_for_routines
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION SELECT 'db_datadict'
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER;
+ALTER FUNCTION function_for_routines COMMENT 'updated comments';
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
+ORDER BY routine_name;
+SPECIFIC_NAME function_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME function_for_routines
+ROUTINE_TYPE FUNCTION
+DATA_TYPE int
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION 10
+NUMERIC_SCALE 0
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER int(11)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION RETURN 0
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT updated comments
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME sp_for_routines
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION SELECT 'db_datadict'
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+DROP PROCEDURE sp_for_routines;
+DROP FUNCTION function_for_routines;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
+ORDER BY routine_name;
+SPECIFIC_NAME function_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME function_for_routines
+ROUTINE_TYPE FUNCTION
+DATA_TYPE int
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION 10
+NUMERIC_SCALE 0
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER int(11)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION RETURN 0
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_for_routines
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME sp_for_routines
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION SELECT 'db_datadict'
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <created>
+LAST_ALTERED <modified>
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+use test;
+DROP DATABASE db_datadict;
+SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
+SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+#########################################################################
+# 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for
+# ROUTINE_DEFINITION column
+#########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+USE db_datadict;
+CREATE TABLE db_datadict.res_6_408004_1
+(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR)
+ENGINE = <other_engine_type>;
+INSERT INTO db_datadict.res_6_408004_1
+VALUES ('abc', 98765 , 99999999 , 98765, 10);
+CREATE TABLE db_datadict.res_6_408004_2
+(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR)
+ENGINE = <other_engine_type>;
+INSERT INTO db_datadict.res_6_408004_2
+VALUES ('abc', 98765 , 99999999 , 98765, 10);
+# Checking the max. possible length of (currently) 4 GByte is not
+# in this environment here.
+CREATE PROCEDURE sp_6_408004 ()
+BEGIN
+DECLARE done INTEGER DEFAULt 0;
+DECLARE variable_number_1 LONGTEXT;
+DECLARE variable_number_2 MEDIUMINT;
+DECLARE variable_number_3 LONGBLOB;
+DECLARE variable_number_4 REAL;
+DECLARE variable_number_5 YEAR;
+DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
+BEGIN
+OPEN cursor_number_1;
+WHILE done <> 1 DO
+FETCH cursor_number_1
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+BEGIN
+BEGIN
+SET done = 0;
+OPEN cursor_number_2;
+WHILE done <> 1 DO
+FETCH cursor_number_2
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES(variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+SET done = 0;
+OPEN cursor_number_3;
+WHILE done <> 1 DO
+FETCH cursor_number_3
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES(variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+END;
+BEGIN
+SET done = 0;
+OPEN cursor_number_4;
+WHILE done <> 1 DO
+FETCH cursor_number_4
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+BEGIN
+SET @a='test row';
+SELECT @a;
+SELECT @a;
+SELECT @a;
+END;
+BEGIN
+SET done = 0;
+OPEN cursor_number_5;
+WHILE done <> 1 DO
+FETCH cursor_number_5
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+BEGIN
+SET @a='test row';
+SELECT @a;
+SELECT @a;
+SELECT @a;
+END;
+END//
+CALL db_datadict.sp_6_408004 ();
+@a
+test row
+@a
+test row
+@a
+test row
+@a
+test row
+@a
+test row
+@a
+test row
+SELECT * FROM db_datadict.res_6_408004_2;
+f1 f2 f3 f4 f5
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+abc 98765 99999999 98765 2010
+SELECT *, LENGTH(routine_definition) FROM information_schema.routines
+WHERE routine_schema = 'db_datadict';
+SPECIFIC_NAME sp_6_408004
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_datadict
+ROUTINE_NAME sp_6_408004
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+DECLARE done INTEGER DEFAULt 0;
+DECLARE variable_number_1 LONGTEXT;
+DECLARE variable_number_2 MEDIUMINT;
+DECLARE variable_number_3 LONGBLOB;
+DECLARE variable_number_4 REAL;
+DECLARE variable_number_5 YEAR;
+DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
+BEGIN
+OPEN cursor_number_1;
+WHILE done <> 1 DO
+FETCH cursor_number_1
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+BEGIN
+BEGIN
+SET done = 0;
+OPEN cursor_number_2;
+WHILE done <> 1 DO
+FETCH cursor_number_2
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES(variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+SET done = 0;
+OPEN cursor_number_3;
+WHILE done <> 1 DO
+FETCH cursor_number_3
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES(variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+END;
+BEGIN
+SET done = 0;
+OPEN cursor_number_4;
+WHILE done <> 1 DO
+FETCH cursor_number_4
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+BEGIN
+SET @a='test row';
+SELECT @a;
+SELECT @a;
+SELECT @a;
+END;
+BEGIN
+SET done = 0;
+OPEN cursor_number_5;
+WHILE done <> 1 DO
+FETCH cursor_number_5
+INTO variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5;
+IF done <> 0 THEN
+INSERT INTO res_6_408004_2
+VALUES (variable_number_1, variable_number_2, variable_number_3,
+variable_number_4, variable_number_5);
+END IF;
+END WHILE;
+END;
+BEGIN
+SET @a='test row';
+SELECT @a;
+SELECT @a;
+SELECT @a;
+END;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED YYYY-MM-DD hh:mm:ss
+LAST_ALTERED YYYY-MM-DD hh:mm:ss
+SQL_MODE
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+LENGTH(routine_definition) 2549
+DROP DATABASE db_datadict;
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+USE db_datadict;
+CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
+USE test;
+INSERT INTO information_schema.routines (routine_name, routine_type )
+VALUES ('p2', 'procedure');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.routines SET routine_name = 'p2'
+WHERE routine_body = 'sql';
+ERROR HY000: The target table routines of the UPDATE is not updatable
+DELETE FROM information_schema.routines ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.routines ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX i7 ON information_schema.routines (routine_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.routines ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.routines DISCARD TABLESPACE;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.routines ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.routines RENAME db_datadict.routines;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.routines RENAME information_schema.xroutines;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_schema_privileges.result b/mysql-test/suite/funcs_1/r/is_schema_privileges.result
new file mode 100644
index 00000000..69f78a98
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_schema_privileges.result
@@ -0,0 +1,301 @@
+SHOW TABLES FROM information_schema LIKE 'SCHEMA_PRIVILEGES';
+Tables_in_information_schema (SCHEMA_PRIVILEGES)
+SCHEMA_PRIVILEGES
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.SCHEMA_PRIVILEGES;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.SCHEMA_PRIVILEGES;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.SCHEMA_PRIVILEGES;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.SCHEMA_PRIVILEGES;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.15.1: INFORMATION_SCHEMA.SCHEMA_PRIVILEGES layout
+#########################################################################
+DESCRIBE information_schema.SCHEMA_PRIVILEGES;
+Field Type Null Key Default Extra
+GRANTEE varchar(385) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+PRIVILEGE_TYPE varchar(64) NO NULL
+IS_GRANTABLE varchar(3) NO NULL
+SHOW CREATE TABLE information_schema.SCHEMA_PRIVILEGES;
+Table Create Table
+SCHEMA_PRIVILEGES CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` (
+ `GRANTEE` varchar(385) NOT NULL,
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `PRIVILEGE_TYPE` varchar(64) NOT NULL,
+ `IS_GRANTABLE` varchar(3) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.SCHEMA_PRIVILEGES;
+Field Type Null Key Default Extra
+GRANTEE varchar(385) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+PRIVILEGE_TYPE varchar(64) NO NULL
+IS_GRANTABLE varchar(3) NO NULL
+SELECT GRANTEE, TABLE_CATALOG, TABLE_SCHEMA, PRIVILEGE_TYPE
+FROM information_schema.schema_privileges WHERE table_catalog IS NOT NULL;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE
+###############################################################################
+# Testcase 3.2.15.2-3.2.15.4 INFORMATION_SCHEMA.SCHEMA_PRIVILEGES accessibility
+###############################################################################
+DROP DATABASE IF EXISTS db_datadict_1;
+DROP DATABASE IF EXISTS db_datadict_2;
+DROP DATABASE IF EXISTS db_datadict_3;
+CREATE DATABASE db_datadict_1;
+CREATE DATABASE db_datadict_2;
+CREATE DATABASE db_datadict_3;
+CREATE TABLE db_datadict_2.t1(f1 INT, f2 INT, f3 INT)
+ENGINE = MEMORY;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+GRANT INSERT ON db_datadict_1.* TO 'testuser1'@'localhost';
+GRANT INSERT ON db_datadict_2.t1 TO 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict_4.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+GRANT SELECT ON db_datadict_3.* TO 'testuser2'@'localhost';
+GRANT SELECT ON db_datadict_1.* TO 'testuser2'@'localhost';
+connect testuser1, localhost, testuser1, ,"*NO-ONE*";
+GRANT SELECT ON db_datadict_4.* TO 'testuser2'@'localhost';
+# Root granted INSERT db_datadict_1 to me -> visible
+# Root granted SELECT db_datadict_1 to testuser2 -> invisible
+# Root granted INSERT db_datadict_2.t1 (no schema-level priv!)
+# but not db_datadict_2 to me -> invisible
+# Root granted SELECT db_datadict_3. to testuser2 but not to me -> invisible
+# Root granted SELECT db_datadict_4. to me -> visible
+# I granted SELECT db_datadict_4. to testuser2 -> invisible (reality), visible(requirement)
+# FIXME
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict_1 INSERT NO
+'testuser1'@'localhost' def db_datadict_4 SELECT YES
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT INSERT ON `db_datadict_1`.* TO `testuser1`@`localhost`
+GRANT SELECT ON `db_datadict_4`.* TO `testuser1`@`localhost` WITH GRANT OPTION
+GRANT INSERT ON `db_datadict_2`.`t1` TO `testuser1`@`localhost`
+SHOW GRANTS FOR 'testuser2'@'localhost';
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql'
+connect testuser2, localhost, testuser2, ,"*NO-ONE*";
+# Root granted SELECT db_datadict_1 to me -> visible
+# Root granted INSERT db_datadict_1 to testuser1 -> invisible
+# Root granted INSERT db_datadict_2.t1 but not db_datadict_1 to testuser1 -> invisible
+# Root granted SELECT db_datadict_3. to me -> visible
+# testuser1 granted SELECT db_datadict_4. to me -> visible
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser2'@'localhost' def db_datadict_1 SELECT NO
+'testuser2'@'localhost' def db_datadict_3 SELECT NO
+'testuser2'@'localhost' def db_datadict_4 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'testuser2'@'localhost' to database 'mysql'
+SHOW GRANTS FOR 'testuser2'@'localhost';
+Grants for testuser2@localhost
+GRANT USAGE ON *.* TO `testuser2`@`localhost`
+GRANT SELECT ON `db_datadict_3`.* TO `testuser2`@`localhost`
+GRANT SELECT ON `db_datadict_1`.* TO `testuser2`@`localhost`
+GRANT SELECT ON `db_datadict_4`.* TO `testuser2`@`localhost`
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict_1 INSERT NO
+'testuser1'@'localhost' def db_datadict_4 SELECT YES
+'testuser2'@'localhost' def db_datadict_1 SELECT NO
+'testuser2'@'localhost' def db_datadict_3 SELECT NO
+'testuser2'@'localhost' def db_datadict_4 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT INSERT ON `db_datadict_1`.* TO `testuser1`@`localhost`
+GRANT SELECT ON `db_datadict_4`.* TO `testuser1`@`localhost` WITH GRANT OPTION
+GRANT INSERT ON `db_datadict_2`.`t1` TO `testuser1`@`localhost`
+SHOW GRANTS FOR 'testuser2'@'localhost';
+Grants for testuser2@localhost
+GRANT USAGE ON *.* TO `testuser2`@`localhost`
+GRANT SELECT ON `db_datadict_3`.* TO `testuser2`@`localhost`
+GRANT SELECT ON `db_datadict_1`.* TO `testuser2`@`localhost`
+GRANT SELECT ON `db_datadict_4`.* TO `testuser2`@`localhost`
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP DATABASE db_datadict_1;
+DROP DATABASE db_datadict_2;
+DROP DATABASE db_datadict_3;
+################################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMA_PRIVILEGES modifications
+################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'the_user'@'localhost';
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON test.* TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+connect testuser1, localhost, testuser1, , test;
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+connection default;
+GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict UPDATE NO
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict UPDATE NO
+connection default;
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict SELECT NO
+'testuser1'@'localhost' def db_datadict UPDATE NO
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict SELECT NO
+'testuser1'@'localhost' def db_datadict UPDATE NO
+# Switch to connection default
+connection default;
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict SELECT YES
+'testuser1'@'localhost' def db_datadict UPDATE YES
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict SELECT YES
+'testuser1'@'localhost' def db_datadict UPDATE YES
+connection default;
+DROP SCHEMA db_datadict;
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict SELECT YES
+'testuser1'@'localhost' def db_datadict UPDATE YES
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict SELECT YES
+'testuser1'@'localhost' def db_datadict UPDATE YES
+connection default;
+REVOKE UPDATE ON db_datadict.* FROM 'testuser1'@'localhost';
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict SELECT YES
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict SELECT YES
+connection default;
+RENAME USER 'testuser1'@'localhost' TO 'the_user'@'localhost';
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'the_user'@'localhost' def db_datadict SELECT YES
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'the_user'@'localhost' def db_datadict SELECT YES
+disconnect testuser1;
+connect the_user, localhost, the_user, , test;
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'the_user'@'localhost' def db_datadict SELECT YES
+disconnect the_user;
+connection default;
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+'the_user'@'localhost' def db_datadict SELECT YES
+DROP USER 'the_user'@'localhost';
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT)
+ENGINE = <engine_type>;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+INSERT INTO information_schema.schema_privileges
+SELECT * FROM information_schema.schema_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.schema_privileges SET table_schema = 'test'
+WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.schema_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_tables
+ON information_schema.schema_privileges(table_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.schema_privileges ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.schema_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.schema_privileges
+RENAME db_datadict.schema_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.schema_privileges
+RENAME information_schema.xschema_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
diff --git a/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result b/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result
new file mode 100644
index 00000000..774b65b0
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result
@@ -0,0 +1,36 @@
+##############################################################################
+# Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information
+##############################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema IN ('information_schema','mysql','test')
+ORDER BY grantee, table_schema, privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+SHOW DATABASES LIKE 'information_schema';
+Database (information_schema)
+information_schema
+SHOW DATABASES LIKE 'mysql';
+Database (mysql)
+mysql
+SHOW DATABASES LIKE 'test';
+Database (test)
+test
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema IN ('information_schema','mysql','test')
+ORDER BY grantee, table_schema, privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
+SHOW DATABASES LIKE 'information_schema';
+Database (information_schema)
+information_schema
+SHOW DATABASES LIKE 'mysql';
+Database (mysql)
+SHOW DATABASES LIKE 'test';
+Database (test)
+connection default;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_schemata.result b/mysql-test/suite/funcs_1/r/is_schemata.result
new file mode 100644
index 00000000..1851c089
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_schemata.result
@@ -0,0 +1,194 @@
+SHOW TABLES FROM information_schema LIKE 'SCHEMATA';
+Tables_in_information_schema (SCHEMATA)
+SCHEMATA
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.SCHEMATA;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.SCHEMATA;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.SCHEMATA;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.SCHEMATA;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.9.1: INFORMATION_SCHEMA.SCHEMATA layout;
+#########################################################################
+DESCRIBE information_schema.SCHEMATA;
+Field Type Null Key Default Extra
+CATALOG_NAME varchar(512) NO NULL
+SCHEMA_NAME varchar(64) NO NULL
+DEFAULT_CHARACTER_SET_NAME varchar(32) NO NULL
+DEFAULT_COLLATION_NAME varchar(64) NO NULL
+SQL_PATH varchar(512) YES NULL
+SCHEMA_COMMENT varchar(1024) NO NULL
+SHOW CREATE TABLE information_schema.SCHEMATA;
+Table Create Table
+SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` (
+ `CATALOG_NAME` varchar(512) NOT NULL,
+ `SCHEMA_NAME` varchar(64) NOT NULL,
+ `DEFAULT_CHARACTER_SET_NAME` varchar(32) NOT NULL,
+ `DEFAULT_COLLATION_NAME` varchar(64) NOT NULL,
+ `SQL_PATH` varchar(512),
+ `SCHEMA_COMMENT` varchar(1024) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.SCHEMATA;
+Field Type Null Key Default Extra
+CATALOG_NAME varchar(512) NO NULL
+SCHEMA_NAME varchar(64) NO NULL
+DEFAULT_CHARACTER_SET_NAME varchar(32) NO NULL
+DEFAULT_COLLATION_NAME varchar(64) NO NULL
+SQL_PATH varchar(512) YES NULL
+SCHEMA_COMMENT varchar(1024) NO NULL
+SELECT catalog_name, schema_name, sql_path
+FROM information_schema.schemata
+WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL
+ORDER BY schema_name;
+catalog_name schema_name sql_path
+def information_schema NULL
+def mtr NULL
+def mysql NULL
+def performance_schema NULL
+def sys NULL
+def test NULL
+###############################################################################
+# Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information
+###############################################################################
+DROP DATABASE IF EXISTS db_datadict_1;
+DROP DATABASE IF EXISTS db_datadict_2;
+CREATE DATABASE db_datadict_1;
+CREATE DATABASE db_datadict_2;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+GRANT SELECT ON db_datadict_1.* to 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost';
+GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost';
+SELECT * FROM information_schema.schemata
+WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
+SHOW DATABASES LIKE 'db_datadict_%';
+Database (db_datadict_%)
+db_datadict_1
+db_datadict_2
+connect testuser1, localhost, testuser1, , db_datadict_1;
+SELECT * FROM information_schema.schemata
+WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+SHOW DATABASES LIKE 'db_datadict_%';
+Database (db_datadict_%)
+db_datadict_1
+connect testuser2, localhost, testuser2, , db_datadict_2;
+SELECT * FROM information_schema.schemata
+WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
+SHOW DATABASES LIKE 'db_datadict_%';
+Database (db_datadict_%)
+db_datadict_1
+db_datadict_2
+connect testuser3, localhost, testuser3, ,"*NO-ONE*";
+SELECT * FROM information_schema.schemata
+WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+SHOW DATABASES LIKE 'db_datadict_%';
+Database (db_datadict_%)
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE db_datadict_1;
+DROP DATABASE db_datadict_2;
+#################################################################################
+# Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMATA modifications
+#################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci';
+SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict latin1 latin1_swedish_ci NULL
+SELECT schema_name, default_character_set_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+schema_name default_character_set_name
+db_datadict latin1
+ALTER SCHEMA db_datadict CHARACTER SET 'utf8';
+SELECT schema_name, default_character_set_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+schema_name default_character_set_name
+db_datadict utf8mb3
+ALTER SCHEMA db_datadict CHARACTER SET 'latin1';
+SELECT schema_name, default_collation_name FROM information_schema.schemata
+WHERE schema_name = 'db_datadict';
+schema_name default_collation_name
+db_datadict latin1_swedish_ci
+ALTER SCHEMA db_datadict COLLATE 'latin1_general_cs';
+SELECT schema_name, default_collation_name FROM information_schema.schemata
+WHERE schema_name = 'db_datadict';
+schema_name default_collation_name
+db_datadict latin1_general_cs
+SELECT schema_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+schema_name
+db_datadict
+DROP DATABASE db_datadict;
+SELECT schema_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+schema_name
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci';
+INSERT INTO information_schema.schemata
+(catalog_name, schema_name, default_character_set_name, sql_path)
+VALUES (NULL, 'db1', 'latin1', NULL);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+INSERT INTO information_schema.schemata
+SELECT * FROM information_schema.schemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.schemata
+SET default_character_set_name = 'utf8'
+WHERE schema_name = 'db_datadict';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.schemata SET catalog_name = 't_4711';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.schemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX i1 ON information_schema.schemata(schema_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.schemata ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.schemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.schemata RENAME db_datadict.schemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.schemata RENAME information_schema.xschemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_schemata_embedded.result b/mysql-test/suite/funcs_1/r/is_schemata_embedded.result
new file mode 100644
index 00000000..fd7a86d4
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_schemata_embedded.result
@@ -0,0 +1,200 @@
+SHOW TABLES FROM information_schema LIKE 'SCHEMATA';
+Tables_in_information_schema (SCHEMATA)
+SCHEMATA
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.SCHEMATA;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.SCHEMATA;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.SCHEMATA;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.SCHEMATA;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.9.1: INFORMATION_SCHEMA.SCHEMATA layout;
+#########################################################################
+DESCRIBE information_schema.SCHEMATA;
+Field Type Null Key Default Extra
+CATALOG_NAME varchar(512) NO NULL
+SCHEMA_NAME varchar(64) NO NULL
+DEFAULT_CHARACTER_SET_NAME varchar(32) NO NULL
+DEFAULT_COLLATION_NAME varchar(64) NO NULL
+SQL_PATH varchar(512) YES NULL
+SCHEMA_COMMENT varchar(1024) NO NULL
+SHOW CREATE TABLE information_schema.SCHEMATA;
+Table Create Table
+SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` (
+ `CATALOG_NAME` varchar(512) NOT NULL,
+ `SCHEMA_NAME` varchar(64) NOT NULL,
+ `DEFAULT_CHARACTER_SET_NAME` varchar(32) NOT NULL,
+ `DEFAULT_COLLATION_NAME` varchar(64) NOT NULL,
+ `SQL_PATH` varchar(512),
+ `SCHEMA_COMMENT` varchar(1024) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.SCHEMATA;
+Field Type Null Key Default Extra
+CATALOG_NAME varchar(512) NO NULL
+SCHEMA_NAME varchar(64) NO NULL
+DEFAULT_CHARACTER_SET_NAME varchar(32) NO NULL
+DEFAULT_COLLATION_NAME varchar(64) NO NULL
+SQL_PATH varchar(512) YES NULL
+SCHEMA_COMMENT varchar(1024) NO NULL
+SELECT catalog_name, schema_name, sql_path
+FROM information_schema.schemata
+WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL
+ORDER BY schema_name;
+catalog_name schema_name sql_path
+def information_schema NULL
+def mtr NULL
+def mysql NULL
+def performance_schema NULL
+def sys NULL
+def test NULL
+###############################################################################
+# Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information
+###############################################################################
+DROP DATABASE IF EXISTS db_datadict_1;
+DROP DATABASE IF EXISTS db_datadict_2;
+CREATE DATABASE db_datadict_1;
+CREATE DATABASE db_datadict_2;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+GRANT SELECT ON db_datadict_1.* to 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost';
+GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost';
+SELECT * FROM information_schema.schemata
+WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
+SHOW DATABASES LIKE 'db_datadict_%';
+Database (db_datadict_%)
+db_datadict_1
+db_datadict_2
+connect testuser1, localhost, testuser1, , db_datadict_1;
+SELECT * FROM information_schema.schemata
+WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
+SHOW DATABASES LIKE 'db_datadict_%';
+Database (db_datadict_%)
+db_datadict_1
+db_datadict_2
+connect testuser2, localhost, testuser2, , db_datadict_2;
+SELECT * FROM information_schema.schemata
+WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
+SHOW DATABASES LIKE 'db_datadict_%';
+Database (db_datadict_%)
+db_datadict_1
+db_datadict_2
+connect testuser3, localhost, testuser3, ,"*NO-ONE*";
+SELECT * FROM information_schema.schemata
+WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
+SHOW DATABASES LIKE 'db_datadict_%';
+Database (db_datadict_%)
+db_datadict_1
+db_datadict_2
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE db_datadict_1;
+DROP DATABASE db_datadict_2;
+#################################################################################
+# Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMATA modifications
+#################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci';
+SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict latin1 latin1_swedish_ci NULL
+SELECT schema_name, default_character_set_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+schema_name default_character_set_name
+db_datadict latin1
+ALTER SCHEMA db_datadict CHARACTER SET 'utf8';
+SELECT schema_name, default_character_set_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+schema_name default_character_set_name
+db_datadict utf8mb3
+ALTER SCHEMA db_datadict CHARACTER SET 'latin1';
+SELECT schema_name, default_collation_name FROM information_schema.schemata
+WHERE schema_name = 'db_datadict';
+schema_name default_collation_name
+db_datadict latin1_swedish_ci
+ALTER SCHEMA db_datadict COLLATE 'latin1_general_cs';
+SELECT schema_name, default_collation_name FROM information_schema.schemata
+WHERE schema_name = 'db_datadict';
+schema_name default_collation_name
+db_datadict latin1_general_cs
+SELECT schema_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+schema_name
+db_datadict
+DROP DATABASE db_datadict;
+SELECT schema_name
+FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+schema_name
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci';
+INSERT INTO information_schema.schemata
+(catalog_name, schema_name, default_character_set_name, sql_path)
+VALUES (NULL, 'db1', 'latin1', NULL);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+INSERT INTO information_schema.schemata
+SELECT * FROM information_schema.schemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.schemata
+SET default_character_set_name = 'utf8'
+WHERE schema_name = 'db_datadict';
+ERROR HY000: The target table schemata of the UPDATE is not updatable
+UPDATE information_schema.schemata SET catalog_name = 't_4711';
+ERROR HY000: The target table schemata of the UPDATE is not updatable
+DELETE FROM information_schema.schemata WHERE schema_name = 'db_datadict';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.schemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX i1 ON information_schema.schemata(schema_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.schemata ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.schemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.schemata RENAME db_datadict.schemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.schemata RENAME information_schema.xschemata;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result b/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result
new file mode 100644
index 00000000..4a18f7a0
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result
@@ -0,0 +1,40 @@
+#################################################################################
+# Testcases 3.2.9.2 + 3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information
+#################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.schemata
+WHERE schema_name IN ('information_schema','mysql','test')
+ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def information_schema utf8mb3 utf8mb3_general_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def test latin1 latin1_swedish_ci NULL
+SHOW DATABASES LIKE 'information_schema';
+Database (information_schema)
+information_schema
+SHOW DATABASES LIKE 'mysql';
+Database (mysql)
+mysql
+SHOW DATABASES LIKE 'test';
+Database (test)
+test
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.schemata
+WHERE schema_name IN ('information_schema','mysql','test')
+ORDER BY schema_name;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def information_schema utf8mb3 utf8mb3_general_ci NULL
+SHOW DATABASES LIKE 'information_schema';
+Database (information_schema)
+information_schema
+SHOW DATABASES LIKE 'mysql';
+Database (mysql)
+SHOW DATABASES LIKE 'test';
+Database (test)
+connection default;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result
new file mode 100644
index 00000000..809c287d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_statistics.result
@@ -0,0 +1,439 @@
+SHOW TABLES FROM information_schema LIKE 'STATISTICS';
+Tables_in_information_schema (STATISTICS)
+STATISTICS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.STATISTICS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.STATISTICS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.STATISTICS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.STATISTICS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.14.1: INFORMATION_SCHEMA.STATISTICS layout
+#########################################################################
+DESCRIBE information_schema.STATISTICS;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+NON_UNIQUE bigint(1) NO NULL
+INDEX_SCHEMA varchar(64) NO NULL
+INDEX_NAME varchar(64) NO NULL
+SEQ_IN_INDEX bigint(2) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+COLLATION varchar(1) YES NULL
+CARDINALITY bigint(21) YES NULL
+SUB_PART bigint(3) YES NULL
+PACKED varchar(10) YES NULL
+NULLABLE varchar(3) NO NULL
+INDEX_TYPE varchar(16) NO NULL
+COMMENT varchar(16) YES NULL
+INDEX_COMMENT varchar(1024) NO NULL
+IGNORED varchar(3) NO NULL
+SHOW CREATE TABLE information_schema.STATISTICS;
+Table Create Table
+STATISTICS CREATE TEMPORARY TABLE `STATISTICS` (
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `NON_UNIQUE` bigint(1) NOT NULL,
+ `INDEX_SCHEMA` varchar(64) NOT NULL,
+ `INDEX_NAME` varchar(64) NOT NULL,
+ `SEQ_IN_INDEX` bigint(2) NOT NULL,
+ `COLUMN_NAME` varchar(64) NOT NULL,
+ `COLLATION` varchar(1),
+ `CARDINALITY` bigint(21),
+ `SUB_PART` bigint(3),
+ `PACKED` varchar(10),
+ `NULLABLE` varchar(3) NOT NULL,
+ `INDEX_TYPE` varchar(16) NOT NULL,
+ `COMMENT` varchar(16),
+ `INDEX_COMMENT` varchar(1024) NOT NULL,
+ `IGNORED` varchar(3) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.STATISTICS;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+NON_UNIQUE bigint(1) NO NULL
+INDEX_SCHEMA varchar(64) NO NULL
+INDEX_NAME varchar(64) NO NULL
+SEQ_IN_INDEX bigint(2) NO NULL
+COLUMN_NAME varchar(64) NO NULL
+COLLATION varchar(1) YES NULL
+CARDINALITY bigint(21) YES NULL
+SUB_PART bigint(3) YES NULL
+PACKED varchar(10) YES NULL
+NULLABLE varchar(3) NO NULL
+INDEX_TYPE varchar(16) NO NULL
+COMMENT varchar(16) YES NULL
+INDEX_COMMENT varchar(1024) NO NULL
+IGNORED varchar(3) NO NULL
+SELECT table_catalog, table_schema, table_name, index_schema, index_name
+FROM information_schema.statistics WHERE table_catalog IS NOT NULL
+ORDER BY table_schema, table_name, index_schema, index_name;
+table_catalog table_schema table_name index_schema index_name
+def mysql columns_priv mysql PRIMARY
+def mysql columns_priv mysql PRIMARY
+def mysql columns_priv mysql PRIMARY
+def mysql columns_priv mysql PRIMARY
+def mysql columns_priv mysql PRIMARY
+def mysql column_stats mysql PRIMARY
+def mysql column_stats mysql PRIMARY
+def mysql column_stats mysql PRIMARY
+def mysql db mysql PRIMARY
+def mysql db mysql PRIMARY
+def mysql db mysql PRIMARY
+def mysql db mysql User
+def mysql event mysql PRIMARY
+def mysql event mysql PRIMARY
+def mysql func mysql PRIMARY
+def mysql global_priv mysql PRIMARY
+def mysql global_priv mysql PRIMARY
+def mysql gtid_slave_pos mysql PRIMARY
+def mysql gtid_slave_pos mysql PRIMARY
+def mysql help_category mysql name
+def mysql help_category mysql PRIMARY
+def mysql help_keyword mysql name
+def mysql help_keyword mysql PRIMARY
+def mysql help_relation mysql help_topic_id
+def mysql help_relation mysql PRIMARY
+def mysql help_relation mysql PRIMARY
+def mysql help_topic mysql name
+def mysql help_topic mysql PRIMARY
+def mysql index_stats mysql PRIMARY
+def mysql index_stats mysql PRIMARY
+def mysql index_stats mysql PRIMARY
+def mysql index_stats mysql PRIMARY
+def mysql plugin mysql PRIMARY
+def mysql proc mysql PRIMARY
+def mysql proc mysql PRIMARY
+def mysql proc mysql PRIMARY
+def mysql procs_priv mysql Grantor
+def mysql procs_priv mysql PRIMARY
+def mysql procs_priv mysql PRIMARY
+def mysql procs_priv mysql PRIMARY
+def mysql procs_priv mysql PRIMARY
+def mysql procs_priv mysql PRIMARY
+def mysql proxies_priv mysql Grantor
+def mysql proxies_priv mysql PRIMARY
+def mysql proxies_priv mysql PRIMARY
+def mysql proxies_priv mysql PRIMARY
+def mysql proxies_priv mysql PRIMARY
+def mysql roles_mapping mysql Host
+def mysql roles_mapping mysql Host
+def mysql roles_mapping mysql Host
+def mysql servers mysql PRIMARY
+def mysql tables_priv mysql Grantor
+def mysql tables_priv mysql PRIMARY
+def mysql tables_priv mysql PRIMARY
+def mysql tables_priv mysql PRIMARY
+def mysql tables_priv mysql PRIMARY
+def mysql table_stats mysql PRIMARY
+def mysql table_stats mysql PRIMARY
+def mysql time_zone mysql PRIMARY
+def mysql time_zone_leap_second mysql PRIMARY
+def mysql time_zone_name mysql PRIMARY
+def mysql time_zone_transition mysql PRIMARY
+def mysql time_zone_transition mysql PRIMARY
+def mysql time_zone_transition_type mysql PRIMARY
+def mysql time_zone_transition_type mysql PRIMARY
+def sys sys_config sys PRIMARY
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+####################################################################################
+# Testcase 3.2.14.2 + 3.2.14.3: INFORMATION_SCHEMA.STATISTICS accessible information
+####################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+DROP DATABASE IF EXISTS db_datadict_2;
+CREATE DATABASE db_datadict;
+CREATE DATABASE db_datadict_2;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+GRANT ALL ON test.* TO 'testuser1'@'localhost';
+GRANT ALL ON test.* TO 'testuser2'@'localhost';
+CREATE TABLE db_datadict.t1
+(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2))
+ENGINE = <engine_type>;
+CREATE TABLE db_datadict.t2
+(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2))
+ENGINE = <engine_type>;
+CREATE TABLE db_datadict_2.t3
+(f1 INT NOT NULL, f2 INT, f5 DATE,
+PRIMARY KEY(f1), INDEX f2f1_ind(f2,f1), UNIQUE(f5))
+ENGINE = MEMORY;
+CREATE TABLE db_datadict_2.t4
+(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2))
+ENGINE = MEMORY;
+SELECT * FROM information_schema.statistics
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def db_datadict t1 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH NO
+def db_datadict t1 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+def db_datadict t2 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH NO
+def db_datadict t2 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+def db_datadict_2 t3 1 db_datadict_2 f2f1_ind 1 f2 NULL NULL NULL NULL YES HASH NO
+def db_datadict_2 t3 1 db_datadict_2 f2f1_ind 2 f1 NULL 0 NULL NULL HASH NO
+def db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH NO
+def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+def db_datadict_2 t4 1 db_datadict_2 f2_ind 1 f2 NULL 0 NULL NULL YES HASH NO
+def db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+SHOW GRANTS FOR 'testuser2'@'localhost';
+Grants for testuser2@localhost
+GRANT USAGE ON *.* TO `testuser2`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser2`@`localhost`
+connect testuser1, localhost, testuser1, , test;
+SELECT * FROM information_schema.statistics
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+SHOW GRANTS FOR 'testuser2'@'localhost';
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql'
+connect testuser2, localhost, testuser2, , test;
+SELECT * FROM information_schema.statistics
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+SHOW GRANTS FOR 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'testuser2'@'localhost' to database 'mysql'
+SHOW GRANTS FOR 'testuser2'@'localhost';
+Grants for testuser2@localhost
+GRANT USAGE ON *.* TO `testuser2`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser2`@`localhost`
+connection default;
+GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost' WITH GRANT OPTION;
+GRANT SELECT(f1,f5) ON db_datadict_2.t3 TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.statistics
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def db_datadict t1 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH NO
+def db_datadict t1 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+def db_datadict t2 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH NO
+def db_datadict t2 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+def db_datadict_2 t3 1 db_datadict_2 f2f1_ind 1 f2 NULL NULL NULL NULL YES HASH NO
+def db_datadict_2 t3 1 db_datadict_2 f2f1_ind 2 f1 NULL 0 NULL NULL HASH NO
+def db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH NO
+def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+def db_datadict_2 t4 1 db_datadict_2 f2_ind 1 f2 NULL 0 NULL NULL YES HASH NO
+def db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
+SHOW GRANTS FOR 'testuser2'@'localhost';
+Grants for testuser2@localhost
+GRANT USAGE ON *.* TO `testuser2`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser2`@`localhost`
+connection testuser1;
+SELECT * FROM information_schema.statistics
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def db_datadict t1 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH NO
+def db_datadict t1 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+def db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH NO
+def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
+SHOW GRANTS FOR 'testuser2'@'localhost';
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql'
+connection testuser2;
+SELECT * FROM information_schema.statistics
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+SHOW GRANTS FOR 'testuser1'@'localhost';
+ERROR 42000: Access denied for user 'testuser2'@'localhost' to database 'mysql'
+SHOW GRANTS FOR 'testuser2'@'localhost';
+Grants for testuser2@localhost
+GRANT USAGE ON *.* TO `testuser2`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser2`@`localhost`
+connection default;
+REVOKE SELECT,GRANT OPTION ON db_datadict.t1 FROM 'testuser1'@'localhost';
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+connection testuser1;
+SELECT * FROM information_schema.statistics
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH NO
+def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
+GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP DATABASE db_datadict;
+DROP DATABASE db_datadict_2;
+#########################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.STATISTICS modifications
+#########################################################################
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE test.t1_1 (f1 BIGINT,
+f2 TEXT, f2x TEXT, f3 CHAR(10), f3x CHAR(10), f4 BIGINT, f4x BIGINT,
+f5 POINT, f5x POINT NOT NULL)
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = <other_engine_type>;
+CREATE TABLE test.t1_2 (f1 BIGINT, f2 BIGINT)
+ENGINE = <engine_type>;
+SELECT table_name FROM information_schema.statistics
+WHERE table_name LIKE 't1_%';
+table_name
+ALTER TABLE test.t1_1 ADD PRIMARY KEY (f1,f3);
+SELECT * FROM information_schema.statistics
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def test t1_1 0 test PRIMARY 1 f1 A NULL NULL NULL BTREE NO
+def test t1_1 0 test PRIMARY 2 f3 A 0 NULL NULL BTREE NO
+ALTER TABLE test.t1_1 DROP PRIMARY KEY;
+SELECT table_name FROM information_schema.statistics
+WHERE table_name LIKE 't1_%';
+table_name
+ALTER TABLE test.t1_1 ADD PRIMARY KEY (f1);
+SELECT * FROM information_schema.statistics
+WHERE table_name LIKE 't1_%';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def test t1_1 0 test PRIMARY 1 f1 A 0 NULL NULL BTREE NO
+ALTER TABLE test.t1_1 ADD INDEX (f4);
+CREATE INDEX f3_f1 ON test.t1_1 (f3,f1);
+CREATE UNIQUE INDEX f4x_uni ON test.t1_1 (f4x);
+CREATE INDEX f2_hash USING HASH ON test.t1_2 (f2);
+CREATE INDEX f1_idx ON test.t1_2 (f1) COMMENT = 'COMMENT';
+ERROR 42000: 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 '= 'COMMENT'' at line 1
+CREATE INDEX not_null ON test.t1_1 (f3x);
+CREATE INDEX f2_prefix ON test.t1_1 (f2(20));
+SELECT * FROM information_schema.statistics
+WHERE table_name LIKE 't1_%' AND index_name <> 'PRIMARY'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def test t1_1 1 test f2_prefix 1 f2 A NULL 20 NULL YES BTREE NO
+def test t1_1 1 test f3_f1 1 f3 A NULL NULL NULL BTREE NO
+def test t1_1 1 test f3_f1 2 f1 A NULL NULL NULL BTREE NO
+def test t1_1 1 test f4 1 f4 A NULL NULL NULL YES BTREE NO
+def test t1_1 0 test f4x_uni 1 f4x A NULL NULL NULL YES BTREE NO
+def test t1_1 1 test not_null 1 f3x A NULL NULL NULL YES BTREE NO
+def test t1_2 1 test f2_hash 1 f2 NULL 0 NULL NULL YES HASH NO
+DROP TABLE test.t1_2;
+SELECT DISTINCT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1';
+table_name
+t1_1
+RENAME TABLE test.t1_1 TO test.t1_1x;
+SELECT DISTINCT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+table_name
+t1_1x
+SELECT DISTINCT table_schema,table_name FROM information_schema.statistics
+WHERE table_name LIKE 't1_1%';
+table_schema table_name
+test t1_1x
+RENAME TABLE test.t1_1x TO db_datadict.t1_1x;
+SELECT DISTINCT table_schema,table_name FROM information_schema.statistics
+WHERE table_name LIKE 't1_1%';
+table_schema table_name
+db_datadict t1_1x
+SELECT DISTINCT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+table_name
+t1_1x
+DROP TABLE db_datadict.t1_1x;
+SELECT DISTINCT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+table_name
+CREATE TEMPORARY TABLE test.t1_1x (PRIMARY KEY(f1,f2))
+ENGINE = <engine_type>
+AS SELECT 1 AS f1, 2 AS f2;
+SELECT * FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+DROP TEMPORARY TABLE test.t1_1x;
+CREATE TABLE db_datadict.t1_1x (PRIMARY KEY(f1))
+ENGINE = <engine_type>
+AS SELECT 1 AS f1, 2 AS f2;
+SELECT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+table_name
+t1_1x
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+table_name
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = <engine_type>;
+INSERT INTO information_schema.statistics
+SELECT * FROM information_schema.statistics;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.statistics SET table_schema = 'test'
+WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM information_schema.statistics WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.statistics;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_statistics
+ON information_schema.statistics(table_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.statistics DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.statistics ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.statistics;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.statistics RENAME db_datadict.statistics;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.statistics RENAME information_schema.xstatistics;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_statistics_is.result b/mysql-test/suite/funcs_1/r/is_statistics_is.result
new file mode 100644
index 00000000..7e1d3d6a
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_statistics_is.result
@@ -0,0 +1,18 @@
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON db_datadict.* TO testuser1@localhost;
+SELECT * FROM information_schema.statistics
+WHERE table_schema = 'information_schema'
+ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+connect testuser1,localhost,testuser1,,db_datadict;
+SELECT * FROM information_schema.statistics
+WHERE table_schema = 'information_schema'
+ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
new file mode 100644
index 00000000..5a0e0865
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
@@ -0,0 +1,94 @@
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON db_datadict.* TO testuser1@localhost;
+SELECT * FROM information_schema.statistics
+WHERE table_schema = 'mysql'
+ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE NO
+def mysql column_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE NO
+def mysql column_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql column_stats 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE NO
+def mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE NO
+def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE NO
+def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE NO
+def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE NO
+def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE NO
+def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE NO
+def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE NO
+def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE NO
+def mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE NO
+def mysql help_keyword 0 mysql name 1 name A #CARD# NULL NULL BTREE NO
+def mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE NO
+def mysql help_relation 1 mysql help_topic_id 1 help_topic_id A #CARD# NULL NULL BTREE NO
+def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE NO
+def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE NO
+def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE NO
+def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 1 database_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 4 stat_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_table_stats 0 mysql PRIMARY 1 database_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE NO
+def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE NO
+def mysql proc 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE NO
+def mysql proc 0 mysql PRIMARY 3 type A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 3 Proxied_host A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 4 Proxied_user A #CARD# NULL NULL BTREE NO
+def mysql roles_mapping 0 mysql Host 1 Host A #CARD# NULL NULL BTREE NO
+def mysql roles_mapping 0 mysql Host 2 User A #CARD# NULL NULL BTREE NO
+def mysql roles_mapping 0 mysql Host 3 Role A #CARD# NULL NULL BTREE NO
+def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE NO
+def mysql table_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE NO
+def mysql table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE NO
+def mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE NO
+def mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 1 mysql begin_timestamp 1 begin_timestamp A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE NO
+connect testuser1,localhost,testuser1,,db_datadict;
+SELECT * FROM information_schema.statistics
+WHERE table_schema = 'mysql'
+ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
new file mode 100644
index 00000000..651fb286
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
@@ -0,0 +1,170 @@
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON db_datadict.* TO testuser1@localhost;
+SELECT * FROM information_schema.statistics
+WHERE table_schema = 'mysql'
+ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE NO
+def mysql column_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE NO
+def mysql column_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql column_stats 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE NO
+def mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE NO
+def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE NO
+def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE NO
+def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE NO
+def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE NO
+def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE NO
+def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE NO
+def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE NO
+def mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE NO
+def mysql help_keyword 0 mysql name 1 name A #CARD# NULL NULL BTREE NO
+def mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE NO
+def mysql help_relation 1 mysql help_topic_id 1 help_topic_id A #CARD# NULL NULL BTREE NO
+def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE NO
+def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE NO
+def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE NO
+def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 1 database_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 4 stat_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_table_stats 0 mysql PRIMARY 1 database_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE NO
+def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE NO
+def mysql proc 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE NO
+def mysql proc 0 mysql PRIMARY 3 type A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 3 Proxied_host A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 4 Proxied_user A #CARD# NULL NULL BTREE NO
+def mysql roles_mapping 0 mysql Host 1 Host A #CARD# NULL NULL BTREE NO
+def mysql roles_mapping 0 mysql Host 2 User A #CARD# NULL NULL BTREE NO
+def mysql roles_mapping 0 mysql Host 3 Role A #CARD# NULL NULL BTREE NO
+def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE NO
+def mysql table_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE NO
+def mysql table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE NO
+def mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE NO
+def mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 1 mysql begin_timestamp 1 begin_timestamp A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE NO
+connect testuser1,localhost,testuser1,,db_datadict;
+SELECT * FROM information_schema.statistics
+WHERE table_schema = 'mysql'
+ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
+def mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE NO
+def mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE NO
+def mysql column_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE NO
+def mysql column_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql column_stats 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE NO
+def mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE NO
+def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE NO
+def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE NO
+def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE NO
+def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE NO
+def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE NO
+def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE NO
+def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE NO
+def mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE NO
+def mysql help_keyword 0 mysql name 1 name A #CARD# NULL NULL BTREE NO
+def mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE NO
+def mysql help_relation 1 mysql help_topic_id 1 help_topic_id A #CARD# NULL NULL BTREE NO
+def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE NO
+def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE NO
+def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE NO
+def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE NO
+def mysql index_stats 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 1 database_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_index_stats 0 mysql PRIMARY 4 stat_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_table_stats 0 mysql PRIMARY 1 database_name A #CARD# NULL NULL BTREE NO
+def mysql innodb_table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE NO
+def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE NO
+def mysql proc 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE NO
+def mysql proc 0 mysql PRIMARY 3 type A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE NO
+def mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 3 Proxied_host A #CARD# NULL NULL BTREE NO
+def mysql proxies_priv 0 mysql PRIMARY 4 Proxied_user A #CARD# NULL NULL BTREE NO
+def mysql roles_mapping 0 mysql Host 1 Host A #CARD# NULL NULL BTREE NO
+def mysql roles_mapping 0 mysql Host 2 User A #CARD# NULL NULL BTREE NO
+def mysql roles_mapping 0 mysql Host 3 Role A #CARD# NULL NULL BTREE NO
+def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NO
+def mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE NO
+def mysql table_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE NO
+def mysql table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE NO
+def mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE NO
+def mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE NO
+def mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE NO
+def mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 1 mysql begin_timestamp 1 begin_timestamp A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE NO
+def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE NO
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result
new file mode 100644
index 00000000..85e09cef
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result
@@ -0,0 +1,335 @@
+SHOW TABLES FROM information_schema LIKE 'TABLE_CONSTRAINTS';
+Tables_in_information_schema (TABLE_CONSTRAINTS)
+TABLE_CONSTRAINTS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.TABLE_CONSTRAINTS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TABLE_CONSTRAINTS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.TABLE_CONSTRAINTS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.TABLE_CONSTRAINTS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.10.1: INFORMATION_SCHEMA.TABLE_CONSTRAINTS layout
+#########################################################################
+DESCRIBE information_schema.TABLE_CONSTRAINTS;
+Field Type Null Key Default Extra
+CONSTRAINT_CATALOG varchar(512) NO NULL
+CONSTRAINT_SCHEMA varchar(64) NO NULL
+CONSTRAINT_NAME varchar(64) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+CONSTRAINT_TYPE varchar(64) NO NULL
+SHOW CREATE TABLE information_schema.TABLE_CONSTRAINTS;
+Table Create Table
+TABLE_CONSTRAINTS CREATE TEMPORARY TABLE `TABLE_CONSTRAINTS` (
+ `CONSTRAINT_CATALOG` varchar(512) NOT NULL,
+ `CONSTRAINT_SCHEMA` varchar(64) NOT NULL,
+ `CONSTRAINT_NAME` varchar(64) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `CONSTRAINT_TYPE` varchar(64) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.TABLE_CONSTRAINTS;
+Field Type Null Key Default Extra
+CONSTRAINT_CATALOG varchar(512) NO NULL
+CONSTRAINT_SCHEMA varchar(64) NO NULL
+CONSTRAINT_NAME varchar(64) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+CONSTRAINT_TYPE varchar(64) NO NULL
+SELECT constraint_catalog, constraint_schema, constraint_name,
+table_schema, table_name
+FROM information_schema.table_constraints
+WHERE constraint_catalog IS NOT NULL
+ORDER BY constraint_schema, table_name, constraint_name;
+constraint_catalog constraint_schema constraint_name table_schema table_name
+def mysql PRIMARY mysql columns_priv
+def mysql PRIMARY mysql column_stats
+def mysql PRIMARY mysql db
+def mysql PRIMARY mysql event
+def mysql PRIMARY mysql func
+def mysql PRIMARY mysql global_priv
+def mysql Priv mysql global_priv
+def mysql PRIMARY mysql gtid_slave_pos
+def mysql name mysql help_category
+def mysql PRIMARY mysql help_category
+def mysql name mysql help_keyword
+def mysql PRIMARY mysql help_keyword
+def mysql PRIMARY mysql help_relation
+def mysql name mysql help_topic
+def mysql PRIMARY mysql help_topic
+def mysql PRIMARY mysql index_stats
+def mysql PRIMARY mysql innodb_index_stats
+def mysql PRIMARY mysql innodb_table_stats
+def mysql PRIMARY mysql plugin
+def mysql PRIMARY mysql proc
+def mysql PRIMARY mysql procs_priv
+def mysql PRIMARY mysql proxies_priv
+def mysql Host mysql roles_mapping
+def mysql PRIMARY mysql servers
+def mysql PRIMARY mysql tables_priv
+def mysql PRIMARY mysql table_stats
+def mysql PRIMARY mysql time_zone
+def mysql PRIMARY mysql time_zone_leap_second
+def mysql PRIMARY mysql time_zone_name
+def mysql PRIMARY mysql time_zone_transition
+def mysql PRIMARY mysql time_zone_transition_type
+def mysql commit_id mysql transaction_registry
+def mysql PRIMARY mysql transaction_registry
+def sys PRIMARY sys sys_config
+#########################################################################################
+# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information
+#########################################################################################
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT,
+f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2))
+ENGINE = <some_engine_type>;
+CREATE UNIQUE INDEX my_idx1 ON db_datadict.t1(f6,f1);
+CREATE UNIQUE INDEX my_idx2 ON db_datadict.t1(f3);
+CREATE TABLE db_datadict.t2 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT,
+f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2))
+ENGINE = <some_engine_type>;
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT(f5), UPDATE(f6) ON db_datadict.t1 TO 'testuser1'@'localhost';
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT SELECT (`f5`), UPDATE (`f6`) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
+SELECT * FROM information_schema.table_constraints
+WHERE table_schema = 'db_datadict'
+ORDER BY table_schema,table_name, constraint_name;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+def db_datadict my_idx1 db_datadict t1 UNIQUE
+def db_datadict my_idx2 db_datadict t1 UNIQUE
+def db_datadict PRIMARY db_datadict t1 PRIMARY KEY
+def db_datadict PRIMARY db_datadict t2 PRIMARY KEY
+SHOW INDEXES FROM db_datadict.t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
+t1 0 PRIMARY 1 f1 ### ### ### ### ### ### ### NO
+t1 0 PRIMARY 2 f2 ### ### ### ### ### ### ### NO
+t1 0 my_idx1 1 f6 ### ### ### ### ### ### ### NO
+t1 0 my_idx1 2 f1 ### ### ### ### ### ### ### NO
+t1 0 my_idx2 1 f3 ### ### ### ### ### ### ### NO
+SHOW INDEXES FROM db_datadict.t2;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
+t2 0 PRIMARY 1 f1 ### ### ### ### ### ### ### NO
+t2 0 PRIMARY 2 f2 ### ### ### ### ### ### ### NO
+connect testuser1, localhost, testuser1, , db_datadict;
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT SELECT (`f5`), UPDATE (`f6`) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
+SELECT * FROM information_schema.table_constraints
+WHERE table_schema = 'db_datadict'
+ORDER BY table_schema,table_name, constraint_name;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+def db_datadict my_idx1 db_datadict t1 UNIQUE
+def db_datadict my_idx2 db_datadict t1 UNIQUE
+def db_datadict PRIMARY db_datadict t1 PRIMARY KEY
+SHOW INDEXES FROM db_datadict.t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
+SHOW INDEXES FROM db_datadict.t2;
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `db_datadict`.`t2`
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
+#########################################################################################
+# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_CONSTRAINTS modifications
+#########################################################################################
+CREATE DATABASE db_datadict;
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name LIKE 't1_my_table%';
+table_name
+CREATE TABLE test.t1_my_table
+(f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = <engine_type>;
+SELECT constraint_name, table_schema, table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_table';
+constraint_name table_schema table_name constraint_type
+PRIMARY test t1_my_table PRIMARY KEY
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_table
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_tablex
+SELECT table_schema,table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+test t1_my_tablex
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT table_schema,table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+db_datadict t1_my_tablex
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict f2 db_datadict t1_my_tablex UNIQUE
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,f1);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict my_idx db_datadict t1_my_tablex UNIQUE
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+DROP INDEX my_idx ON db_datadict.t1_my_tablex;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2);
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict my_idx db_datadict t1_my_tablex UNIQUE
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict my_idx db_datadict t1_my_tablex UNIQUE
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+ALTER TABLE db_datadict.t1_my_tablex
+DROP COLUMN f2;
+SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+constraint_schema constraint_name table_schema table_name constraint_type
+db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY
+SELECT table_name
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+table_name
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+table_name
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = <engine_type> AS
+SELECT 1 AS f1;
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+table_name
+ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1);
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+table_name
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT, UNIQUE(f1))
+ENGINE = <engine_type>;
+INSERT INTO information_schema.table_constraints
+(constraint_schema, constraint_name, table_name)
+VALUES ( 'mysql', 'primary', 'db');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+INSERT INTO information_schema.table_constraints
+SELECT * FROM information_schema.table_constraints;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.table_constraints
+SET table_name = 'db1' WHERE constraint_name = 'primary';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM information_schema.table_constraints WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.table_constraints;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX i3 ON information_schema.table_constraints(table_name);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.table_constraints ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.table_constraints;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.table_constraints
+RENAME db_datadict.table_constraints;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.table_constraints
+RENAME information_schema.xtable_constraints;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE db_datadict.t1;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_is.result b/mysql-test/suite/funcs_1/r/is_table_constraints_is.result
new file mode 100644
index 00000000..2a5fff26
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints_is.result
@@ -0,0 +1,18 @@
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON db_datadict.* TO testuser1@localhost;
+SELECT * FROM information_schema.table_constraints
+WHERE table_schema = 'information_schema'
+ORDER BY table_schema,table_name,constraint_name;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+connect testuser1,localhost,testuser1,,db_datadict;
+SELECT * FROM information_schema.table_constraints
+WHERE table_schema = 'information_schema'
+ORDER BY table_schema,table_name,constraint_name;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
new file mode 100644
index 00000000..d5da8073
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
@@ -0,0 +1,51 @@
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON db_datadict.* TO testuser1@localhost;
+SELECT * FROM information_schema.table_constraints
+WHERE table_schema = 'mysql'
+ORDER BY table_schema,table_name,constraint_name;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+def mysql PRIMARY mysql columns_priv PRIMARY KEY
+def mysql PRIMARY mysql column_stats PRIMARY KEY
+def mysql PRIMARY mysql db PRIMARY KEY
+def mysql PRIMARY mysql event PRIMARY KEY
+def mysql PRIMARY mysql func PRIMARY KEY
+def mysql PRIMARY mysql global_priv PRIMARY KEY
+def mysql Priv mysql global_priv CHECK
+def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
+def mysql name mysql help_category UNIQUE
+def mysql PRIMARY mysql help_category PRIMARY KEY
+def mysql name mysql help_keyword UNIQUE
+def mysql PRIMARY mysql help_keyword PRIMARY KEY
+def mysql PRIMARY mysql help_relation PRIMARY KEY
+def mysql name mysql help_topic UNIQUE
+def mysql PRIMARY mysql help_topic PRIMARY KEY
+def mysql PRIMARY mysql index_stats PRIMARY KEY
+def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY
+def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY
+def mysql PRIMARY mysql plugin PRIMARY KEY
+def mysql PRIMARY mysql proc PRIMARY KEY
+def mysql PRIMARY mysql procs_priv PRIMARY KEY
+def mysql PRIMARY mysql proxies_priv PRIMARY KEY
+def mysql Host mysql roles_mapping UNIQUE
+def mysql PRIMARY mysql servers PRIMARY KEY
+def mysql PRIMARY mysql tables_priv PRIMARY KEY
+def mysql PRIMARY mysql table_stats PRIMARY KEY
+def mysql PRIMARY mysql time_zone PRIMARY KEY
+def mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY
+def mysql PRIMARY mysql time_zone_name PRIMARY KEY
+def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
+def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
+def mysql commit_id mysql transaction_registry UNIQUE
+def mysql PRIMARY mysql transaction_registry PRIMARY KEY
+connect testuser1,localhost,testuser1,,db_datadict;
+SELECT * FROM information_schema.table_constraints
+WHERE table_schema = 'mysql'
+ORDER BY table_schema,table_name,constraint_name;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
new file mode 100644
index 00000000..0426877b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
@@ -0,0 +1,84 @@
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON db_datadict.* TO testuser1@localhost;
+SELECT * FROM information_schema.table_constraints
+WHERE table_schema = 'mysql'
+ORDER BY table_schema,table_name,constraint_name;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+def mysql PRIMARY mysql columns_priv PRIMARY KEY
+def mysql PRIMARY mysql column_stats PRIMARY KEY
+def mysql PRIMARY mysql db PRIMARY KEY
+def mysql PRIMARY mysql event PRIMARY KEY
+def mysql PRIMARY mysql func PRIMARY KEY
+def mysql PRIMARY mysql global_priv PRIMARY KEY
+def mysql Priv mysql global_priv CHECK
+def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
+def mysql name mysql help_category UNIQUE
+def mysql PRIMARY mysql help_category PRIMARY KEY
+def mysql name mysql help_keyword UNIQUE
+def mysql PRIMARY mysql help_keyword PRIMARY KEY
+def mysql PRIMARY mysql help_relation PRIMARY KEY
+def mysql name mysql help_topic UNIQUE
+def mysql PRIMARY mysql help_topic PRIMARY KEY
+def mysql PRIMARY mysql index_stats PRIMARY KEY
+def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY
+def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY
+def mysql PRIMARY mysql plugin PRIMARY KEY
+def mysql PRIMARY mysql proc PRIMARY KEY
+def mysql PRIMARY mysql procs_priv PRIMARY KEY
+def mysql PRIMARY mysql proxies_priv PRIMARY KEY
+def mysql Host mysql roles_mapping UNIQUE
+def mysql PRIMARY mysql servers PRIMARY KEY
+def mysql PRIMARY mysql tables_priv PRIMARY KEY
+def mysql PRIMARY mysql table_stats PRIMARY KEY
+def mysql PRIMARY mysql time_zone PRIMARY KEY
+def mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY
+def mysql PRIMARY mysql time_zone_name PRIMARY KEY
+def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
+def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
+def mysql commit_id mysql transaction_registry UNIQUE
+def mysql PRIMARY mysql transaction_registry PRIMARY KEY
+connect testuser1,localhost,testuser1,,db_datadict;
+SELECT * FROM information_schema.table_constraints
+WHERE table_schema = 'mysql'
+ORDER BY table_schema,table_name,constraint_name;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+def mysql PRIMARY mysql columns_priv PRIMARY KEY
+def mysql PRIMARY mysql column_stats PRIMARY KEY
+def mysql PRIMARY mysql db PRIMARY KEY
+def mysql PRIMARY mysql event PRIMARY KEY
+def mysql PRIMARY mysql func PRIMARY KEY
+def mysql PRIMARY mysql global_priv PRIMARY KEY
+def mysql Priv mysql global_priv CHECK
+def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
+def mysql name mysql help_category UNIQUE
+def mysql PRIMARY mysql help_category PRIMARY KEY
+def mysql name mysql help_keyword UNIQUE
+def mysql PRIMARY mysql help_keyword PRIMARY KEY
+def mysql PRIMARY mysql help_relation PRIMARY KEY
+def mysql name mysql help_topic UNIQUE
+def mysql PRIMARY mysql help_topic PRIMARY KEY
+def mysql PRIMARY mysql index_stats PRIMARY KEY
+def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY
+def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY
+def mysql PRIMARY mysql plugin PRIMARY KEY
+def mysql PRIMARY mysql proc PRIMARY KEY
+def mysql PRIMARY mysql procs_priv PRIMARY KEY
+def mysql PRIMARY mysql proxies_priv PRIMARY KEY
+def mysql Host mysql roles_mapping UNIQUE
+def mysql PRIMARY mysql servers PRIMARY KEY
+def mysql PRIMARY mysql tables_priv PRIMARY KEY
+def mysql PRIMARY mysql table_stats PRIMARY KEY
+def mysql PRIMARY mysql time_zone PRIMARY KEY
+def mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY
+def mysql PRIMARY mysql time_zone_name PRIMARY KEY
+def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
+def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
+def mysql commit_id mysql transaction_registry UNIQUE
+def mysql PRIMARY mysql transaction_registry PRIMARY KEY
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_table_privileges.result b/mysql-test/suite/funcs_1/r/is_table_privileges.result
new file mode 100644
index 00000000..66e98854
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_table_privileges.result
@@ -0,0 +1,345 @@
+SHOW TABLES FROM information_schema LIKE 'TABLE_PRIVILEGES';
+Tables_in_information_schema (TABLE_PRIVILEGES)
+TABLE_PRIVILEGES
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.TABLE_PRIVILEGES;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TABLE_PRIVILEGES;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.TABLE_PRIVILEGES;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.TABLE_PRIVILEGES;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.11.1: INFORMATION_SCHEMA.TABLE_PRIVILEGES layout
+#########################################################################
+DESCRIBE information_schema.TABLE_PRIVILEGES;
+Field Type Null Key Default Extra
+GRANTEE varchar(385) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+PRIVILEGE_TYPE varchar(64) NO NULL
+IS_GRANTABLE varchar(3) NO NULL
+SHOW CREATE TABLE information_schema.TABLE_PRIVILEGES;
+Table Create Table
+TABLE_PRIVILEGES CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` (
+ `GRANTEE` varchar(385) NOT NULL,
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `PRIVILEGE_TYPE` varchar(64) NOT NULL,
+ `IS_GRANTABLE` varchar(3) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.TABLE_PRIVILEGES;
+Field Type Null Key Default Extra
+GRANTEE varchar(385) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+PRIVILEGE_TYPE varchar(64) NO NULL
+IS_GRANTABLE varchar(3) NO NULL
+SELECT table_catalog, table_schema, table_name, privilege_type
+FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL;
+table_catalog table_schema table_name privilege_type
+def mysql global_priv SELECT
+def mysql global_priv DELETE
+######################################################################
+# Testcase 3.2.11.2+3.2.11.3+3.2.11.4:
+# INFORMATION_SCHEMA.TABLE_PRIVILEGES accessible information
+######################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.tb1(f1 INT, f2 INT, f3 INT)
+ENGINE = <engine_type>;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT CREATE, SELECT ON db_datadict.*
+TO 'testuser1'@'localhost' WITH GRANT OPTION;
+GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION;
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+connect testuser1, localhost, testuser1, , db_datadict;
+CREATE TABLE tb3 (f1 TEXT)
+ENGINE = <other_engine_type>;
+GRANT SELECT ON db_datadict.tb3 TO 'testuser3'@'localhost';
+SELECT * FROM information_schema.table_privileges
+WHERE table_name LIKE 'tb%'
+ORDER BY grantee,table_schema,table_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict tb1 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT SELECT, CREATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
+GRANT SELECT ON `db_datadict`.`tb1` TO `testuser1`@`localhost`
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.table_privileges
+WHERE table_name LIKE 'tb%'
+ORDER BY grantee,table_schema,table_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser2'@'localhost' def db_datadict tb1 ALTER YES
+'testuser2'@'localhost' def db_datadict tb1 CREATE YES
+'testuser2'@'localhost' def db_datadict tb1 CREATE VIEW YES
+'testuser2'@'localhost' def db_datadict tb1 DELETE YES
+'testuser2'@'localhost' def db_datadict tb1 DELETE HISTORY YES
+'testuser2'@'localhost' def db_datadict tb1 DROP YES
+'testuser2'@'localhost' def db_datadict tb1 INDEX YES
+'testuser2'@'localhost' def db_datadict tb1 INSERT YES
+'testuser2'@'localhost' def db_datadict tb1 REFERENCES YES
+'testuser2'@'localhost' def db_datadict tb1 SELECT YES
+'testuser2'@'localhost' def db_datadict tb1 SHOW VIEW YES
+'testuser2'@'localhost' def db_datadict tb1 TRIGGER YES
+'testuser2'@'localhost' def db_datadict tb1 UPDATE YES
+SHOW GRANTS FOR 'testuser2'@'localhost';
+Grants for testuser2@localhost
+GRANT USAGE ON *.* TO `testuser2`@`localhost`
+GRANT ALL PRIVILEGES ON `db_datadict`.`tb1` TO `testuser2`@`localhost` WITH GRANT OPTION
+connect testuser3, localhost, testuser3, , db_datadict;
+SELECT * FROM information_schema.table_privileges
+WHERE table_name LIKE 'tb%'
+ORDER BY grantee,table_schema,table_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser3'@'localhost' def db_datadict tb3 SELECT NO
+SHOW GRANTS FOR 'testuser3'@'localhost';
+Grants for testuser3@localhost
+GRANT USAGE ON *.* TO `testuser3`@`localhost`
+GRANT SELECT ON `db_datadict`.`tb3` TO `testuser3`@`localhost`
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+SELECT * FROM information_schema.table_privileges
+WHERE table_name LIKE 'tb%'
+ORDER BY grantee,table_schema,table_name,privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def db_datadict tb1 SELECT NO
+'testuser2'@'localhost' def db_datadict tb1 ALTER YES
+'testuser2'@'localhost' def db_datadict tb1 CREATE YES
+'testuser2'@'localhost' def db_datadict tb1 CREATE VIEW YES
+'testuser2'@'localhost' def db_datadict tb1 DELETE YES
+'testuser2'@'localhost' def db_datadict tb1 DELETE HISTORY YES
+'testuser2'@'localhost' def db_datadict tb1 DROP YES
+'testuser2'@'localhost' def db_datadict tb1 INDEX YES
+'testuser2'@'localhost' def db_datadict tb1 INSERT YES
+'testuser2'@'localhost' def db_datadict tb1 REFERENCES YES
+'testuser2'@'localhost' def db_datadict tb1 SELECT YES
+'testuser2'@'localhost' def db_datadict tb1 SHOW VIEW YES
+'testuser2'@'localhost' def db_datadict tb1 TRIGGER YES
+'testuser2'@'localhost' def db_datadict tb1 UPDATE YES
+'testuser3'@'localhost' def db_datadict tb3 SELECT NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT SELECT, CREATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
+GRANT SELECT ON `db_datadict`.`tb1` TO `testuser1`@`localhost`
+SHOW GRANTS FOR 'testuser2'@'localhost';
+Grants for testuser2@localhost
+GRANT USAGE ON *.* TO `testuser2`@`localhost`
+GRANT ALL PRIVILEGES ON `db_datadict`.`tb1` TO `testuser2`@`localhost` WITH GRANT OPTION
+SHOW GRANTS FOR 'testuser3'@'localhost';
+Grants for testuser3@localhost
+GRANT USAGE ON *.* TO `testuser3`@`localhost`
+GRANT SELECT ON `db_datadict`.`tb3` TO `testuser3`@`localhost`
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE db_datadict;
+################################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_PRIVILEGES modifications
+################################################################################
+DROP TABLE IF EXISTS test.t1_table;
+DROP VIEW IF EXISTS test.t1_view;
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE test.t1_table (f1 BIGINT)
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+COMMENT = 'Initial Comment' ENGINE = <engine_type>;
+CREATE VIEW test.t1_view AS SELECT 1;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'the_user'@'localhost';
+SELECT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%';
+table_name
+GRANT ALL ON test.t1_table TO 'testuser1'@'localhost';
+GRANT ALL ON test.t1_view TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY grantee, table_schema, table_name, privilege_type;
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'testuser1'@'localhost' def test t1_table ALTER NO
+'testuser1'@'localhost' def test t1_table CREATE NO
+'testuser1'@'localhost' def test t1_table CREATE VIEW NO
+'testuser1'@'localhost' def test t1_table DELETE NO
+'testuser1'@'localhost' def test t1_table DELETE HISTORY NO
+'testuser1'@'localhost' def test t1_table DROP NO
+'testuser1'@'localhost' def test t1_table INDEX NO
+'testuser1'@'localhost' def test t1_table INSERT NO
+'testuser1'@'localhost' def test t1_table REFERENCES NO
+'testuser1'@'localhost' def test t1_table SELECT NO
+'testuser1'@'localhost' def test t1_table SHOW VIEW NO
+'testuser1'@'localhost' def test t1_table TRIGGER NO
+'testuser1'@'localhost' def test t1_table UPDATE NO
+'testuser1'@'localhost' def test t1_view ALTER NO
+'testuser1'@'localhost' def test t1_view CREATE NO
+'testuser1'@'localhost' def test t1_view CREATE VIEW NO
+'testuser1'@'localhost' def test t1_view DELETE NO
+'testuser1'@'localhost' def test t1_view DELETE HISTORY NO
+'testuser1'@'localhost' def test t1_view DROP NO
+'testuser1'@'localhost' def test t1_view INDEX NO
+'testuser1'@'localhost' def test t1_view INSERT NO
+'testuser1'@'localhost' def test t1_view REFERENCES NO
+'testuser1'@'localhost' def test t1_view SELECT NO
+'testuser1'@'localhost' def test t1_view SHOW VIEW NO
+'testuser1'@'localhost' def test t1_view TRIGGER NO
+'testuser1'@'localhost' def test t1_view UPDATE NO
+SELECT DISTINCT grantee, table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY grantee, table_name;
+grantee table_name
+'testuser1'@'localhost' t1_table
+'testuser1'@'localhost' t1_view
+RENAME USER 'testuser1'@'localhost' TO 'the_user'@'localhost';
+FLUSH PRIVILEGES;
+SELECT DISTINCT grantee, table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY grantee, table_name;
+grantee table_name
+'the_user'@'localhost' t1_table
+'the_user'@'localhost' t1_view
+SHOW GRANTS FOR 'testuser1'@'localhost';
+ERROR 42000: There is no such grant defined for user 'testuser1' on host 'localhost'
+SHOW GRANTS FOR 'the_user'@'localhost';
+Grants for the_user@localhost
+GRANT USAGE ON *.* TO `the_user`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.`t1_table` TO `the_user`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost`
+SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+table_schema table_name
+test t1_table
+test t1_view
+RENAME TABLE test.t1_table TO db_datadict.t1_table;
+RENAME TABLE test.t1_view TO db_datadict.t1_view;
+ERROR HY000: Changing schema from 'test' to 'db_datadict' is not allowed
+SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+table_schema table_name
+test t1_table
+test t1_view
+SHOW GRANTS FOR 'the_user'@'localhost';
+Grants for the_user@localhost
+GRANT USAGE ON *.* TO `the_user`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.`t1_table` TO `the_user`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost`
+REVOKE ALL PRIVILEGES ON test.t1_table FROM 'the_user'@'localhost';
+REVOKE ALL PRIVILEGES ON test.t1_view FROM 'the_user'@'localhost';
+DROP VIEW test.t1_view;
+CREATE VIEW db_datadict.t1_view AS SELECT 1;
+GRANT ALL ON db_datadict.t1_table TO 'the_user'@'localhost';
+GRANT ALL ON db_datadict.t1_view TO 'the_user'@'localhost';
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_table
+t1_view
+RENAME TABLE db_datadict.t1_table TO db_datadict.t1_tablex;
+RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx;
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_table
+t1_view
+RENAME TABLE db_datadict.t1_tablex TO db_datadict.t1_table;
+RENAME TABLE db_datadict.t1_viewx TO db_datadict.t1_view;
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_table
+t1_view
+DROP TABLE db_datadict.t1_table;
+DROP VIEW db_datadict.t1_view;
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_table
+t1_view
+CREATE TABLE db_datadict.t1_table
+ENGINE = <engine_type> AS
+SELECT 1;
+CREATE VIEW db_datadict.t1_view AS SELECT 1;
+GRANT ALL ON db_datadict.t1_table TO 'the_user'@'localhost';
+GRANT ALL ON db_datadict.t1_view TO 'the_user'@'localhost';
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_table
+t1_view
+DROP DATABASE db_datadict;
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_table
+t1_view
+DROP USER 'the_user'@'localhost';
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT)
+ENGINE = <engine_type>;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT (f1) ON db_datadict.t1 TO 'testuser1'@'localhost';
+INSERT INTO information_schema.table_privileges
+SELECT * FROM information_schema.table_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.table_privileges SET table_schema = 'test'
+WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM information_schema.table_privileges WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.table_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_tables
+ON information_schema.table_privileges(table_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.table_privileges ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.table_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.table_privileges
+RENAME db_datadict.table_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.table_privileges
+RENAME information_schema.xtable_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
diff --git a/mysql-test/suite/funcs_1/r/is_tables.result b/mysql-test/suite/funcs_1/r/is_tables.result
new file mode 100644
index 00000000..35f7d43d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables.result
@@ -0,0 +1,432 @@
+SHOW TABLES FROM information_schema LIKE 'TABLES';
+Tables_in_information_schema (TABLES)
+TABLES
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.TABLES;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TABLES;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.TABLES;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.TABLES;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.12.1: INFORMATION_SCHEMA.TABLES layout
+#########################################################################
+DESCRIBE information_schema.TABLES;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+TABLE_TYPE varchar(64) NO NULL
+ENGINE varchar(64) YES NULL
+VERSION bigint(21) unsigned YES NULL
+ROW_FORMAT varchar(10) YES NULL
+TABLE_ROWS bigint(21) unsigned YES NULL
+AVG_ROW_LENGTH bigint(21) unsigned YES NULL
+DATA_LENGTH bigint(21) unsigned YES NULL
+MAX_DATA_LENGTH bigint(21) unsigned YES NULL
+INDEX_LENGTH bigint(21) unsigned YES NULL
+DATA_FREE bigint(21) unsigned YES NULL
+AUTO_INCREMENT bigint(21) unsigned YES NULL
+CREATE_TIME datetime YES NULL
+UPDATE_TIME datetime YES NULL
+CHECK_TIME datetime YES NULL
+TABLE_COLLATION varchar(64) YES NULL
+CHECKSUM bigint(21) unsigned YES NULL
+CREATE_OPTIONS varchar(2048) YES NULL
+TABLE_COMMENT varchar(2048) NO NULL
+MAX_INDEX_LENGTH bigint(21) unsigned YES NULL
+TEMPORARY varchar(1) YES NULL
+SHOW CREATE TABLE information_schema.TABLES;
+Table Create Table
+TABLES CREATE TEMPORARY TABLE `TABLES` (
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `TABLE_TYPE` varchar(64) NOT NULL,
+ `ENGINE` varchar(64),
+ `VERSION` bigint(21) unsigned,
+ `ROW_FORMAT` varchar(10),
+ `TABLE_ROWS` bigint(21) unsigned,
+ `AVG_ROW_LENGTH` bigint(21) unsigned,
+ `DATA_LENGTH` bigint(21) unsigned,
+ `MAX_DATA_LENGTH` bigint(21) unsigned,
+ `INDEX_LENGTH` bigint(21) unsigned,
+ `DATA_FREE` bigint(21) unsigned,
+ `AUTO_INCREMENT` bigint(21) unsigned,
+ `CREATE_TIME` datetime,
+ `UPDATE_TIME` datetime,
+ `CHECK_TIME` datetime,
+ `TABLE_COLLATION` varchar(64),
+ `CHECKSUM` bigint(21) unsigned,
+ `CREATE_OPTIONS` varchar(2048),
+ `TABLE_COMMENT` varchar(2048) NOT NULL,
+ `MAX_INDEX_LENGTH` bigint(21) unsigned,
+ `TEMPORARY` varchar(1)
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.TABLES;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+TABLE_TYPE varchar(64) NO NULL
+ENGINE varchar(64) YES NULL
+VERSION bigint(21) unsigned YES NULL
+ROW_FORMAT varchar(10) YES NULL
+TABLE_ROWS bigint(21) unsigned YES NULL
+AVG_ROW_LENGTH bigint(21) unsigned YES NULL
+DATA_LENGTH bigint(21) unsigned YES NULL
+MAX_DATA_LENGTH bigint(21) unsigned YES NULL
+INDEX_LENGTH bigint(21) unsigned YES NULL
+DATA_FREE bigint(21) unsigned YES NULL
+AUTO_INCREMENT bigint(21) unsigned YES NULL
+CREATE_TIME datetime YES NULL
+UPDATE_TIME datetime YES NULL
+CHECK_TIME datetime YES NULL
+TABLE_COLLATION varchar(64) YES NULL
+CHECKSUM bigint(21) unsigned YES NULL
+CREATE_OPTIONS varchar(2048) YES NULL
+TABLE_COMMENT varchar(2048) NO NULL
+MAX_INDEX_LENGTH bigint(21) unsigned YES NULL
+TEMPORARY varchar(1) YES NULL
+SELECT table_catalog, table_schema, table_name
+FROM information_schema.tables WHERE table_catalog IS NULL OR table_catalog <> 'def';
+table_catalog table_schema table_name
+################################################################################
+# Testcase 3.2.12.2 + 3.2.12.3: INFORMATION_SCHEMA.TABLES accessible information
+################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.*
+TO 'testuser1'@'localhost' WITH GRANT OPTION;
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+CREATE TABLE db_datadict.tb1 (f1 INT, f2 INT, f3 INT)
+ENGINE = <engine_type>;
+GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost';
+GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION;
+connect testuser1, localhost, testuser1, , db_datadict;
+CREATE TABLE tb2 (f1 DECIMAL)
+ENGINE = <engine_type>;
+CREATE TABLE tb3 (f1 VARCHAR(200))
+ENGINE = <engine_type>;
+GRANT SELECT ON db_datadict.tb3 to 'testuser3'@'localhost';
+GRANT INSERT ON db_datadict.tb3 to 'testuser2'@'localhost';
+CREATE VIEW v3 AS SELECT * FROM tb3;
+GRANT SELECT ON db_datadict.v3 to 'testuser3'@'localhost';
+SELECT * FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
+def db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW NULL NULL
+SHOW TABLES FROM db_datadict;
+Tables_in_db_datadict
+tb1
+tb2
+tb3
+v3
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
+def db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+SHOW TABLES FROM db_datadict;
+Tables_in_db_datadict
+tb1
+tb3
+connect testuser3, localhost, testuser3, , db_datadict;
+SELECT * FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
+def db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW NULL NULL
+SHOW TABLES FROM db_datadict;
+Tables_in_db_datadict
+tb3
+v3
+connection default;
+SELECT * FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
+def db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW NULL NULL
+SHOW TABLES FROM db_datadict;
+Tables_in_db_datadict
+tb1
+tb2
+tb3
+v3
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE db_datadict;
+#########################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLES modifications
+#########################################################################
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+CREATE TABLE test.t1_my_table (f1 BIGINT)
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+COMMENT = 'Initial Comment' ENGINE = <engine_type>;
+SELECT * FROM information_schema.tables
+WHERE table_name = 't1_my_table';
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_table
+TABLE_TYPE BASE TABLE
+ENGINE #ENG#
+VERSION 10
+ROW_FORMAT #RF#
+TABLE_ROWS 0
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM #CS#
+CREATE_OPTIONS
+TABLE_COMMENT Initial Comment
+MAX_INDEX_LENGTH 0
+TEMPORARY N
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_table
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_tablex
+SELECT table_schema,table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+test t1_my_tablex
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT table_schema,table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+db_datadict t1_my_tablex
+SELECT table_name, engine FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name engine
+t1_my_tablex <engine_type>
+ALTER TABLE db_datadict.t1_my_tablex
+ENGINE = <other_engine_type>;
+SELECT table_name, engine FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name engine
+t1_my_tablex <other_engine_type>
+SELECT table_name, table_rows FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_rows
+t1_my_tablex 0
+INSERT INTO db_datadict.t1_my_tablex VALUES(1),(2);
+SELECT table_name, table_rows FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_rows
+t1_my_tablex 2
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_collation
+t1_my_tablex latin1_swedish_ci
+ALTER TABLE db_datadict.t1_my_tablex DEFAULT CHARACTER SET utf8;
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_collation
+t1_my_tablex utf8mb3_general_ci
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_collation
+t1_my_tablex utf8mb3_general_ci
+ALTER TABLE db_datadict.t1_my_tablex
+DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci;
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_collation
+t1_my_tablex latin1_german1_ci
+SELECT table_name, TABLE_COMMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name TABLE_COMMENT
+t1_my_tablex Initial Comment
+ALTER TABLE db_datadict.t1_my_tablex COMMENT 'Changed Comment';
+SELECT table_name, TABLE_COMMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name TABLE_COMMENT
+t1_my_tablex Changed Comment
+SELECT table_name, AUTO_INCREMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name AUTO_INCREMENT
+t1_my_tablex NULL
+ALTER TABLE db_datadict.t1_my_tablex
+ADD f2 BIGINT AUTO_INCREMENT, ADD PRIMARY KEY (f2);
+SELECT table_name, AUTO_INCREMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name AUTO_INCREMENT
+t1_my_tablex 3
+SELECT table_name, ROW_FORMAT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name ROW_FORMAT
+t1_my_tablex Fixed
+ALTER TABLE db_datadict.t1_my_tablex ROW_FORMAT = dynamic;
+SELECT table_name, ROW_FORMAT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name ROW_FORMAT
+t1_my_tablex Dynamic
+SELECT table_name, checksum FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name checksum
+t1_my_tablex NULL
+ALTER TABLE db_datadict.t1_my_tablex CHECKSUM = 1;
+SELECT table_name, checksum IS NOT NULL FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name checksum IS NOT NULL
+t1_my_tablex 1
+SELECT UPDATE_TIME, checksum INTO @UPDATE_TIME, @checksum
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+INSERT INTO db_datadict.t1_my_tablex SET f1 = 3;
+FLUSH TABLES;
+SELECT UPDATE_TIME > @UPDATE_TIME
+AS "Is current UPDATE_TIME bigger than before last INSERT?"
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+Is current UPDATE_TIME bigger than before last INSERT?
+1
+SELECT checksum <> @checksum
+AS "Is current CHECKSUM different than before last INSERT?"
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+Is current CHECKSUM different than before last INSERT?
+1
+SELECT CREATE_TIME INTO @CREATE_TIME FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_tablex
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+CREATE TABLE test.t1_my_tablex (f1 BIGINT)
+ENGINE = <other_engine_type>;
+SELECT CREATE_TIME > @CREATE_TIME
+AS "Is current CREATE_TIME bigger than for the old dropped table?"
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+Is current CREATE_TIME bigger than for the old dropped table?
+1
+DROP TABLE test.t1_my_tablex;
+CREATE VIEW test.t1_my_tablex AS SELECT 1;
+SELECT * FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_tablex
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
+TABLE_ROWS NULL
+AVG_ROW_LENGTH NULL
+DATA_LENGTH NULL
+MAX_DATA_LENGTH NULL
+INDEX_LENGTH NULL
+DATA_FREE NULL
+AUTO_INCREMENT NULL
+CREATE_TIME NULL
+UPDATE_TIME NULL
+CHECK_TIME NULL
+TABLE_COLLATION NULL
+CHECKSUM NULL
+CREATE_OPTIONS NULL
+TABLE_COMMENT VIEW
+MAX_INDEX_LENGTH NULL
+TEMPORARY NULL
+DROP VIEW test.t1_my_tablex;
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name
+CREATE TEMPORARY TABLE test.t1_my_tablex
+ENGINE = <other_engine_type>
+AS SELECT 1;
+SELECT table_name, table_type FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+DROP TEMPORARY TABLE test.t1_my_tablex;
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = <engine_type> AS
+SELECT 1;
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = <engine_type>;
+INSERT INTO information_schema.tables
+SELECT * FROM information_schema.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.tables SET table_schema = 'test'
+WHERE table_name = 't1';
+Got one of the listed errors
+DELETE FROM information_schema.tables WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_tables ON information_schema.tables(table_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.tables DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.tables ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.tables RENAME db_datadict.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.tables RENAME information_schema.xtables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_embedded.result
new file mode 100644
index 00000000..de0c2fb4
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables_embedded.result
@@ -0,0 +1,440 @@
+SHOW TABLES FROM information_schema LIKE 'TABLES';
+Tables_in_information_schema (TABLES)
+TABLES
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.TABLES;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TABLES;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.TABLES;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.TABLES;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.12.1: INFORMATION_SCHEMA.TABLES layout
+#########################################################################
+DESCRIBE information_schema.TABLES;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+TABLE_TYPE varchar(64) NO NULL
+ENGINE varchar(64) YES NULL
+VERSION bigint(21) unsigned YES NULL
+ROW_FORMAT varchar(10) YES NULL
+TABLE_ROWS bigint(21) unsigned YES NULL
+AVG_ROW_LENGTH bigint(21) unsigned YES NULL
+DATA_LENGTH bigint(21) unsigned YES NULL
+MAX_DATA_LENGTH bigint(21) unsigned YES NULL
+INDEX_LENGTH bigint(21) unsigned YES NULL
+DATA_FREE bigint(21) unsigned YES NULL
+AUTO_INCREMENT bigint(21) unsigned YES NULL
+CREATE_TIME datetime YES NULL
+UPDATE_TIME datetime YES NULL
+CHECK_TIME datetime YES NULL
+TABLE_COLLATION varchar(64) YES NULL
+CHECKSUM bigint(21) unsigned YES NULL
+CREATE_OPTIONS varchar(2048) YES NULL
+TABLE_COMMENT varchar(2048) NO NULL
+MAX_INDEX_LENGTH bigint(21) unsigned YES NULL
+TEMPORARY varchar(1) YES NULL
+SHOW CREATE TABLE information_schema.TABLES;
+Table Create Table
+TABLES CREATE TEMPORARY TABLE `TABLES` (
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `TABLE_TYPE` varchar(64) NOT NULL,
+ `ENGINE` varchar(64),
+ `VERSION` bigint(21) unsigned,
+ `ROW_FORMAT` varchar(10),
+ `TABLE_ROWS` bigint(21) unsigned,
+ `AVG_ROW_LENGTH` bigint(21) unsigned,
+ `DATA_LENGTH` bigint(21) unsigned,
+ `MAX_DATA_LENGTH` bigint(21) unsigned,
+ `INDEX_LENGTH` bigint(21) unsigned,
+ `DATA_FREE` bigint(21) unsigned,
+ `AUTO_INCREMENT` bigint(21) unsigned,
+ `CREATE_TIME` datetime,
+ `UPDATE_TIME` datetime,
+ `CHECK_TIME` datetime,
+ `TABLE_COLLATION` varchar(64),
+ `CHECKSUM` bigint(21) unsigned,
+ `CREATE_OPTIONS` varchar(2048),
+ `TABLE_COMMENT` varchar(2048) NOT NULL,
+ `MAX_INDEX_LENGTH` bigint(21) unsigned,
+ `TEMPORARY` varchar(1)
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.TABLES;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+TABLE_TYPE varchar(64) NO NULL
+ENGINE varchar(64) YES NULL
+VERSION bigint(21) unsigned YES NULL
+ROW_FORMAT varchar(10) YES NULL
+TABLE_ROWS bigint(21) unsigned YES NULL
+AVG_ROW_LENGTH bigint(21) unsigned YES NULL
+DATA_LENGTH bigint(21) unsigned YES NULL
+MAX_DATA_LENGTH bigint(21) unsigned YES NULL
+INDEX_LENGTH bigint(21) unsigned YES NULL
+DATA_FREE bigint(21) unsigned YES NULL
+AUTO_INCREMENT bigint(21) unsigned YES NULL
+CREATE_TIME datetime YES NULL
+UPDATE_TIME datetime YES NULL
+CHECK_TIME datetime YES NULL
+TABLE_COLLATION varchar(64) YES NULL
+CHECKSUM bigint(21) unsigned YES NULL
+CREATE_OPTIONS varchar(2048) YES NULL
+TABLE_COMMENT varchar(2048) NO NULL
+MAX_INDEX_LENGTH bigint(21) unsigned YES NULL
+TEMPORARY varchar(1) YES NULL
+SELECT table_catalog, table_schema, table_name
+FROM information_schema.tables WHERE table_catalog IS NULL OR table_catalog <> 'def';
+table_catalog table_schema table_name
+################################################################################
+# Testcase 3.2.12.2 + 3.2.12.3: INFORMATION_SCHEMA.TABLES accessible information
+################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.*
+TO 'testuser1'@'localhost' WITH GRANT OPTION;
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+CREATE TABLE db_datadict.tb1 (f1 INT, f2 INT, f3 INT)
+ENGINE = <engine_type>;
+GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost';
+GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION;
+connect testuser1, localhost, testuser1, , db_datadict;
+CREATE TABLE tb2 (f1 DECIMAL)
+ENGINE = <engine_type>;
+CREATE TABLE tb3 (f1 VARCHAR(200))
+ENGINE = <engine_type>;
+GRANT SELECT ON db_datadict.tb3 to 'testuser3'@'localhost';
+GRANT INSERT ON db_datadict.tb3 to 'testuser2'@'localhost';
+CREATE VIEW v3 AS SELECT * FROM tb3;
+GRANT SELECT ON db_datadict.v3 to 'testuser3'@'localhost';
+SELECT * FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
+def db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW NULL NULL
+SHOW TABLES FROM db_datadict;
+Tables_in_db_datadict
+tb1
+tb2
+tb3
+v3
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
+def db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW NULL NULL
+SHOW TABLES FROM db_datadict;
+Tables_in_db_datadict
+tb1
+tb2
+tb3
+v3
+connect testuser3, localhost, testuser3, , db_datadict;
+SELECT * FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
+def db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW NULL NULL
+SHOW TABLES FROM db_datadict;
+Tables_in_db_datadict
+tb1
+tb2
+tb3
+v3
+connection default;
+SELECT * FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
+def db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# 0 N
+def db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW NULL NULL
+SHOW TABLES FROM db_datadict;
+Tables_in_db_datadict
+tb1
+tb2
+tb3
+v3
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE db_datadict;
+#########################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLES modifications
+#########################################################################
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+CREATE TABLE test.t1_my_table (f1 BIGINT)
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+COMMENT = 'Initial Comment' ENGINE = <engine_type>;
+SELECT * FROM information_schema.tables
+WHERE table_name = 't1_my_table';
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_table
+TABLE_TYPE BASE TABLE
+ENGINE #ENG#
+VERSION 10
+ROW_FORMAT #RF#
+TABLE_ROWS 0
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM #CS#
+CREATE_OPTIONS
+TABLE_COMMENT Initial Comment
+MAX_INDEX_LENGTH 0
+TEMPORARY N
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_table
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_tablex
+SELECT table_schema,table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+test t1_my_tablex
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT table_schema,table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_schema table_name
+db_datadict t1_my_tablex
+SELECT table_name, engine FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name engine
+t1_my_tablex <engine_type>
+ALTER TABLE db_datadict.t1_my_tablex
+ENGINE = <other_engine_type>;
+SELECT table_name, engine FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name engine
+t1_my_tablex <other_engine_type>
+SELECT table_name, table_rows FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_rows
+t1_my_tablex 0
+INSERT INTO db_datadict.t1_my_tablex VALUES(1),(2);
+SELECT table_name, table_rows FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_rows
+t1_my_tablex 2
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_collation
+t1_my_tablex latin1_swedish_ci
+ALTER TABLE db_datadict.t1_my_tablex DEFAULT CHARACTER SET utf8;
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_collation
+t1_my_tablex utf8mb3_general_ci
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_collation
+t1_my_tablex utf8mb3_general_ci
+ALTER TABLE db_datadict.t1_my_tablex
+DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci;
+SELECT table_name, table_collation FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name table_collation
+t1_my_tablex latin1_german1_ci
+SELECT table_name, TABLE_COMMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name TABLE_COMMENT
+t1_my_tablex Initial Comment
+ALTER TABLE db_datadict.t1_my_tablex COMMENT 'Changed Comment';
+SELECT table_name, TABLE_COMMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name TABLE_COMMENT
+t1_my_tablex Changed Comment
+SELECT table_name, AUTO_INCREMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name AUTO_INCREMENT
+t1_my_tablex NULL
+ALTER TABLE db_datadict.t1_my_tablex
+ADD f2 BIGINT AUTO_INCREMENT, ADD PRIMARY KEY (f2);
+SELECT table_name, AUTO_INCREMENT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name AUTO_INCREMENT
+t1_my_tablex 3
+SELECT table_name, ROW_FORMAT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name ROW_FORMAT
+t1_my_tablex Fixed
+ALTER TABLE db_datadict.t1_my_tablex ROW_FORMAT = dynamic;
+SELECT table_name, ROW_FORMAT FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name ROW_FORMAT
+t1_my_tablex Dynamic
+SELECT table_name, checksum FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name checksum
+t1_my_tablex NULL
+ALTER TABLE db_datadict.t1_my_tablex CHECKSUM = 1;
+SELECT table_name, checksum IS NOT NULL FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name checksum IS NOT NULL
+t1_my_tablex 1
+SELECT UPDATE_TIME, checksum INTO @UPDATE_TIME, @checksum
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+INSERT INTO db_datadict.t1_my_tablex SET f1 = 3;
+FLUSH TABLES;
+SELECT UPDATE_TIME > @UPDATE_TIME
+AS "Is current UPDATE_TIME bigger than before last INSERT?"
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+Is current UPDATE_TIME bigger than before last INSERT?
+1
+SELECT checksum <> @checksum
+AS "Is current CHECKSUM different than before last INSERT?"
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+Is current CHECKSUM different than before last INSERT?
+1
+SELECT CREATE_TIME INTO @CREATE_TIME FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+t1_my_tablex
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name FROM information_schema.tables
+WHERE table_name LIKE 't1_my_table%';
+table_name
+CREATE TABLE test.t1_my_tablex (f1 BIGINT)
+ENGINE = <other_engine_type>;
+SELECT CREATE_TIME > @CREATE_TIME
+AS "Is current CREATE_TIME bigger than for the old dropped table?"
+FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+Is current CREATE_TIME bigger than for the old dropped table?
+1
+DROP TABLE test.t1_my_tablex;
+CREATE VIEW test.t1_my_tablex AS SELECT 1;
+SELECT * FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1_my_tablex
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
+TABLE_ROWS NULL
+AVG_ROW_LENGTH NULL
+DATA_LENGTH NULL
+MAX_DATA_LENGTH NULL
+INDEX_LENGTH NULL
+DATA_FREE NULL
+AUTO_INCREMENT NULL
+CREATE_TIME NULL
+UPDATE_TIME NULL
+CHECK_TIME NULL
+TABLE_COLLATION NULL
+CHECKSUM NULL
+CREATE_OPTIONS NULL
+TABLE_COMMENT VIEW
+MAX_INDEX_LENGTH NULL
+TEMPORARY NULL
+DROP VIEW test.t1_my_tablex;
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name
+CREATE TEMPORARY TABLE test.t1_my_tablex
+ENGINE = <other_engine_type>
+AS SELECT 1;
+SELECT table_name, table_type FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+DROP TEMPORARY TABLE test.t1_my_tablex;
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = <engine_type> AS
+SELECT 1;
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name
+t1_my_tablex
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_my_tablex';
+table_name
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = <engine_type>;
+INSERT INTO information_schema.tables
+SELECT * FROM information_schema.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.tables SET table_schema = 'test'
+WHERE table_name = 't1';
+Got one of the listed errors
+DELETE FROM information_schema.tables WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_tables ON information_schema.tables(table_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.tables DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.tables ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.tables RENAME db_datadict.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.tables RENAME information_schema.xtables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_innodb.result b/mysql-test/suite/funcs_1/r/is_tables_innodb.result
new file mode 100644
index 00000000..5274f58a
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables_innodb.result
@@ -0,0 +1,174 @@
+DROP DATABASE IF EXISTS test1;
+DROP DATABASE IF EXISTS test2;
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t2
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test2
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+SHOW TABLES FROM test1;
+Tables_in_test1
+t1
+t2
+SHOW TABLES FROM test2;
+Tables_in_test2
+t1
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+connect testuser1,localhost,testuser1,,test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t2
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+SHOW TABLES FROM test1;
+Tables_in_test1
+t1
+t2
+SHOW TABLES FROM test2;
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2'
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE test1;
+DROP DATABASE test2;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result
new file mode 100644
index 00000000..c18f733c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables_is.result
@@ -0,0 +1,2234 @@
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+AND table_name not like 'xtradb_%'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ALL_PLUGINS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME APPLICABLE_ROLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CHARACTER_SETS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CHECK_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CLIENT_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLLATIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLUMNS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLUMN_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ENABLED_ROLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ENGINES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME EVENTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME FILES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GEOMETRY_COLUMNS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GLOBAL_STATUS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GLOBAL_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME INDEX_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEYWORDS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEY_CACHES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEY_COLUMN_USAGE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME OPTIMIZER_TRACE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PARAMETERS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PARTITIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PLUGINS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PROCESSLIST
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME REFERENTIAL_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ROUTINES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMATA
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMA_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_STATUS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SPATIAL_REF_SYS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SQL_FUNCTIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SYSTEM_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLESPACES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TRIGGERS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME USER_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME USER_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME VIEWS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+connect testuser1,localhost,testuser1,,test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+AND table_name not like 'xtradb_%'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ALL_PLUGINS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME APPLICABLE_ROLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CHARACTER_SETS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CHECK_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CLIENT_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLLATIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLUMNS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLUMN_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ENABLED_ROLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ENGINES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME EVENTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME FILES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GEOMETRY_COLUMNS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GLOBAL_STATUS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GLOBAL_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME INDEX_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEYWORDS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEY_CACHES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEY_COLUMN_USAGE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME OPTIMIZER_TRACE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PARAMETERS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PARTITIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PLUGINS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PROCESSLIST
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME REFERENTIAL_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ROUTINES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMATA
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMA_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_STATUS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SPATIAL_REF_SYS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SQL_FUNCTIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SYSTEM_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLESPACES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TRIGGERS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME USER_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME USER_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME VIEWS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE test1;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
new file mode 100644
index 00000000..c18f733c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
@@ -0,0 +1,2234 @@
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+AND table_name not like 'xtradb_%'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ALL_PLUGINS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME APPLICABLE_ROLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CHARACTER_SETS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CHECK_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CLIENT_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLLATIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLUMNS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLUMN_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ENABLED_ROLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ENGINES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME EVENTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME FILES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GEOMETRY_COLUMNS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GLOBAL_STATUS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GLOBAL_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME INDEX_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEYWORDS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEY_CACHES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEY_COLUMN_USAGE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME OPTIMIZER_TRACE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PARAMETERS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PARTITIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PLUGINS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PROCESSLIST
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME REFERENTIAL_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ROUTINES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMATA
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMA_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_STATUS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SPATIAL_REF_SYS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SQL_FUNCTIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SYSTEM_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLESPACES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TRIGGERS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME USER_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME USER_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME VIEWS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+connect testuser1,localhost,testuser1,,test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+AND table_name not like 'xtradb_%'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ALL_PLUGINS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME APPLICABLE_ROLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CHARACTER_SETS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CHECK_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME CLIENT_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLLATIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLUMNS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME COLUMN_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ENABLED_ROLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ENGINES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME EVENTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME FILES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GEOMETRY_COLUMNS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GLOBAL_STATUS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME GLOBAL_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME INDEX_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEYWORDS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEY_CACHES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME KEY_COLUMN_USAGE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME OPTIMIZER_TRACE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PARAMETERS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PARTITIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PLUGINS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME PROCESSLIST
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME REFERENTIAL_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME ROUTINES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMATA
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMA_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_STATUS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SPATIAL_REF_SYS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SQL_FUNCTIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME SYSTEM_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLESPACES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME TRIGGERS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME USER_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME USER_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 11
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
+TABLE_NAME VIEWS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE test1;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_memory.result b/mysql-test/suite/funcs_1/r/is_tables_memory.result
new file mode 100644
index 00000000..73beadf6
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables_memory.result
@@ -0,0 +1,175 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+DROP DATABASE IF EXISTS test1;
+DROP DATABASE IF EXISTS test2;
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t2
+TABLE_TYPE BASE TABLE
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test2
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+SHOW TABLES FROM test1;
+Tables_in_test1
+t1
+t2
+SHOW TABLES FROM test2;
+Tables_in_test2
+t1
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+connect testuser1,localhost,testuser1,,test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t2
+TABLE_TYPE BASE TABLE
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+SHOW TABLES FROM test1;
+Tables_in_test1
+t1
+t2
+SHOW TABLES FROM test2;
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2'
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE test1;
+DROP DATABASE test2;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_myisam.result b/mysql-test/suite/funcs_1/r/is_tables_myisam.result
new file mode 100644
index 00000000..6c2e9307
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables_myisam.result
@@ -0,0 +1,175 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+DROP DATABASE IF EXISTS test1;
+DROP DATABASE IF EXISTS test2;
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t2
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test2
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+SHOW TABLES FROM test1;
+Tables_in_test1
+t1
+t2
+SHOW TABLES FROM test2;
+Tables_in_test2
+t1
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+connect testuser1,localhost,testuser1,,test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t2
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+SHOW TABLES FROM test1;
+Tables_in_test1
+t1
+t2
+SHOW TABLES FROM test2;
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2'
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE test1;
+DROP DATABASE test2;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result
new file mode 100644
index 00000000..9b2cb07f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result
@@ -0,0 +1,201 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+DROP DATABASE IF EXISTS test1;
+DROP DATABASE IF EXISTS test2;
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t2
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test2
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+SHOW TABLES FROM test1;
+Tables_in_test1
+t1
+t2
+SHOW TABLES FROM test2;
+Tables_in_test2
+t1
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+connect testuser1,localhost,testuser1,,test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test1
+TABLE_NAME t2
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA test2
+TABLE_NAME t1
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+SHOW TABLES FROM test1;
+Tables_in_test1
+t1
+t2
+SHOW TABLES FROM test2;
+Tables_in_test2
+t1
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE test1;
+DROP DATABASE test2;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result
new file mode 100644
index 00000000..7cfef92c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result
@@ -0,0 +1,805 @@
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema = 'mysql'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME columns_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Column privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME column_stats
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Statistics on Columns
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME db
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Database privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME event
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Events
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME func
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment User defined functions
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME general_log
+TABLE_TYPE BASE TABLE
+ENGINE CSV
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment General log
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME global_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Users and global privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME gtid_slave_pos
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Replication slave GTID position
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_category
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment help categories
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_keyword
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment help keywords
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_relation
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment keyword-topic relation
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_topic
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment help topics
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME index_stats
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Statistics on Indexes
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME innodb_index_stats
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME innodb_table_stats
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME plugin
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment MySQL plugins
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME proc
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Stored Procedures
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME procs_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Procedure privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME proxies_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment User proxy privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME roles_mapping
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Granted roles
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME servers
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment MySQL Foreign Servers table
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME slow_log
+TABLE_TYPE BASE TABLE
+ENGINE CSV
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Slow log
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME tables_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Table privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME table_stats
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Statistics on Tables
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT 6
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zones
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_leap_second
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Leap seconds information for time zones
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_name
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zone names
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_transition
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zone transitions
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_transition_type
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zone transition types
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME transaction_registry
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME user
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION NULL
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY NULL
+user_comment VIEW
+Separator -----------------------------------------------------
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+connect testuser1,localhost,testuser1,,test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema = 'mysql'
+ORDER BY table_schema,table_name;
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE test1;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
new file mode 100644
index 00000000..450f0f5f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
@@ -0,0 +1,1580 @@
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema = 'mysql'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME columns_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Column privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME column_stats
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Statistics on Columns
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME db
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Database privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME event
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Events
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME func
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment User defined functions
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME general_log
+TABLE_TYPE BASE TABLE
+ENGINE CSV
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment General log
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME global_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Users and global privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME gtid_slave_pos
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Replication slave GTID position
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_category
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment help categories
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_keyword
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment help keywords
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_relation
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment keyword-topic relation
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_topic
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment help topics
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME index_stats
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Statistics on Indexes
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME innodb_index_stats
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME innodb_table_stats
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME plugin
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment MySQL plugins
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME proc
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Stored Procedures
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME procs_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Procedure privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME proxies_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment User proxy privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME roles_mapping
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Granted roles
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME servers
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment MySQL Foreign Servers table
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME slow_log
+TABLE_TYPE BASE TABLE
+ENGINE CSV
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Slow log
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME tables_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Table privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME table_stats
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Statistics on Tables
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT 6
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zones
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_leap_second
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Leap seconds information for time zones
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_name
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zone names
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_transition
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zone transitions
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_transition_type
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zone transition types
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME transaction_registry
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME user
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION NULL
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY NULL
+user_comment VIEW
+Separator -----------------------------------------------------
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+connect testuser1,localhost,testuser1,,test1;
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema = 'mysql'
+ORDER BY table_schema,table_name;
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME columns_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Column privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME column_stats
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Statistics on Columns
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME db
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Database privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME event
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Events
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME func
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment User defined functions
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME general_log
+TABLE_TYPE BASE TABLE
+ENGINE CSV
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment General log
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME global_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Users and global privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME gtid_slave_pos
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION latin1_swedish_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Replication slave GTID position
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_category
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment help categories
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_keyword
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment help keywords
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_relation
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment keyword-topic relation
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME help_topic
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment help topics
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME index_stats
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Statistics on Indexes
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME innodb_index_stats
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME innodb_table_stats
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME plugin
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment MySQL plugins
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME proc
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Stored Procedures
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME procs_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Procedure privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME proxies_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment User proxy privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME roles_mapping
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Granted roles
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME servers
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment MySQL Foreign Servers table
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME slow_log
+TABLE_TYPE BASE TABLE
+ENGINE CSV
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Slow log
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME tables_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Table privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME table_stats
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Statistics on Tables
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT 6
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zones
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_leap_second
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Leap seconds information for time zones
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_name
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zone names
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_transition
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zone transitions
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME time_zone_transition_type
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Time zone transition types
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME transaction_registry
+TABLE_TYPE BASE TABLE
+ENGINE InnoDB
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8mb3_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
+TABLE_NAME user
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION NULL
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY NULL
+user_comment VIEW
+Separator -----------------------------------------------------
+connection default;
+disconnect testuser1;
+DROP USER testuser1@localhost;
+DROP DATABASE test1;
diff --git a/mysql-test/suite/funcs_1/r/is_triggers.result b/mysql-test/suite/funcs_1/r/is_triggers.result
new file mode 100644
index 00000000..99e514cf
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_triggers.result
@@ -0,0 +1,238 @@
+set @save_sql_mode=@@global.sql_mode;
+set global sql_mode="";
+SHOW TABLES FROM information_schema LIKE 'TRIGGERS';
+Tables_in_information_schema (TRIGGERS)
+TRIGGERS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.TRIGGERS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TRIGGERS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.TRIGGERS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.TRIGGERS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.12.1: INFORMATION_SCHEMA.TRIGGERS layout
+#########################################################################
+DESCRIBE information_schema.TRIGGERS;
+Field Type Null Key Default Extra
+TRIGGER_CATALOG varchar(512) NO NULL
+TRIGGER_SCHEMA varchar(64) NO NULL
+TRIGGER_NAME varchar(64) NO NULL
+EVENT_MANIPULATION varchar(6) NO NULL
+EVENT_OBJECT_CATALOG varchar(512) NO NULL
+EVENT_OBJECT_SCHEMA varchar(64) NO NULL
+EVENT_OBJECT_TABLE varchar(64) NO NULL
+ACTION_ORDER bigint(4) NO NULL
+ACTION_CONDITION longtext YES NULL
+ACTION_STATEMENT longtext NO NULL
+ACTION_ORIENTATION varchar(9) NO NULL
+ACTION_TIMING varchar(6) NO NULL
+ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL
+ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL
+ACTION_REFERENCE_OLD_ROW varchar(3) NO NULL
+ACTION_REFERENCE_NEW_ROW varchar(3) NO NULL
+CREATED datetime(2) YES NULL
+SQL_MODE varchar(8192) NO NULL
+DEFINER varchar(384) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+SHOW CREATE TABLE information_schema.TRIGGERS;
+Table Create Table
+TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` (
+ `TRIGGER_CATALOG` varchar(512) NOT NULL,
+ `TRIGGER_SCHEMA` varchar(64) NOT NULL,
+ `TRIGGER_NAME` varchar(64) NOT NULL,
+ `EVENT_MANIPULATION` varchar(6) NOT NULL,
+ `EVENT_OBJECT_CATALOG` varchar(512) NOT NULL,
+ `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL,
+ `EVENT_OBJECT_TABLE` varchar(64) NOT NULL,
+ `ACTION_ORDER` bigint(4) NOT NULL,
+ `ACTION_CONDITION` longtext,
+ `ACTION_STATEMENT` longtext NOT NULL,
+ `ACTION_ORIENTATION` varchar(9) NOT NULL,
+ `ACTION_TIMING` varchar(6) NOT NULL,
+ `ACTION_REFERENCE_OLD_TABLE` varchar(64),
+ `ACTION_REFERENCE_NEW_TABLE` varchar(64),
+ `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL,
+ `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL,
+ `CREATED` datetime(2),
+ `SQL_MODE` varchar(8192) NOT NULL,
+ `DEFINER` varchar(384) NOT NULL,
+ `CHARACTER_SET_CLIENT` varchar(32) NOT NULL,
+ `COLLATION_CONNECTION` varchar(64) NOT NULL,
+ `DATABASE_COLLATION` varchar(64) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.TRIGGERS;
+Field Type Null Key Default Extra
+TRIGGER_CATALOG varchar(512) NO NULL
+TRIGGER_SCHEMA varchar(64) NO NULL
+TRIGGER_NAME varchar(64) NO NULL
+EVENT_MANIPULATION varchar(6) NO NULL
+EVENT_OBJECT_CATALOG varchar(512) NO NULL
+EVENT_OBJECT_SCHEMA varchar(64) NO NULL
+EVENT_OBJECT_TABLE varchar(64) NO NULL
+ACTION_ORDER bigint(4) NO NULL
+ACTION_CONDITION longtext YES NULL
+ACTION_STATEMENT longtext NO NULL
+ACTION_ORIENTATION varchar(9) NO NULL
+ACTION_TIMING varchar(6) NO NULL
+ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL
+ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL
+ACTION_REFERENCE_OLD_ROW varchar(3) NO NULL
+ACTION_REFERENCE_NEW_ROW varchar(3) NO NULL
+CREATED datetime(2) YES NULL
+SQL_MODE varchar(8192) NO NULL
+DEFINER varchar(384) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+SELECT * FROM information_schema.triggers
+WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL
+OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL
+OR action_reference_new_table IS NOT NULL
+ORDER BY trigger_schema, 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 mtr gs_insert INSERT def mtr global_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+def mtr ts_insert INSERT def mtr test_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+##################################################################################
+# Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information
+##################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+DROP USER 'testuser4'@'localhost';
+CREATE USER 'testuser4'@'localhost';
+GRANT TRIGGER ON *.* TO 'testuser1'@'localhost';
+GRANT TRIGGER ON *.* TO 'testuser3'@'localhost';
+GRANT TRIGGER ON *.* TO 'testuser4'@'localhost';
+GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+connect testuser1, localhost, testuser1, , db_datadict;
+CREATE TABLE db_datadict.t1 (f1 INT, f2 INT, f3 INT)
+ENGINE = <engine_type>;
+CREATE TRIGGER trg1 BEFORE INSERT
+ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before;
+GRANT ALL ON db_datadict.t1 TO 'testuser2'@'localhost';
+REVOKE TRIGGER ON db_datadict.t1 FROM 'testuser2'@'localhost';
+GRANT SELECT ON db_datadict.t1 TO 'testuser3'@'localhost';
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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 db_datadict trg1 INSERT def db_datadict t1 1 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connect testuser2, localhost, testuser2, , db_datadict;
+SHOW GRANTS FOR 'testuser2'@'localhost';
+Grants for testuser2@localhost
+GRANT USAGE ON *.* TO `testuser2`@`localhost`
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, DELETE HISTORY ON `db_datadict`.`t1` TO `testuser2`@`localhost`
+# No TRIGGER Privilege --> no result for query
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+connect testuser3, localhost, testuser3, , test;
+SHOW GRANTS FOR 'testuser3'@'localhost';
+Grants for testuser3@localhost
+GRANT TRIGGER ON *.* TO `testuser3`@`localhost`
+GRANT SELECT ON `db_datadict`.`t1` TO `testuser3`@`localhost`
+# TRIGGER Privilege + SELECT Privilege on t1 --> result for query
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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 db_datadict trg1 INSERT def db_datadict t1 1 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connect testuser4, localhost, testuser4, , test;
+SHOW GRANTS FOR 'testuser4'@'localhost';
+Grants for testuser4@localhost
+GRANT TRIGGER ON *.* TO `testuser4`@`localhost`
+# TRIGGER Privilege + no SELECT Privilege on t1 --> result for query
+SELECT * FROM db_datadict.t1;
+ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table `db_datadict`.`t1`
+DESC db_datadict.t1;
+ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table `db_datadict`.`t1`
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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 db_datadict trg1 INSERT def db_datadict t1 1 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+disconnect testuser4;
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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 db_datadict trg1 INSERT def db_datadict t1 1 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP USER 'testuser4'@'localhost';
+DROP DATABASE db_datadict;
+#########################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TRIGGERS modifications
+#########################################################################
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = <engine_type>;
+CREATE TRIGGER db_datadict.trg1 BEFORE INSERT
+ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before;
+INSERT INTO information_schema.triggers
+SELECT * FROM information_schema.triggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.triggers SET trigger_schema = 'test'
+WHERE table_name = 't1';
+Got one of the listed errors
+DELETE FROM information_schema.triggers WHERE trigger_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.triggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_triggers ON information_schema.triggers(trigger_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.triggers DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.triggers ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.triggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.triggers RENAME db_datadict.triggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
+set global sql_mode=@save_sql_mode;
diff --git a/mysql-test/suite/funcs_1/r/is_triggers_embedded.result b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result
new file mode 100644
index 00000000..a1649391
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result
@@ -0,0 +1,235 @@
+set @save_sql_mode=@@global.sql_mode;
+set global sql_mode="";
+SHOW TABLES FROM information_schema LIKE 'TRIGGERS';
+Tables_in_information_schema (TRIGGERS)
+TRIGGERS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.TRIGGERS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TRIGGERS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.TRIGGERS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.TRIGGERS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.12.1: INFORMATION_SCHEMA.TRIGGERS layout
+#########################################################################
+DESCRIBE information_schema.TRIGGERS;
+Field Type Null Key Default Extra
+TRIGGER_CATALOG varchar(512) NO NULL
+TRIGGER_SCHEMA varchar(64) NO NULL
+TRIGGER_NAME varchar(64) NO NULL
+EVENT_MANIPULATION varchar(6) NO NULL
+EVENT_OBJECT_CATALOG varchar(512) NO NULL
+EVENT_OBJECT_SCHEMA varchar(64) NO NULL
+EVENT_OBJECT_TABLE varchar(64) NO NULL
+ACTION_ORDER bigint(4) NO NULL
+ACTION_CONDITION longtext YES NULL
+ACTION_STATEMENT longtext NO NULL
+ACTION_ORIENTATION varchar(9) NO NULL
+ACTION_TIMING varchar(6) NO NULL
+ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL
+ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL
+ACTION_REFERENCE_OLD_ROW varchar(3) NO NULL
+ACTION_REFERENCE_NEW_ROW varchar(3) NO NULL
+CREATED datetime(2) YES NULL
+SQL_MODE varchar(8192) NO NULL
+DEFINER varchar(384) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+SHOW CREATE TABLE information_schema.TRIGGERS;
+Table Create Table
+TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` (
+ `TRIGGER_CATALOG` varchar(512) NOT NULL,
+ `TRIGGER_SCHEMA` varchar(64) NOT NULL,
+ `TRIGGER_NAME` varchar(64) NOT NULL,
+ `EVENT_MANIPULATION` varchar(6) NOT NULL,
+ `EVENT_OBJECT_CATALOG` varchar(512) NOT NULL,
+ `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL,
+ `EVENT_OBJECT_TABLE` varchar(64) NOT NULL,
+ `ACTION_ORDER` bigint(4) NOT NULL,
+ `ACTION_CONDITION` longtext,
+ `ACTION_STATEMENT` longtext NOT NULL,
+ `ACTION_ORIENTATION` varchar(9) NOT NULL,
+ `ACTION_TIMING` varchar(6) NOT NULL,
+ `ACTION_REFERENCE_OLD_TABLE` varchar(64),
+ `ACTION_REFERENCE_NEW_TABLE` varchar(64),
+ `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL,
+ `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL,
+ `CREATED` datetime(2),
+ `SQL_MODE` varchar(8192) NOT NULL,
+ `DEFINER` varchar(384) NOT NULL,
+ `CHARACTER_SET_CLIENT` varchar(32) NOT NULL,
+ `COLLATION_CONNECTION` varchar(64) NOT NULL,
+ `DATABASE_COLLATION` varchar(64) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.TRIGGERS;
+Field Type Null Key Default Extra
+TRIGGER_CATALOG varchar(512) NO NULL
+TRIGGER_SCHEMA varchar(64) NO NULL
+TRIGGER_NAME varchar(64) NO NULL
+EVENT_MANIPULATION varchar(6) NO NULL
+EVENT_OBJECT_CATALOG varchar(512) NO NULL
+EVENT_OBJECT_SCHEMA varchar(64) NO NULL
+EVENT_OBJECT_TABLE varchar(64) NO NULL
+ACTION_ORDER bigint(4) NO NULL
+ACTION_CONDITION longtext YES NULL
+ACTION_STATEMENT longtext NO NULL
+ACTION_ORIENTATION varchar(9) NO NULL
+ACTION_TIMING varchar(6) NO NULL
+ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL
+ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL
+ACTION_REFERENCE_OLD_ROW varchar(3) NO NULL
+ACTION_REFERENCE_NEW_ROW varchar(3) NO NULL
+CREATED datetime(2) YES NULL
+SQL_MODE varchar(8192) NO NULL
+DEFINER varchar(384) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+DATABASE_COLLATION varchar(64) NO NULL
+SELECT * FROM information_schema.triggers
+WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL
+OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL
+OR action_reference_new_table IS NOT NULL
+ORDER BY trigger_schema, 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 mtr gs_insert INSERT def mtr global_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+def mtr ts_insert INSERT def mtr test_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+##################################################################################
+# Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information
+##################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+DROP USER 'testuser4'@'localhost';
+CREATE USER 'testuser4'@'localhost';
+GRANT TRIGGER ON *.* TO 'testuser1'@'localhost';
+GRANT TRIGGER ON *.* TO 'testuser3'@'localhost';
+GRANT TRIGGER ON *.* TO 'testuser4'@'localhost';
+GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+connect testuser1, localhost, testuser1, , db_datadict;
+CREATE TABLE db_datadict.t1 (f1 INT, f2 INT, f3 INT)
+ENGINE = <engine_type>;
+CREATE TRIGGER trg1 BEFORE INSERT
+ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before;
+GRANT ALL ON db_datadict.t1 TO 'testuser2'@'localhost';
+REVOKE TRIGGER ON db_datadict.t1 FROM 'testuser2'@'localhost';
+GRANT SELECT ON db_datadict.t1 TO 'testuser3'@'localhost';
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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 db_datadict trg1 INSERT def db_datadict t1 1 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connect testuser2, localhost, testuser2, , db_datadict;
+SHOW GRANTS FOR 'testuser2'@'localhost';
+# No TRIGGER Privilege --> no result for query
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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 db_datadict trg1 INSERT def db_datadict t1 1 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connect testuser3, localhost, testuser3, , test;
+SHOW GRANTS FOR 'testuser3'@'localhost';
+# TRIGGER Privilege + SELECT Privilege on t1 --> result for query
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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 db_datadict trg1 INSERT def db_datadict t1 1 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connect testuser4, localhost, testuser4, , test;
+SHOW GRANTS FOR 'testuser4'@'localhost';
+# TRIGGER Privilege + no SELECT Privilege on t1 --> result for query
+SELECT * FROM db_datadict.t1;
+f1 f2 f3
+DESC db_datadict.t1;
+Field Type Null Key Default Extra
+f1 int(11) YES NULL
+f2 int(11) YES NULL
+f3 int(11) YES NULL
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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 db_datadict trg1 INSERT def db_datadict t1 1 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+disconnect testuser4;
+SELECT * FROM information_schema.triggers
+WHERE trigger_name = 'trg1';
+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 db_datadict trg1 INSERT def db_datadict t1 1 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW TRIGGERS FROM db_datadict;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP USER 'testuser4'@'localhost';
+DROP DATABASE db_datadict;
+#########################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TRIGGERS modifications
+#########################################################################
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = <engine_type>;
+CREATE TRIGGER db_datadict.trg1 BEFORE INSERT
+ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before;
+INSERT INTO information_schema.triggers
+SELECT * FROM information_schema.triggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.triggers SET trigger_schema = 'test'
+WHERE table_name = 't1';
+Got one of the listed errors
+DELETE FROM information_schema.triggers WHERE trigger_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.triggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_triggers ON information_schema.triggers(trigger_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.triggers DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.triggers ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.triggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.triggers RENAME db_datadict.triggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
+set global sql_mode=@save_sql_mode;
diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result
new file mode 100644
index 00000000..a2a68383
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result
@@ -0,0 +1,758 @@
+SHOW TABLES FROM information_schema LIKE 'USER_PRIVILEGES';
+Tables_in_information_schema (USER_PRIVILEGES)
+USER_PRIVILEGES
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.USER_PRIVILEGES;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.USER_PRIVILEGES;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.USER_PRIVILEGES;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.USER_PRIVILEGES;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.16.1: INFORMATION_SCHEMA.USER_PRIVILEGES layout
+#########################################################################
+DESCRIBE information_schema.USER_PRIVILEGES;
+Field Type Null Key Default Extra
+GRANTEE varchar(385) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+PRIVILEGE_TYPE varchar(64) NO NULL
+IS_GRANTABLE varchar(3) NO NULL
+SHOW CREATE TABLE information_schema.USER_PRIVILEGES;
+Table Create Table
+USER_PRIVILEGES CREATE TEMPORARY TABLE `USER_PRIVILEGES` (
+ `GRANTEE` varchar(385) NOT NULL,
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `PRIVILEGE_TYPE` varchar(64) NOT NULL,
+ `IS_GRANTABLE` varchar(3) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.USER_PRIVILEGES;
+Field Type Null Key Default Extra
+GRANTEE varchar(385) NO NULL
+TABLE_CATALOG varchar(512) NO NULL
+PRIVILEGE_TYPE varchar(64) NO NULL
+IS_GRANTABLE varchar(3) NO NULL
+SELECT grantee, table_catalog, privilege_type
+FROM information_schema.user_privileges
+WHERE table_catalog IS NULL OR table_catalog <> 'def';
+grantee table_catalog privilege_type
+##########################################################################
+# Testcases 3.2.16.2+3.2.16.3+3.2.16.4: INFORMATION_SCHEMA.USER_PRIVILEGES
+# accessible information
+##########################################################################
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
+GRANT INSERT ON *.* TO 'testuser2'@'localhost';
+GRANT UPDATE ON *.* TO 'testuser2'@'localhost';
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE INSERT
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE UPDATE
+IS_GRANTABLE NO
+GRANTEE 'testuser3'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+#
+# Add GRANT OPTION db_datadict.* to testuser1;
+GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE INSERT
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE UPDATE
+IS_GRANTABLE NO
+GRANTEE 'testuser3'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+connect testuser1, localhost, testuser1, , db_datadict;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+SHOW GRANTS;
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT SELECT, UPDATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
+GRANT SELECT ON `mysql`.`global_priv` TO `testuser1`@`localhost`
+
+# Now add SELECT on *.* to testuser1;
+connection default;
+GRANT SELECT ON *.* TO 'testuser1'@'localhost';
+#
+# Here <SELECT NO> is shown correctly for testuser1;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE SELECT
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE INSERT
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE UPDATE
+IS_GRANTABLE NO
+GRANTEE 'testuser3'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 1,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+#
+# Here <SELECT YES> is shown correctly for testuser1;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE SELECT
+IS_GRANTABLE YES
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE INSERT
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE UPDATE
+IS_GRANTABLE NO
+GRANTEE 'testuser3'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 1025,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+connection testuser1;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE SELECT
+IS_GRANTABLE YES
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 1025,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+SHOW GRANTS;
+Grants for testuser1@localhost
+GRANT SELECT ON *.* TO `testuser1`@`localhost` WITH GRANT OPTION
+GRANT SELECT, UPDATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
+GRANT SELECT ON `mysql`.`global_priv` TO `testuser1`@`localhost`
+connect testuser2, localhost, testuser2, , db_datadict;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE INSERT
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE UPDATE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table `mysql`.`global_priv`
+SHOW GRANTS;
+Grants for testuser2@localhost
+GRANT INSERT, UPDATE ON *.* TO `testuser2`@`localhost`
+connect testuser3, localhost, testuser3, ,"*NO-ONE*";
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser3'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table `mysql`.`global_priv`
+SHOW GRANTS;
+Grants for testuser3@localhost
+GRANT USAGE ON *.* TO `testuser3`@`localhost`
+
+# Revoke privileges from testuser1;
+connection default;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost';
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE INSERT
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE UPDATE
+IS_GRANTABLE NO
+GRANTEE 'testuser3'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+connection testuser1;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `mysql`.`global_priv`
+SHOW GRANTS;
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+CREATE TABLE db_datadict.tb_55 ( c1 TEXT );
+ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table `db_datadict`.`tb_55`
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `mysql`.`global_priv`
+SHOW GRANTS;
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+CREATE TABLE db_datadict.tb_66 ( c1 TEXT );
+ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table `db_datadict`.`tb_66`
+
+# Add ALL on db_datadict.* (and select on mysql.global_priv) to testuser1;
+connection default;
+GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE INSERT
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE UPDATE
+IS_GRANTABLE NO
+GRANTEE 'testuser3'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+connection testuser1;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+SHOW GRANTS;
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
+GRANT SELECT ON `mysql`.`global_priv` TO `testuser1`@`localhost`
+CREATE TABLE db_datadict.tb_56 ( c1 TEXT );
+ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table `db_datadict`.`tb_56`
+USE db_datadict;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+SHOW GRANTS;
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT ALL PRIVILEGES ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
+GRANT SELECT ON `mysql`.`global_priv` TO `testuser1`@`localhost`
+CREATE TABLE tb_57 ( c1 TEXT )
+ENGINE = <other_engine_type>;
+
+# Revoke privileges from testuser1;
+connection default;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost';
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE INSERT
+IS_GRANTABLE NO
+GRANTEE 'testuser2'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE UPDATE
+IS_GRANTABLE NO
+GRANTEE 'testuser3'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+connection testuser1;
+SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `mysql`.`global_priv`
+SHOW GRANTS;
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+CREATE TABLE db_datadict.tb_58 ( c1 TEXT )
+ENGINE = <other_engine_type>;
+USE db_datadict;
+ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'db_datadict'
+CREATE TABLE db_datadict.tb_59 ( c1 TEXT )
+ENGINE = <other_engine_type>;
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE IF EXISTS db_datadict;
+########################################################################################
+# Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.USER_PRIVILEGES modifications
+########################################################################################
+SELECT * FROM information_schema.user_privileges
+WHERE grantee = '''testuser1''@''localhost''';
+SHOW GRANTS FOR 'testuser1'@'localhost';
+ERROR 42000: There is no such grant defined for user 'testuser1' on host 'localhost'
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+SELECT * FROM information_schema.user_privileges
+WHERE grantee = '''testuser1''@''localhost''';
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE USAGE
+IS_GRANTABLE NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT USAGE ON *.* TO `testuser1`@`localhost`
+GRANT SELECT, FILE ON *.* TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.user_privileges
+WHERE grantee = '''testuser1''@''localhost''';
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE SELECT
+IS_GRANTABLE NO
+GRANTEE 'testuser1'@'localhost'
+TABLE_CATALOG def
+PRIVILEGE_TYPE FILE
+IS_GRANTABLE NO
+SHOW GRANTS FOR 'testuser1'@'localhost';
+Grants for testuser1@localhost
+GRANT SELECT, FILE ON *.* TO `testuser1`@`localhost`
+DROP USER 'testuser1'@'localhost';
+SELECT * FROM information_schema.user_privileges
+WHERE grantee = '''testuser1''@''localhost''';
+SHOW GRANTS FOR 'testuser1'@'localhost';
+ERROR 42000: There is no such grant defined for user 'testuser1' on host 'localhost'
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA tables are not supported
+########################################################################
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+INSERT INTO information_schema.user_privileges
+SELECT * FROM information_schema.user_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.user_privileges
+SET PRIVILEGE_TYPE = 'gaming';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM information_schema.user_privileges
+WHERE grantee = '''testuser1''@''localhost''';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.user_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX i1 ON information_schema.user_privileges(grantee);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.user_privileges ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.user_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.user_privileges
+RENAME db_datadict.user_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.user_privileges
+RENAME information_schema.xuser_privileges;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP USER 'testuser1'@'localhost';
diff --git a/mysql-test/suite/funcs_1/r/is_views.result b/mysql-test/suite/funcs_1/r/is_views.result
new file mode 100644
index 00000000..6a86e746
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_views.result
@@ -0,0 +1,256 @@
+SHOW TABLES FROM information_schema LIKE 'VIEWS';
+Tables_in_information_schema (VIEWS)
+VIEWS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.VIEWS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.VIEWS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.VIEWS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.VIEWS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.13.1: INFORMATION_SCHEMA.VIEWS layout
+#########################################################################
+DESCRIBE information_schema.VIEWS;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+VIEW_DEFINITION longtext NO NULL
+CHECK_OPTION varchar(8) NO NULL
+IS_UPDATABLE varchar(3) NO NULL
+DEFINER varchar(384) NO NULL
+SECURITY_TYPE varchar(7) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+ALGORITHM varchar(10) NO NULL
+SHOW CREATE TABLE information_schema.VIEWS;
+Table Create Table
+VIEWS CREATE TEMPORARY TABLE `VIEWS` (
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `VIEW_DEFINITION` longtext NOT NULL,
+ `CHECK_OPTION` varchar(8) NOT NULL,
+ `IS_UPDATABLE` varchar(3) NOT NULL,
+ `DEFINER` varchar(384) NOT NULL,
+ `SECURITY_TYPE` varchar(7) NOT NULL,
+ `CHARACTER_SET_CLIENT` varchar(32) NOT NULL,
+ `COLLATION_CONNECTION` varchar(64) NOT NULL,
+ `ALGORITHM` varchar(10) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.VIEWS;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+VIEW_DEFINITION longtext NO NULL
+CHECK_OPTION varchar(8) NO NULL
+IS_UPDATABLE varchar(3) NO NULL
+DEFINER varchar(384) NO NULL
+SECURITY_TYPE varchar(7) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+ALGORITHM varchar(10) NO NULL
+SELECT table_catalog, table_schema, table_name
+FROM information_schema.views WHERE table_catalog <> 'def';
+table_catalog table_schema table_name
+################################################################################
+# Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information
+################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'test_no_views'@'localhost';
+CREATE USER 'test_no_views'@'localhost';
+CREATE TABLE db_datadict.t1(f1 INT, f2 INT, f3 INT)
+ENGINE = <engine_type>;
+CREATE VIEW db_datadict.v_granted_to_1 AS SELECT * FROM db_datadict.t1;
+CREATE VIEW db_datadict.v_granted_glob AS SELECT f2, f3 FROM db_datadict.t1;
+GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.v_granted_to_1 TO 'testuser1'@'localhost';
+GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'testuser2'@'localhost';
+SELECT * FROM information_schema.views
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def db_datadict v_granted_glob select `db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+def db_datadict v_granted_to_1 select `db_datadict`.`t1`.`f1` AS `f1`,`db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+connect testuser1, localhost, testuser1, ,"*NO-ONE*";
+SELECT * FROM information_schema.views
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def db_datadict v_granted_to_1 NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+connect testuser2, localhost, testuser2, ,"*NO-ONE*";
+SELECT * FROM information_schema.views
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def db_datadict v_granted_glob NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+def db_datadict v_granted_to_1 NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+connect test_no_views, localhost, test_no_views, ,"*NO-ONE*";
+SELECT * FROM information_schema.views
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect test_no_views;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'test_no_views'@'localhost';
+DROP DATABASE db_datadict;
+#########################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.VIEWS modifications
+#########################################################################
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = <engine_type>;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+SELECT * FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema, table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table;
+CREATE ALGORITHM=MERGE VIEW test.t1_view1 AS SELECT f1 FROM test.t1_table;
+CREATE ALGORITHM=TEMPTABLE VIEW test.t1_view2 AS SELECT f1 FROM test.t1_table;
+SELECT * FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema, table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def test t1_view select distinct `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+def test t1_view1 select `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci MERGE
+def test t1_view2 select `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci TEMPTABLE
+DROP VIEW test.t1_view1;
+DROP VIEW test.t1_view2;
+SELECT table_name,definer FROM information_schema.views
+WHERE table_name = 't1_view';
+table_name definer
+t1_view root@localhost
+ALTER DEFINER = 'testuser1'@'localhost' VIEW test.t1_view AS
+SELECT DISTINCT f1 FROM test.t1_table;
+SELECT table_name,definer,security_type FROM information_schema.views
+WHERE table_name LIKE 't1_%';
+table_name definer security_type
+t1_view testuser1@localhost DEFINER
+ALTER DEFINER = 'root'@'localhost' SQL SECURITY INVOKER VIEW test.t1_view AS
+SELECT f1 FROM test.t1_table WITH LOCAL CHECK OPTION;
+SELECT table_name,definer,security_type FROM information_schema.views
+WHERE table_name LIKE 't1_%';
+table_name definer security_type
+t1_view root@localhost INVOKER
+SELECT table_schema,table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+table_schema table_name
+test t1_view
+RENAME TABLE test.t1_view TO db_datadict.t1_view;
+ERROR HY000: Changing schema from 'test' to 'db_datadict' is not allowed
+DROP VIEW test.t1_view;
+CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table;
+SELECT table_schema,table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+table_schema table_name
+db_datadict t1_view
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_view
+RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_viewx
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_viewx
+DROP VIEW db_datadict.t1_viewx;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_view
+DROP TABLE test.t1_table;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_view
+CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT = 'Initial Comment'
+ENGINE = <engine_type>;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_view
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+DROP USER 'testuser1'@'localhost';
+DROP TABLE test.t1_table;
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE VIEW db_datadict.v1 AS SELECT 1;
+INSERT INTO information_schema.views
+SELECT * FROM information_schema.views;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+INSERT INTO information_schema.views(table_schema, table_name)
+VALUES ('db2', 'v2');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.views SET table_schema = 'test'
+WHERE table_name = 't1';
+Got one of the listed errors
+DELETE FROM information_schema.views WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.views;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_views ON information_schema.views(table_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.views DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.views ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.views;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.views RENAME db_datadict.views;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.views RENAME information_schema.xviews;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/is_views_embedded.result b/mysql-test/suite/funcs_1/r/is_views_embedded.result
new file mode 100644
index 00000000..f64562aa
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_views_embedded.result
@@ -0,0 +1,259 @@
+SHOW TABLES FROM information_schema LIKE 'VIEWS';
+Tables_in_information_schema (VIEWS)
+VIEWS
+#######################################################################
+# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+#######################################################################
+DROP VIEW IF EXISTS test.v1;
+DROP PROCEDURE IF EXISTS test.p1;
+DROP FUNCTION IF EXISTS test.f1;
+CREATE VIEW test.v1 AS SELECT * FROM information_schema.VIEWS;
+CREATE PROCEDURE test.p1() SELECT * FROM information_schema.VIEWS;
+CREATE FUNCTION test.f1() returns BIGINT
+BEGIN
+DECLARE counter BIGINT DEFAULT NULL;
+SELECT COUNT(*) INTO counter FROM information_schema.VIEWS;
+RETURN counter;
+END//
+# Attention: The printing of the next result sets is disabled.
+SELECT * FROM information_schema.VIEWS;
+SELECT * FROM test.v1;
+CALL test.p1;
+SELECT test.f1();
+DROP VIEW test.v1;
+DROP PROCEDURE test.p1;
+DROP FUNCTION test.f1;
+#########################################################################
+# Testcase 3.2.13.1: INFORMATION_SCHEMA.VIEWS layout
+#########################################################################
+DESCRIBE information_schema.VIEWS;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+VIEW_DEFINITION longtext NO NULL
+CHECK_OPTION varchar(8) NO NULL
+IS_UPDATABLE varchar(3) NO NULL
+DEFINER varchar(384) NO NULL
+SECURITY_TYPE varchar(7) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+ALGORITHM varchar(10) NO NULL
+SHOW CREATE TABLE information_schema.VIEWS;
+Table Create Table
+VIEWS CREATE TEMPORARY TABLE `VIEWS` (
+ `TABLE_CATALOG` varchar(512) NOT NULL,
+ `TABLE_SCHEMA` varchar(64) NOT NULL,
+ `TABLE_NAME` varchar(64) NOT NULL,
+ `VIEW_DEFINITION` longtext NOT NULL,
+ `CHECK_OPTION` varchar(8) NOT NULL,
+ `IS_UPDATABLE` varchar(3) NOT NULL,
+ `DEFINER` varchar(384) NOT NULL,
+ `SECURITY_TYPE` varchar(7) NOT NULL,
+ `CHARACTER_SET_CLIENT` varchar(32) NOT NULL,
+ `COLLATION_CONNECTION` varchar(64) NOT NULL,
+ `ALGORITHM` varchar(10) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW COLUMNS FROM information_schema.VIEWS;
+Field Type Null Key Default Extra
+TABLE_CATALOG varchar(512) NO NULL
+TABLE_SCHEMA varchar(64) NO NULL
+TABLE_NAME varchar(64) NO NULL
+VIEW_DEFINITION longtext NO NULL
+CHECK_OPTION varchar(8) NO NULL
+IS_UPDATABLE varchar(3) NO NULL
+DEFINER varchar(384) NO NULL
+SECURITY_TYPE varchar(7) NO NULL
+CHARACTER_SET_CLIENT varchar(32) NO NULL
+COLLATION_CONNECTION varchar(64) NO NULL
+ALGORITHM varchar(10) NO NULL
+SELECT table_catalog, table_schema, table_name
+FROM information_schema.views WHERE table_catalog <> 'def';
+table_catalog table_schema table_name
+################################################################################
+# Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information
+################################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+DROP USER 'test_no_views'@'localhost';
+CREATE USER 'test_no_views'@'localhost';
+CREATE TABLE db_datadict.t1(f1 INT, f2 INT, f3 INT)
+ENGINE = <engine_type>;
+CREATE VIEW db_datadict.v_granted_to_1 AS SELECT * FROM db_datadict.t1;
+CREATE VIEW db_datadict.v_granted_glob AS SELECT f2, f3 FROM db_datadict.t1;
+GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.v_granted_to_1 TO 'testuser1'@'localhost';
+GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'testuser2'@'localhost';
+SELECT * FROM information_schema.views
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def db_datadict v_granted_glob select `db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+def db_datadict v_granted_to_1 select `db_datadict`.`t1`.`f1` AS `f1`,`db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+connect testuser1, localhost, testuser1, ,"*NO-ONE*";
+SELECT * FROM information_schema.views
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def db_datadict v_granted_glob NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+def db_datadict v_granted_to_1 NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+connect testuser2, localhost, testuser2, ,"*NO-ONE*";
+SELECT * FROM information_schema.views
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def db_datadict v_granted_glob NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+def db_datadict v_granted_to_1 NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+connect test_no_views, localhost, test_no_views, ,"*NO-ONE*";
+SELECT * FROM information_schema.views
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def db_datadict v_granted_glob NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+def db_datadict v_granted_to_1 NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect test_no_views;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'test_no_views'@'localhost';
+DROP DATABASE db_datadict;
+#########################################################################
+# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.VIEWS modifications
+#########################################################################
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = <engine_type>;
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+SELECT * FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema, table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table;
+CREATE ALGORITHM=MERGE VIEW test.t1_view1 AS SELECT f1 FROM test.t1_table;
+CREATE ALGORITHM=TEMPTABLE VIEW test.t1_view2 AS SELECT f1 FROM test.t1_table;
+SELECT * FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema, table_name;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def test t1_view select distinct `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
+def test t1_view1 select `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci MERGE
+def test t1_view2 select `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci TEMPTABLE
+DROP VIEW test.t1_view1;
+DROP VIEW test.t1_view2;
+SELECT table_name,definer FROM information_schema.views
+WHERE table_name = 't1_view';
+table_name definer
+t1_view root@localhost
+ALTER DEFINER = 'testuser1'@'localhost' VIEW test.t1_view AS
+SELECT DISTINCT f1 FROM test.t1_table;
+SELECT table_name,definer,security_type FROM information_schema.views
+WHERE table_name LIKE 't1_%';
+table_name definer security_type
+t1_view testuser1@localhost DEFINER
+ALTER DEFINER = 'root'@'localhost' SQL SECURITY INVOKER VIEW test.t1_view AS
+SELECT f1 FROM test.t1_table WITH LOCAL CHECK OPTION;
+SELECT table_name,definer,security_type FROM information_schema.views
+WHERE table_name LIKE 't1_%';
+table_name definer security_type
+t1_view root@localhost INVOKER
+SELECT table_schema,table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+table_schema table_name
+test t1_view
+RENAME TABLE test.t1_view TO db_datadict.t1_view;
+ERROR HY000: Changing schema from 'test' to 'db_datadict' is not allowed
+DROP VIEW test.t1_view;
+CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table;
+SELECT table_schema,table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+table_schema table_name
+db_datadict t1_view
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_view
+RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_viewx
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_viewx
+DROP VIEW db_datadict.t1_viewx;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_view
+DROP TABLE test.t1_table;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_view
+CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT = 'Initial Comment'
+ENGINE = <engine_type>;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+t1_view
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.views
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+table_name
+DROP USER 'testuser1'@'localhost';
+DROP TABLE test.t1_table;
+########################################################################
+# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+# DDL on INFORMATION_SCHEMA table are not supported
+########################################################################
+DROP DATABASE IF EXISTS db_datadict;
+CREATE DATABASE db_datadict;
+CREATE VIEW db_datadict.v1 AS SELECT 1;
+INSERT INTO information_schema.views
+SELECT * FROM information_schema.views;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+INSERT INTO information_schema.views(table_schema, table_name)
+VALUES ('db2', 'v2');
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+UPDATE information_schema.views SET table_schema = 'test'
+WHERE table_name = 't1';
+Got one of the listed errors
+DELETE FROM information_schema.views WHERE table_name = 't1';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE information_schema.views;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE INDEX my_idx_on_views ON information_schema.views(table_schema);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.views DROP PRIMARY KEY;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.views ADD f1 INT;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE information_schema.views;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.views RENAME db_datadict.views;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE information_schema.views RENAME information_schema.xviews;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/r/memory_bitdata.result b/mysql-test/suite/funcs_1/r/memory_bitdata.result
new file mode 100644
index 00000000..893758ab
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_bitdata.result
@@ -0,0 +1,4 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+NOT YET IMPLEMENTED: bitdata tests
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_cursors.result b/mysql-test/suite/funcs_1/r/memory_cursors.result
new file mode 100644
index 00000000..205f2149
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_cursors.result
@@ -0,0 +1,4 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+NOT YET IMPLEMENTED: cursor tests
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result
new file mode 100644
index 00000000..e9b88b93
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result
@@ -0,0 +1,5265 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+SET timestamp=unix_timestamp('2001-02-03 10:20:30');
+DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1_values
+(
+id BIGINT AUTO_INCREMENT,
+select_id BIGINT,
+PRIMARY KEY(id)
+) ENGINE = <engine_to_be_tested>;
+ALTER TABLE t1_values ADD my_char_30 CHAR(30);
+ALTER TABLE t1_values ADD my_varchar_1000 VARCHAR(1000);
+ALTER TABLE t1_values ADD my_binary_30 BINARY(30);
+ALTER TABLE t1_values ADD my_varbinary_1000 VARBINARY(1000);
+ALTER TABLE t1_values ADD my_datetime DATETIME;
+ALTER TABLE t1_values ADD my_date DATE;
+ALTER TABLE t1_values ADD ts_dummy TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
+ALTER TABLE t1_values ADD my_timestamp TIMESTAMP NOT NULL DEFAULT '2001-01-01 10:20:30';
+ALTER TABLE t1_values ADD my_time TIME;
+ALTER TABLE t1_values ADD my_year YEAR;
+ALTER TABLE t1_values ADD my_bigint BIGINT;
+ALTER TABLE t1_values ADD my_double DOUBLE;
+ALTER TABLE t1_values ADD my_decimal DECIMAL(64,30);
+SET sql_mode = 'traditional';
+INSERT INTO t1_values SET id = 0;
+INSERT INTO t1_values SET
+my_char_30 = '',
+my_varchar_1000 = '',
+my_binary_30 = '',
+my_varbinary_1000 = '',
+my_datetime = '0001-01-01 00:00:00',
+my_date = '0001-01-01',
+my_timestamp = '1970-01-01 14:00:01',
+my_time = '-838:59:59',
+my_year = '1901',
+my_bigint = -9223372036854775808,
+my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 ,
+my_double = -1.7976931348623E+308;
+INSERT INTO t1_values SET
+my_char_30 = '<--------30 characters------->',
+my_varchar_1000 = CONCAT('<---------1000 characters',
+RPAD('',965,'-'),'--------->'),
+my_binary_30 = '<--------30 characters------->',
+my_varbinary_1000 = CONCAT('<---------1000 characters',
+RPAD('',965,'-'),'--------->'),
+my_datetime = '9999-12-31 23:59:59',
+my_date = '9999-12-31',
+my_timestamp = '2038-01-01 02:59:59',
+my_time = '838:59:59',
+my_year = 2155,
+my_bigint = 9223372036854775807,
+my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 ,
+my_double = 1.7976931348623E+308;
+INSERT INTO t1_values SET
+my_char_30 = ' ---äÖüß@µ*$-- ',
+my_varchar_1000 = ' ---äÖüß@µ*$-- ',
+my_binary_30 = ' ---äÖüß@µ*$-- ',
+my_varbinary_1000 = ' ---äÖüß@µ*$-- ',
+my_datetime = '2004-02-29 23:59:59',
+my_date = '2004-02-29',
+my_timestamp = '2004-02-29 23:59:59',
+my_time = '13:00:00',
+my_year = 2000,
+my_bigint = 0,
+my_decimal = 0.0,
+my_double = 0;
+INSERT INTO t1_values SET
+my_char_30 = '-1',
+my_varchar_1000 = '-1',
+my_binary_30 = '-1',
+my_varbinary_1000 = '-1',
+my_datetime = '2005-06-28 10:00:00',
+my_date = '2005-06-28',
+my_timestamp = '2005-06-28 10:00:00',
+my_time = '10:00:00',
+my_year = 2005,
+my_bigint = -1,
+my_decimal = -1.000000000000000000000000000000,
+my_double = -0.1E+1;
+PREPARE ins_sel_with_result FROM "INSERT INTO t1_selects SET my_select = @my_select,
+disable_result = 'No'" ;
+PREPARE ins_sel_no_result FROM "INSERT INTO t1_selects SET my_select = @my_select,
+disable_result = 'Yes'" ;
+SET sql_mode = 'traditional';
+SET @my_select = 'SELECT sqrt(my_bigint), my_bigint, id FROM t1_values';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 4;
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = -25;
+##### 1.1.1. CAST --> BINARY
+##### 1.1.2. CAST --> CHAR
+##### 1.1.3. CAST --> DATE
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 20050627;
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = +20.050627E+6;
+##### 1.1.4. CAST --> DATETIME
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 200506271758;
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = +0.0200506271758E+13;
+##### 1.1.5. CAST --> TIME
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 1758;
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = +1.758E+3;
+##### 1.1.6. CAST --> DECIMAL
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = -0.33333333E+4;
+##### 1.1.7. CAST --> SIGNED INTEGER
+
+"Attention: CAST --> SIGNED INTEGER
+ Bug#5913 Traditional mode: BIGINT range not correctly delimited
+ Status: To be fixed later"
+--------------------------------------------------------------------------------
+##### 1.1.8. CAST --> UNSIGNED INTEGER
+
+"Attention: CAST --> UNSIGNED INTEGER
+ The file with expected results suffers from Bug 5913"
+--------------------------------------------------------------------------------
+
+some statements disabled because of
+Bug#5913 Traditional mode: BIGINT range not correctly delimited
+--------------------------------------------------------------------------------
+SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT INSTR(my_char_30, ''char''),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LCASE(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt'')
+ AS my_col,
+ id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_char_30 ),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_varchar_1000 ),
+my_char_30, my_varchar_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_binary_30 ),
+my_char_30, my_binary_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_varbinary_1000 ),
+my_char_30, my_varbinary_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_char_30 ),
+my_varchar_1000, my_char_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_binary_30 ),
+my_varchar_1000, my_binary_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
+my_varchar_1000, my_varbinary_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_binary_30 ),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_char_30 ),
+my_binary_30, my_char_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_varchar_1000 ),
+my_binary_30, my_varchar_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
+my_binary_30, my_varbinary_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_char_30 ),
+my_varbinary_1000, my_char_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
+my_varbinary_1000, my_varchar_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
+my_varbinary_1000, my_binary_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_char_30, 3),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_varchar_1000, 3),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_binary_30, 3),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_varbinary_1000, 3),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_bigint),
+my_bigint, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_double),
+my_double, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_decimal),
+my_decimal, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select =
+'SELECT CONCAT(''A'',my_char_30), my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT my_char_30, id FROM t1_values';
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = 'Viana do Castelo';
+SET sql_mode = '';
+
+"# The basic preparations end and the main test starts here"
+--------------------------------------------------------------------------------
+CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values;
+SELECT my_char_30, id FROM t1_values
+WHERE select_id = 193 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 193 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values;
+SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values
+WHERE select_id = 192 OR select_id IS NULL order by id;
+CONCAT('A',my_char_30) my_char_30 id
+NULL NULL 1
+A 2
+A<--------30 characters-------> <--------30 characters-------> 3
+A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+A-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 192 OR select_id IS NULL) order by id;
+CONCAT('A',my_char_30) my_char_30 id
+NULL NULL 1
+A 2
+A<--------30 characters-------> <--------30 characters-------> 3
+A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+A-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LTRIM(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 191 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 191 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LTRIM(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 190 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 190 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LTRIM(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 189 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 189 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LTRIM(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 188 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 188 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOWER(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 187 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 187 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LOWER(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 186 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 186 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LOWER(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 185 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 185 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LOWER(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 184 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 184 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_decimal),
+my_decimal, id FROM t1_values;
+SELECT LOCATE('-', ' - -ABC', my_decimal),
+my_decimal, id FROM t1_values
+WHERE select_id = 183 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 183 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_double),
+my_double, id FROM t1_values;
+SELECT LOCATE('-', ' - -ABC', my_double),
+my_double, id FROM t1_values
+WHERE select_id = 182 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 182 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_bigint),
+my_bigint, id FROM t1_values;
+SELECT LOCATE('-', ' - -ABC', my_bigint),
+my_bigint, id FROM t1_values
+WHERE select_id = 181 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 181 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_varbinary_1000, 3),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOCATE('-', my_varbinary_1000, 3),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 180 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 180 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_binary_30, 3),
+my_binary_30, id FROM t1_values;
+SELECT LOCATE('-', my_binary_30, 3),
+my_binary_30, id FROM t1_values
+WHERE select_id = 179 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 179 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_varchar_1000, 3),
+my_varchar_1000, id FROM t1_values;
+SELECT LOCATE('-', my_varchar_1000, 3),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 178 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 178 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_char_30, 3),
+my_char_30, id FROM t1_values;
+SELECT LOCATE('-', my_char_30, 3),
+my_char_30, id FROM t1_values
+WHERE select_id = 177 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 177 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
+my_varbinary_1000, my_binary_30 id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
+my_varbinary_1000, my_binary_30 id FROM t1_values
+WHERE select_id = 176 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 176 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
+my_varbinary_1000, my_varchar_1000 id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
+my_varbinary_1000, my_varchar_1000 id FROM t1_values
+WHERE select_id = 175 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 175 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_char_30 ),
+my_varbinary_1000, my_char_30 id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_char_30 ),
+my_varbinary_1000, my_char_30 id FROM t1_values
+WHERE select_id = 174 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 174 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 173 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 173 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
+my_binary_30, my_varbinary_1000 id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
+my_binary_30, my_varbinary_1000 id FROM t1_values
+WHERE select_id = 172 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 172 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varchar_1000 ),
+my_binary_30, my_varchar_1000 id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_varchar_1000 ),
+my_binary_30, my_varchar_1000 id FROM t1_values
+WHERE select_id = 171 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 171 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_char_30 ),
+my_binary_30, my_char_30 id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_char_30 ),
+my_binary_30, my_char_30 id FROM t1_values
+WHERE select_id = 170 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 170 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_binary_30 ),
+my_binary_30, id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_binary_30 ),
+my_binary_30, id FROM t1_values
+WHERE select_id = 169 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 169 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
+my_varchar_1000, my_varbinary_1000 id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
+my_varchar_1000, my_varbinary_1000 id FROM t1_values
+WHERE select_id = 168 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 168 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_binary_30 ),
+my_varchar_1000, my_binary_30 id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_binary_30 ),
+my_varchar_1000, my_binary_30 id FROM t1_values
+WHERE select_id = 167 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 167 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_char_30 ),
+my_varchar_1000, my_char_30 id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_char_30 ),
+my_varchar_1000, my_char_30 id FROM t1_values
+WHERE select_id = 166 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 166 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
+my_varchar_1000, id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 165 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 165 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varbinary_1000 ),
+my_char_30, my_varbinary_1000 id FROM t1_values;
+SELECT LOCATE(my_char_30, my_varbinary_1000 ),
+my_char_30, my_varbinary_1000 id FROM t1_values
+WHERE select_id = 164 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 164 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_binary_30 ),
+my_char_30, my_binary_30 id FROM t1_values;
+SELECT LOCATE(my_char_30, my_binary_30 ),
+my_char_30, my_binary_30 id FROM t1_values
+WHERE select_id = 163 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 163 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varchar_1000 ),
+my_char_30, my_varchar_1000 id FROM t1_values;
+SELECT LOCATE(my_char_30, my_varchar_1000 ),
+my_char_30, my_varchar_1000 id FROM t1_values
+WHERE select_id = 162 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 162 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_char_30 ),
+my_char_30, id FROM t1_values;
+SELECT LOCATE(my_char_30, my_char_30 ),
+my_char_30, id FROM t1_values
+WHERE select_id = 161 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 161 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOCATE('char', my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 160 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 160 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LOCATE('char', my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 159 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 159 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LOCATE('char', my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 158 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 158 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LOCATE('char', my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 157 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 157 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt')
+ AS my_col,
+ id FROM t1_values;
+SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt')
+ AS my_col,
+ id FROM t1_values
+WHERE select_id = 156 OR select_id IS NULL order by id;
+my_col id
+Here is content from load_file
+ 1
+Here is content from load_file
+ 2
+Here is content from load_file
+ 3
+Here is content from load_file
+ 4
+Here is content from load_file
+ 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 156 OR select_id IS NULL) order by id;
+my_col id
+Here is content from load_file
+ 1
+Here is content from load_file
+ 2
+Here is content from load_file
+ 3
+Here is content from load_file
+ 4
+Here is content from load_file
+ 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 155 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 155 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 154 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 154 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 153 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 153 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LENGTH(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 152 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 152 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values;
+SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values
+WHERE select_id = 151 OR select_id IS NULL order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id
+NULL NULL 1
+ -1.7976931348623e308 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
+ 0 4
+ -1 5
+Warnings:
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 151 OR select_id IS NULL) order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id
+NULL NULL 1
+ -1.7976931348623e308 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
+ 0 4
+ -1 5
+Warnings:
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values;
+SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values
+WHERE select_id = 150 OR select_id IS NULL order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id
+NULL NULL 1
+ -9999999999999999999999999999999999.999999999999999999999999999999 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3
+ 0.000000000000000000000000000000 4
+ -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 150 OR select_id IS NULL) order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id
+NULL NULL 1
+ -9999999999999999999999999999999999.999999999999999999999999999999 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3
+ 0.000000000000000000000000000000 4
+ -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values;
+SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values
+WHERE select_id = 149 OR select_id IS NULL order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id
+NULL NULL 1
+ -9223372036854775808 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3
+ 0 4
+ -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 149 OR select_id IS NULL) order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id
+NULL NULL 1
+ -9223372036854775808 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3
+ 0 4
+ -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values;
+SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values
+WHERE select_id = 148 OR select_id IS NULL order by id;
+LEFT(my_varbinary_1000, 2) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 148 OR select_id IS NULL) order by id;
+LEFT(my_varbinary_1000, 2) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values;
+SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values
+WHERE select_id = 147 OR select_id IS NULL order by id;
+LEFT(my_binary_30, 2) my_binary_30 id
+NULL NULL 1
+ 2
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 147 OR select_id IS NULL) order by id;
+LEFT(my_binary_30, 2) my_binary_30 id
+NULL NULL 1
+
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$--
+-1 -1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values;
+SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values
+WHERE select_id = 146 OR select_id IS NULL order by id;
+LEFT(my_varchar_1000, 2) my_varchar_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 146 OR select_id IS NULL) order by id;
+LEFT(my_varchar_1000, 2) my_varchar_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values;
+SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values
+WHERE select_id = 145 OR select_id IS NULL order by id;
+LEFT(my_char_30, 2) my_char_30 id
+NULL NULL 1
+ 2
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 145 OR select_id IS NULL) order by id;
+LEFT(my_char_30, 2) my_char_30 id
+NULL NULL 1
+ 2
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LCASE(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LCASE(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 144 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 144 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT INSTR(my_char_30, 'char'),
+my_char_30, id FROM t1_values;
+SELECT INSTR(my_char_30, 'char'),
+my_char_30, id FROM t1_values
+WHERE select_id = 143 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 143 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT BIT_LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 142 OR select_id IS NULL order by id;
+BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 142 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT BIT_LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 141 OR select_id IS NULL order by id;
+BIT_LENGTH(my_binary_30) my_binary_30 id
+NULL NULL 1
+240 2
+240 <--------30 characters-------> 3
+240 ---äÖüß@µ*$-- 4
+240 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 141 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_binary_30) my_binary_30 id
+NULL NULL 1
+240
+240 <--------30 characters-------> 3
+240 ---äÖüß@µ*$--
+240 -1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT BIT_LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 140 OR select_id IS NULL order by id;
+BIT_LENGTH(my_varchar_1000) my_varchar_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 140 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_varchar_1000) my_varchar_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT BIT_LENGTH(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 139 OR select_id IS NULL order by id;
+BIT_LENGTH(my_char_30) my_char_30 id
+NULL NULL 1
+0 2
+240 <--------30 characters-------> 3
+152 ---äÖüß@µ*$-- 4
+16 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 139 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_char_30) my_char_30 id
+NULL NULL 1
+0 2
+240 <--------30 characters-------> 3
+152 ---äÖüß@µ*$-- 4
+16 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_year,'IS_NULL'),
+my_year, id FROM t1_values;
+SELECT IFNULL(my_year,'IS_NULL'),
+my_year, id FROM t1_values
+WHERE select_id = 138 OR select_id IS NULL order by id;
+IFNULL(my_year,'IS_NULL') my_year id
+IS_NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 138 OR select_id IS NULL) order by id;
+IFNULL(my_year,'IS_NULL') my_year id
+IS_NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_time,'IS_NULL'),
+my_time, id FROM t1_values;
+SELECT IFNULL(my_time,'IS_NULL'),
+my_time, id FROM t1_values
+WHERE select_id = 137 OR select_id IS NULL order by id;
+IFNULL(my_time,'IS_NULL') my_time id
+IS_NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 137 OR select_id IS NULL) order by id;
+IFNULL(my_time,'IS_NULL') my_time id
+IS_NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_timestamp,'IS_NULL'),
+my_timestamp, id FROM t1_values;
+SELECT IFNULL(my_timestamp,'IS_NULL'),
+my_timestamp, id FROM t1_values
+WHERE select_id = 136 OR select_id IS NULL order by id;
+IFNULL(my_timestamp,'IS_NULL') my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 136 OR select_id IS NULL) order by id;
+IFNULL(my_timestamp,'IS_NULL') my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_date,'IS_NULL'),
+my_date, id FROM t1_values;
+SELECT IFNULL(my_date,'IS_NULL'),
+my_date, id FROM t1_values
+WHERE select_id = 135 OR select_id IS NULL order by id;
+IFNULL(my_date,'IS_NULL') my_date id
+IS_NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 135 OR select_id IS NULL) order by id;
+IFNULL(my_date,'IS_NULL') my_date id
+IS_NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_datetime,'IS_NULL'),
+my_datetime, id FROM t1_values;
+SELECT IFNULL(my_datetime,'IS_NULL'),
+my_datetime, id FROM t1_values
+WHERE select_id = 134 OR select_id IS NULL order by id;
+IFNULL(my_datetime,'IS_NULL') my_datetime id
+IS_NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 134 OR select_id IS NULL) order by id;
+IFNULL(my_datetime,'IS_NULL') my_datetime id
+IS_NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_double,'IS_NULL'),
+my_double, id FROM t1_values;
+SELECT IFNULL(my_double,'IS_NULL'),
+my_double, id FROM t1_values
+WHERE select_id = 133 OR select_id IS NULL order by id;
+IFNULL(my_double,'IS_NULL') my_double id
+IS_NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 133 OR select_id IS NULL) order by id;
+IFNULL(my_double,'IS_NULL') my_double id
+IS_NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_decimal,'IS_NULL'),
+my_decimal, id FROM t1_values;
+SELECT IFNULL(my_decimal,'IS_NULL'),
+my_decimal, id FROM t1_values
+WHERE select_id = 132 OR select_id IS NULL order by id;
+IFNULL(my_decimal,'IS_NULL') my_decimal id
+IS_NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 132 OR select_id IS NULL) order by id;
+IFNULL(my_decimal,'IS_NULL') my_decimal id
+IS_NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_bigint,'IS_NULL'),
+my_bigint, id FROM t1_values;
+SELECT IFNULL(my_bigint,'IS_NULL'),
+my_bigint, id FROM t1_values
+WHERE select_id = 131 OR select_id IS NULL order by id;
+IFNULL(my_bigint,'IS_NULL') my_bigint id
+IS_NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 131 OR select_id IS NULL) order by id;
+IFNULL(my_bigint,'IS_NULL') my_bigint id
+IS_NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_varbinary_1000,'IS_NULL'),
+my_varbinary_1000, id FROM t1_values;
+SELECT IFNULL(my_varbinary_1000,'IS_NULL'),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 130 OR select_id IS NULL order by id;
+IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 130 OR select_id IS NULL) order by id;
+IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_binary_30,'IS_NULL'),
+my_binary_30, id FROM t1_values;
+SELECT IFNULL(my_binary_30,'IS_NULL'),
+my_binary_30, id FROM t1_values
+WHERE select_id = 129 OR select_id IS NULL order by id;
+IFNULL(my_binary_30,'IS_NULL') my_binary_30 id
+IS_NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 129 OR select_id IS NULL) order by id;
+IFNULL(my_binary_30,'IS_NULL') my_binary_30 id
+IS_NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_varchar_1000,'IS_NULL'),
+my_varchar_1000, id FROM t1_values;
+SELECT IFNULL(my_varchar_1000,'IS_NULL'),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 128 OR select_id IS NULL order by id;
+IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 128 OR select_id IS NULL) order by id;
+IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_char_30,'IS_NULL'),
+my_char_30, id FROM t1_values;
+SELECT IFNULL(my_char_30,'IS_NULL'),
+my_char_30, id FROM t1_values
+WHERE select_id = 127 OR select_id IS NULL order by id;
+IFNULL(my_char_30,'IS_NULL') my_char_30 id
+IS_NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 127 OR select_id IS NULL) order by id;
+IFNULL(my_char_30,'IS_NULL') my_char_30 id
+IS_NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL'), my_year, id FROM t1_values;
+SELECT IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL'), my_year, id FROM t1_values
+WHERE select_id = 126 OR select_id IS NULL order by id;
+IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL') my_year id
+IS NULL NULL 1
+IS NOT NULL 1901 2
+IS NOT NULL 2155 3
+IS NOT NULL 2000 4
+IS NOT NULL 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year` is null,'IS NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 126 OR select_id IS NULL) order by id;
+IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL') my_year id
+IS NULL NULL 1
+IS NOT NULL 1901 2
+IS NOT NULL 2155 3
+IS NOT NULL 2000 4
+IS NOT NULL 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL'), my_time, id FROM t1_values;
+SELECT IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL'), my_time, id FROM t1_values
+WHERE select_id = 125 OR select_id IS NULL order by id;
+IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL') my_time id
+IS NULL NULL 1
+IS NOT NULL -838:59:59 2
+IS NOT NULL 838:59:59 3
+IS NOT NULL 13:00:00 4
+IS NOT NULL 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time` is null,'IS NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 125 OR select_id IS NULL) order by id;
+IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL') my_time id
+IS NULL NULL 1
+IS NOT NULL -838:59:59 2
+IS NOT NULL 838:59:59 3
+IS NOT NULL 13:00:00 4
+IS NOT NULL 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL'), my_timestamp, id FROM t1_values;
+SELECT IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL'), my_timestamp, id FROM t1_values
+WHERE select_id = 124 OR select_id IS NULL order by id;
+IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL') my_timestamp id
+IS NOT NULL 2001-01-01 10:20:30 1
+IS NOT NULL 1970-01-01 14:00:01 2
+IS NOT NULL 2038-01-01 02:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp` is null,'IS NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 124 OR select_id IS NULL) order by id;
+IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL') my_timestamp id
+IS NOT NULL 2001-01-01 10:20:30 1
+IS NOT NULL 1970-01-01 14:00:01 2
+IS NOT NULL 2038-01-01 02:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL'), my_date, id FROM t1_values;
+SELECT IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL'), my_date, id FROM t1_values
+WHERE select_id = 123 OR select_id IS NULL order by id;
+IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL') my_date id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 2
+IS NOT NULL 9999-12-31 3
+IS NOT NULL 2004-02-29 4
+IS NOT NULL 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date` is null,'IS NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 123 OR select_id IS NULL) order by id;
+IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL') my_date id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 2
+IS NOT NULL 9999-12-31 3
+IS NOT NULL 2004-02-29 4
+IS NOT NULL 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL'), my_datetime, id FROM t1_values;
+SELECT IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL'), my_datetime, id FROM t1_values
+WHERE select_id = 122 OR select_id IS NULL order by id;
+IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL') my_datetime id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 00:00:00 2
+IS NOT NULL 9999-12-31 23:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime` is null,'IS NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 122 OR select_id IS NULL) order by id;
+IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL') my_datetime id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 00:00:00 2
+IS NOT NULL 9999-12-31 23:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL'), my_double, id FROM t1_values;
+SELECT IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL'), my_double, id FROM t1_values
+WHERE select_id = 121 OR select_id IS NULL order by id;
+IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL') my_double id
+IS NULL NULL 1
+IS NOT NULL -1.7976931348623e308 2
+IS NOT NULL 1.7976931348623e308 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double` is null,'IS NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 121 OR select_id IS NULL) order by id;
+IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL') my_double id
+IS NULL NULL 1
+IS NOT NULL -1.7976931348623e308 2
+IS NOT NULL 1.7976931348623e308 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL'), my_decimal, id FROM t1_values;
+SELECT IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL'), my_decimal, id FROM t1_values
+WHERE select_id = 120 OR select_id IS NULL order by id;
+IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL') my_decimal id
+IS NULL NULL 1
+IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT NULL 0.000000000000000000000000000000 4
+IS NOT NULL -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal` is null,'IS NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 120 OR select_id IS NULL) order by id;
+IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL') my_decimal id
+IS NULL NULL 1
+IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT NULL 0.000000000000000000000000000000 4
+IS NOT NULL -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL'), my_bigint, id FROM t1_values;
+SELECT IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL'), my_bigint, id FROM t1_values
+WHERE select_id = 119 OR select_id IS NULL order by id;
+IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL') my_bigint id
+IS NULL NULL 1
+IS NOT NULL -9223372036854775808 2
+IS NOT NULL 9223372036854775807 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint` is null,'IS NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 119 OR select_id IS NULL) order by id;
+IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL') my_bigint id
+IS NULL NULL 1
+IS NOT NULL -9223372036854775808 2
+IS NOT NULL 9223372036854775807 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varbinary_1000, id FROM t1_values;
+SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varbinary_1000, id FROM t1_values
+WHERE select_id = 118 OR select_id IS NULL order by id;
+IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varbinary_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000` is null,'IS NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 118 OR select_id IS NULL) order by id;
+IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varbinary_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_binary_30, id FROM t1_values;
+SELECT IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_binary_30, id FROM t1_values
+WHERE select_id = 117 OR select_id IS NULL order by id;
+IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_binary_30 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30` is null,'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 117 OR select_id IS NULL) order by id;
+IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_binary_30 id
+IS NULL NULL 1
+IS NOT NULL
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$--
+IS NOT NULL -1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varchar_1000, id FROM t1_values;
+SELECT IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varchar_1000, id FROM t1_values
+WHERE select_id = 116 OR select_id IS NULL order by id;
+IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varchar_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000` is null,'IS NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 116 OR select_id IS NULL) order by id;
+IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varchar_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_char_30, id FROM t1_values;
+SELECT IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_char_30, id FROM t1_values
+WHERE select_id = 115 OR select_id IS NULL order by id;
+IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_char_30 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30` is null,'IS NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 115 OR select_id IS NULL) order by id;
+IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_char_30 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'),
+my_year, id FROM t1_values;
+SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'),
+my_year, id FROM t1_values
+WHERE select_id = 114 OR select_id IS NULL order by id;
+IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id
+IS NOT TRUE NULL 1
+IS TRUE 1901 2
+IS TRUE 2155 3
+IS TRUE 2000 4
+IS TRUE 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,'IS TRUE','IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 114 OR select_id IS NULL) order by id;
+IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id
+IS NOT TRUE NULL 1
+IS TRUE 1901 2
+IS TRUE 2155 3
+IS TRUE 2000 4
+IS TRUE 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'),
+my_time, id FROM t1_values;
+SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'),
+my_time, id FROM t1_values
+WHERE select_id = 113 OR select_id IS NULL order by id;
+IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id
+IS NOT TRUE NULL 1
+IS TRUE -838:59:59 2
+IS TRUE 838:59:59 3
+IS TRUE 13:00:00 4
+IS TRUE 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,'IS TRUE','IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 113 OR select_id IS NULL) order by id;
+IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id
+IS NOT TRUE NULL 1
+IS TRUE -838:59:59 2
+IS TRUE 838:59:59 3
+IS TRUE 13:00:00 4
+IS TRUE 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'),
+my_timestamp, id FROM t1_values;
+SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'),
+my_timestamp, id FROM t1_values
+WHERE select_id = 112 OR select_id IS NULL order by id;
+IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id
+IS TRUE 2001-01-01 10:20:30 1
+IS TRUE 1970-01-01 14:00:01 2
+IS TRUE 2038-01-01 02:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,'IS TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 112 OR select_id IS NULL) order by id;
+IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id
+IS TRUE 2001-01-01 10:20:30 1
+IS TRUE 1970-01-01 14:00:01 2
+IS TRUE 2038-01-01 02:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'),
+my_date, id FROM t1_values;
+SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'),
+my_date, id FROM t1_values
+WHERE select_id = 111 OR select_id IS NULL order by id;
+IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 2
+IS TRUE 9999-12-31 3
+IS TRUE 2004-02-29 4
+IS TRUE 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,'IS TRUE','IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 111 OR select_id IS NULL) order by id;
+IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 2
+IS TRUE 9999-12-31 3
+IS TRUE 2004-02-29 4
+IS TRUE 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'),
+my_datetime, id FROM t1_values;
+SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'),
+my_datetime, id FROM t1_values
+WHERE select_id = 110 OR select_id IS NULL order by id;
+IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 00:00:00 2
+IS TRUE 9999-12-31 23:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,'IS TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 110 OR select_id IS NULL) order by id;
+IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 00:00:00 2
+IS TRUE 9999-12-31 23:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'),
+my_double, id FROM t1_values;
+SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'),
+my_double, id FROM t1_values
+WHERE select_id = 109 OR select_id IS NULL order by id;
+IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id
+IS NOT TRUE NULL 1
+IS TRUE -1.7976931348623e308 2
+IS TRUE 1.7976931348623e308 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,'IS TRUE','IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 109 OR select_id IS NULL) order by id;
+IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id
+IS NOT TRUE NULL 1
+IS TRUE -1.7976931348623e308 2
+IS TRUE 1.7976931348623e308 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'),
+my_decimal, id FROM t1_values;
+SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'),
+my_decimal, id FROM t1_values
+WHERE select_id = 108 OR select_id IS NULL order by id;
+IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id
+IS NOT TRUE NULL 1
+IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT TRUE 0.000000000000000000000000000000 4
+IS TRUE -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,'IS TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 108 OR select_id IS NULL) order by id;
+IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id
+IS NOT TRUE NULL 1
+IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT TRUE 0.000000000000000000000000000000 4
+IS TRUE -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'),
+my_bigint, id FROM t1_values;
+SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'),
+my_bigint, id FROM t1_values
+WHERE select_id = 107 OR select_id IS NULL order by id;
+IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id
+IS NOT TRUE NULL 1
+IS TRUE -9223372036854775808 2
+IS TRUE 9223372036854775807 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,'IS TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 107 OR select_id IS NULL) order by id;
+IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id
+IS NOT TRUE NULL 1
+IS TRUE -9223372036854775808 2
+IS TRUE 9223372036854775807 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varbinary_1000, id FROM t1_values;
+SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 106 OR select_id IS NULL order by id;
+IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 106 OR select_id IS NULL) order by id;
+IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'),
+my_binary_30, id FROM t1_values;
+SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'),
+my_binary_30, id FROM t1_values
+WHERE select_id = 105 OR select_id IS NULL order by id;
+IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 105 OR select_id IS NULL) order by id;
+IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$--
+IS TRUE -1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varchar_1000, id FROM t1_values;
+SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 104 OR select_id IS NULL order by id;
+IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 104 OR select_id IS NULL) order by id;
+IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'),
+my_char_30, id FROM t1_values;
+SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'),
+my_char_30, id FROM t1_values
+WHERE select_id = 103 OR select_id IS NULL order by id;
+IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ' '
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 103 OR select_id IS NULL) order by id;
+IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ' '
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r),
+my_varbinary_1000, id FROM t1_values;
+SELECT CONVERT(my_varbinary_1000 USING koi8r),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 102 OR select_id IS NULL order by id;
+CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---???????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 102 OR select_id IS NULL) order by id;
+CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---???????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r),
+my_binary_30, id FROM t1_values;
+SELECT CONVERT(my_binary_30 USING koi8r),
+my_binary_30, id FROM t1_values
+WHERE select_id = 101 OR select_id IS NULL order by id;
+CONVERT(my_binary_30 USING koi8r) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---???????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 101 OR select_id IS NULL) order by id;
+CONVERT(my_binary_30 USING koi8r) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---???????@??*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r),
+my_varchar_1000, id FROM t1_values;
+SELECT CONVERT(my_varchar_1000 USING koi8r),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 100 OR select_id IS NULL order by id;
+CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 100 OR select_id IS NULL) order by id;
+CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r),
+my_char_30, id FROM t1_values;
+SELECT CONVERT(my_char_30 USING koi8r),
+my_char_30, id FROM t1_values
+WHERE select_id = 99 OR select_id IS NULL order by id;
+CONVERT(my_char_30 USING koi8r) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 99 OR select_id IS NULL) order by id;
+CONVERT(my_char_30 USING koi8r) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8),
+my_varbinary_1000, id FROM t1_values;
+SELECT CONVERT(my_varbinary_1000 USING utf8),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 98 OR select_id IS NULL order by id;
+CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---@*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8mb3) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 98 OR select_id IS NULL) order by id;
+CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---@*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8),
+my_binary_30, id FROM t1_values;
+SELECT CONVERT(my_binary_30 USING utf8),
+my_binary_30, id FROM t1_values
+WHERE select_id = 97 OR select_id IS NULL order by id;
+CONVERT(my_binary_30 USING utf8) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---@*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8mb3) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 97 OR select_id IS NULL) order by id;
+CONVERT(my_binary_30 USING utf8) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---@*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8),
+my_varchar_1000, id FROM t1_values;
+SELECT CONVERT(my_varchar_1000 USING utf8),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 96 OR select_id IS NULL order by id;
+CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8mb3) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 96 OR select_id IS NULL) order by id;
+CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8),
+my_char_30, id FROM t1_values;
+SELECT CONVERT(my_char_30 USING utf8),
+my_char_30, id FROM t1_values
+WHERE select_id = 95 OR select_id IS NULL order by id;
+CONVERT(my_char_30 USING utf8) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8mb3) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 95 OR select_id IS NULL) order by id;
+CONVERT(my_char_30 USING utf8) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS UNSIGNED INTEGER),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS UNSIGNED INTEGER),
+my_year, id FROM t1_values
+WHERE select_id = 94 OR select_id IS NULL order by id;
+CAST(my_year AS UNSIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 94 OR select_id IS NULL) order by id;
+CAST(my_year AS UNSIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS UNSIGNED INTEGER),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS UNSIGNED INTEGER),
+my_time, id FROM t1_values
+WHERE select_id = 93 OR select_id IS NULL order by id;
+CAST(my_time AS UNSIGNED INTEGER) my_time id
+NULL NULL 1
+0 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+Warnings:
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 93 OR select_id IS NULL) order by id;
+CAST(my_time AS UNSIGNED INTEGER) my_time id
+NULL NULL 1
+0 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+Warnings:
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS UNSIGNED INTEGER),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS UNSIGNED INTEGER),
+my_timestamp, id FROM t1_values
+WHERE select_id = 92 OR select_id IS NULL order by id;
+CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 92 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS UNSIGNED INTEGER),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS UNSIGNED INTEGER),
+my_date, id FROM t1_values
+WHERE select_id = 91 OR select_id IS NULL order by id;
+CAST(my_date AS UNSIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 91 OR select_id IS NULL) order by id;
+CAST(my_date AS UNSIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS UNSIGNED INTEGER),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS UNSIGNED INTEGER),
+my_datetime, id FROM t1_values
+WHERE select_id = 90 OR select_id IS NULL order by id;
+CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 90 OR select_id IS NULL) order by id;
+CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS UNSIGNED INTEGER),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS UNSIGNED INTEGER),
+my_double, id FROM t1_values
+WHERE select_id = 89 OR select_id IS NULL order by id;
+CAST(my_double AS UNSIGNED INTEGER) my_double id
+NULL NULL 1
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
+0 0 4
+0 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 89 OR select_id IS NULL) order by id;
+CAST(my_double AS UNSIGNED INTEGER) my_double id
+NULL NULL 1
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
+0 0 4
+0 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS UNSIGNED INTEGER),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS UNSIGNED INTEGER),
+my_decimal, id FROM t1_values
+WHERE select_id = 88 OR select_id IS NULL order by id;
+CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id
+NULL NULL 1
+0 -9999999999999999999999999999999999.999999999999999999999999999999 2
+18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+0 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '-1.000000000000000000000000000000' to UNSIGNED INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 88 OR select_id IS NULL) order by id;
+CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id
+NULL NULL 1
+0 -9999999999999999999999999999999999.999999999999999999999999999999 2
+18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+0 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '-1.000000000000000000000000000000' to UNSIGNED INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS UNSIGNED INTEGER),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS UNSIGNED INTEGER),
+my_bigint, id FROM t1_values
+WHERE select_id = 87 OR select_id IS NULL order by id;
+CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id
+NULL NULL 1
+9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+18446744073709551615 -1 5
+Warnings:
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 87 OR select_id IS NULL) order by id;
+CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id
+NULL NULL 1
+9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+18446744073709551615 -1 5
+Warnings:
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 86 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 86 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS UNSIGNED INTEGER),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS UNSIGNED INTEGER),
+my_binary_30, id FROM t1_values
+WHERE select_id = 85 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 85 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$--
+18446744073709551615 -1
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 84 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 84 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS UNSIGNED INTEGER),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS UNSIGNED INTEGER),
+my_char_30, id FROM t1_values
+WHERE select_id = 83 OR select_id IS NULL order by id;
+CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 83 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS SIGNED INTEGER),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS SIGNED INTEGER),
+my_year, id FROM t1_values
+WHERE select_id = 82 OR select_id IS NULL order by id;
+CAST(my_year AS SIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 82 OR select_id IS NULL) order by id;
+CAST(my_year AS SIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS SIGNED INTEGER),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS SIGNED INTEGER),
+my_time, id FROM t1_values
+WHERE select_id = 81 OR select_id IS NULL order by id;
+CAST(my_time AS SIGNED INTEGER) my_time id
+NULL NULL 1
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 81 OR select_id IS NULL) order by id;
+CAST(my_time AS SIGNED INTEGER) my_time id
+NULL NULL 1
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS SIGNED INTEGER),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS SIGNED INTEGER),
+my_timestamp, id FROM t1_values
+WHERE select_id = 80 OR select_id IS NULL order by id;
+CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 80 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS SIGNED INTEGER),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS SIGNED INTEGER),
+my_date, id FROM t1_values
+WHERE select_id = 79 OR select_id IS NULL order by id;
+CAST(my_date AS SIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 79 OR select_id IS NULL) order by id;
+CAST(my_date AS SIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS SIGNED INTEGER),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS SIGNED INTEGER),
+my_datetime, id FROM t1_values
+WHERE select_id = 78 OR select_id IS NULL order by id;
+CAST(my_datetime AS SIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 78 OR select_id IS NULL) order by id;
+CAST(my_datetime AS SIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS SIGNED INTEGER),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS SIGNED INTEGER),
+my_double, id FROM t1_values
+WHERE select_id = 77 OR select_id IS NULL order by id;
+CAST(my_double AS SIGNED INTEGER) my_double id
+NULL NULL 1
+-9223372036854775808 -1.7976931348623e308 2
+9223372036854775807 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 77 OR select_id IS NULL) order by id;
+CAST(my_double AS SIGNED INTEGER) my_double id
+NULL NULL 1
+-9223372036854775808 -1.7976931348623e308 2
+9223372036854775807 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS SIGNED INTEGER),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS SIGNED INTEGER),
+my_decimal, id FROM t1_values
+WHERE select_id = 76 OR select_id IS NULL order by id;
+CAST(my_decimal AS SIGNED INTEGER) my_decimal id
+NULL NULL 1
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+-1 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 76 OR select_id IS NULL) order by id;
+CAST(my_decimal AS SIGNED INTEGER) my_decimal id
+NULL NULL 1
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+-1 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS SIGNED INTEGER),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS SIGNED INTEGER),
+my_bigint, id FROM t1_values
+WHERE select_id = 75 OR select_id IS NULL order by id;
+CAST(my_bigint AS SIGNED INTEGER) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 75 OR select_id IS NULL) order by id;
+CAST(my_bigint AS SIGNED INTEGER) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 74 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 74 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS SIGNED INTEGER),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS SIGNED INTEGER),
+my_binary_30, id FROM t1_values
+WHERE select_id = 73 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 73 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$--
+-1 -1
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS SIGNED INTEGER),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS SIGNED INTEGER),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 72 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 72 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS SIGNED INTEGER),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS SIGNED INTEGER),
+my_char_30, id FROM t1_values
+WHERE select_id = 71 OR select_id IS NULL order by id;
+CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 71 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS DECIMAL(37,2)),
+my_year, id FROM t1_values
+WHERE select_id = 70 OR select_id IS NULL order by id;
+CAST(my_year AS DECIMAL(37,2)) my_year id
+NULL NULL 1
+1901.00 1901 2
+2155.00 2155 3
+2000.00 2000 4
+2005.00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 70 OR select_id IS NULL) order by id;
+CAST(my_year AS DECIMAL(37,2)) my_year id
+NULL NULL 1
+1901.00 1901 2
+2155.00 2155 3
+2000.00 2000 4
+2005.00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS DECIMAL(37,2)),
+my_time, id FROM t1_values
+WHERE select_id = 69 OR select_id IS NULL order by id;
+CAST(my_time AS DECIMAL(37,2)) my_time id
+NULL NULL 1
+-8385959.00 -838:59:59 2
+8385959.00 838:59:59 3
+130000.00 13:00:00 4
+100000.00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 69 OR select_id IS NULL) order by id;
+CAST(my_time AS DECIMAL(37,2)) my_time id
+NULL NULL 1
+-8385959.00 -838:59:59 2
+8385959.00 838:59:59 3
+130000.00 13:00:00 4
+100000.00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS DECIMAL(37,2)),
+my_timestamp, id FROM t1_values
+WHERE select_id = 68 OR select_id IS NULL order by id;
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
+20010101102030.00 2001-01-01 10:20:30 1
+19700101140001.00 1970-01-01 14:00:01 2
+20380101025959.00 2038-01-01 02:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 68 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
+20010101102030.00 2001-01-01 10:20:30 1
+19700101140001.00 1970-01-01 14:00:01 2
+20380101025959.00 2038-01-01 02:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS DECIMAL(37,2)),
+my_date, id FROM t1_values
+WHERE select_id = 67 OR select_id IS NULL order by id;
+CAST(my_date AS DECIMAL(37,2)) my_date id
+NULL NULL 1
+10101.00 0001-01-01 2
+99991231.00 9999-12-31 3
+20040229.00 2004-02-29 4
+20050628.00 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 67 OR select_id IS NULL) order by id;
+CAST(my_date AS DECIMAL(37,2)) my_date id
+NULL NULL 1
+10101.00 0001-01-01 2
+99991231.00 9999-12-31 3
+20040229.00 2004-02-29 4
+20050628.00 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS DECIMAL(37,2)),
+my_datetime, id FROM t1_values
+WHERE select_id = 66 OR select_id IS NULL order by id;
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
+NULL NULL 1
+10101000000.00 0001-01-01 00:00:00 2
+99991231235959.00 9999-12-31 23:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 66 OR select_id IS NULL) order by id;
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
+NULL NULL 1
+10101000000.00 0001-01-01 00:00:00 2
+99991231235959.00 9999-12-31 23:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS DECIMAL(37,2)),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS DECIMAL(37,2)),
+my_double, id FROM t1_values
+WHERE select_id = 65 OR select_id IS NULL order by id;
+CAST(my_double AS DECIMAL(37,2)) my_double id
+NULL NULL 1
+-99999999999999999999999999999999999.99 -1.7976931348623e308 2
+99999999999999999999999999999999999.99 1.7976931348623e308 3
+0.00 0 4
+-1.00 -1 5
+-3333.33 -3333.3333 30
+Warnings:
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 2
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 3
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 65 OR select_id IS NULL) order by id;
+CAST(my_double AS DECIMAL(37,2)) my_double id
+NULL NULL 1
+-99999999999999999999999999999999999.99 -1.7976931348623e308 2
+99999999999999999999999999999999999.99 1.7976931348623e308 3
+0.00 0 4
+-1.00 -1 5
+-3333.33 -3333.3333 30
+Warnings:
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS DECIMAL(37,2)),
+my_decimal, id FROM t1_values
+WHERE select_id = 64 OR select_id IS NULL order by id;
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
+NULL NULL 1
+-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
+10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.00 0.000000000000000000000000000000 4
+-1.00 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 64 OR select_id IS NULL) order by id;
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
+NULL NULL 1
+-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
+10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.00 0.000000000000000000000000000000 4
+-1.00 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS DECIMAL(37,2)),
+my_bigint, id FROM t1_values
+WHERE select_id = 63 OR select_id IS NULL order by id;
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
+NULL NULL 1
+-9223372036854775808.00 -9223372036854775808 2
+9223372036854775807.00 9223372036854775807 3
+0.00 0 4
+-1.00 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 63 OR select_id IS NULL) order by id;
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
+NULL NULL 1
+-9223372036854775808.00 -9223372036854775808 2
+9223372036854775807.00 9223372036854775807 3
+0.00 0 4
+-1.00 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 62 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 29
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 62 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 29
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
+my_binary_30, id FROM t1_values
+WHERE select_id = 61 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
+NULL NULL 1
+0.00 2
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 28
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 61 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
+NULL NULL 1
+0.00
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$--
+-1.00 -1
+-3333.33 -3333.3333
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 60 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 27
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 60 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 27
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS DECIMAL(37,2)),
+my_char_30, id FROM t1_values
+WHERE select_id = 59 OR select_id IS NULL order by id;
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
+NULL NULL 1
+0.00 2
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 26
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ' '
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 59 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
+NULL NULL 1
+0.00 2
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 26
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ' '
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS TIME),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS TIME),
+my_year, id FROM t1_values
+WHERE select_id = 58 OR select_id IS NULL order by id;
+CAST(my_year AS TIME) my_year id
+NULL NULL 1
+00:00:00 1901 2
+00:00:00 2155 3
+00:00:00 2000 4
+00:00:00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 58 OR select_id IS NULL) order by id;
+CAST(my_year AS TIME) my_year id
+NULL NULL 1
+00:00:00 1901 2
+00:00:00 2155 3
+00:00:00 2000 4
+00:00:00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS TIME),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS TIME),
+my_time, id FROM t1_values
+WHERE select_id = 57 OR select_id IS NULL order by id;
+CAST(my_time AS TIME) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 57 OR select_id IS NULL) order by id;
+CAST(my_time AS TIME) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS TIME),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS TIME),
+my_timestamp, id FROM t1_values
+WHERE select_id = 56 OR select_id IS NULL order by id;
+CAST(my_timestamp AS TIME) my_timestamp id
+10:20:30 2001-01-01 10:20:30 1
+14:00:01 1970-01-01 14:00:01 2
+02:59:59 2038-01-01 02:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 56 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS TIME) my_timestamp id
+10:20:30 2001-01-01 10:20:30 1
+14:00:01 1970-01-01 14:00:01 2
+02:59:59 2038-01-01 02:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS TIME),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS TIME),
+my_date, id FROM t1_values
+WHERE select_id = 55 OR select_id IS NULL order by id;
+CAST(my_date AS TIME) my_date id
+NULL NULL 1
+00:00:00 0001-01-01 2
+00:00:00 9999-12-31 3
+00:00:00 2004-02-29 4
+00:00:00 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 55 OR select_id IS NULL) order by id;
+CAST(my_date AS TIME) my_date id
+NULL NULL 1
+00:00:00 0001-01-01 2
+00:00:00 9999-12-31 3
+00:00:00 2004-02-29 4
+00:00:00 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS TIME),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS TIME),
+my_datetime, id FROM t1_values
+WHERE select_id = 54 OR select_id IS NULL order by id;
+CAST(my_datetime AS TIME) my_datetime id
+NULL NULL 1
+00:00:00 0001-01-01 00:00:00 2
+23:59:59 9999-12-31 23:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 54 OR select_id IS NULL) order by id;
+CAST(my_datetime AS TIME) my_datetime id
+NULL NULL 1
+00:00:00 0001-01-01 00:00:00 2
+23:59:59 9999-12-31 23:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS TIME),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS TIME),
+my_double, id FROM t1_values
+WHERE select_id = 53 OR select_id IS NULL order by id;
+CAST(my_double AS TIME) my_double id
+NULL NULL 1
+-838:59:59 -1.7976931348623e308 2
+838:59:59 1.7976931348623e308 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 25
+Warnings:
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 53 OR select_id IS NULL) order by id;
+CAST(my_double AS TIME) my_double id
+NULL NULL 1
+-838:59:59 -1.7976931348623e308 2
+838:59:59 1.7976931348623e308 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 25
+Warnings:
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS TIME),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS TIME),
+my_bigint, id FROM t1_values
+WHERE select_id = 52 OR select_id IS NULL order by id;
+CAST(my_bigint AS TIME) my_bigint id
+NULL NULL 1
+-838:59:59 -9223372036854775808 2
+838:59:59 9223372036854775807 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 24
+Warnings:
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 52 OR select_id IS NULL) order by id;
+CAST(my_bigint AS TIME) my_bigint id
+NULL NULL 1
+-838:59:59 -9223372036854775808 2
+838:59:59 9223372036854775807 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 24
+Warnings:
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS TIME),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS TIME),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 51 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 23
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 51 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 23
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS TIME),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS TIME),
+my_binary_30, id FROM t1_values
+WHERE select_id = 50 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS TIME) my_binary_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 22
+Warnings:
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 50 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS TIME) my_binary_30 id
+NULL NULL 1
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
+-00:00:01 -1
+41:58:00 1 17:58
+Warnings:
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS TIME),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS TIME),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 49 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 21
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 49 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 21
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS TIME),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS TIME),
+my_char_30, id FROM t1_values
+WHERE select_id = 48 OR select_id IS NULL order by id;
+CAST(my_char_30 AS TIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 20
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 48 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS TIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 20
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS DATETIME),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS DATETIME),
+my_year, id FROM t1_values
+WHERE select_id = 47 OR select_id IS NULL order by id;
+CAST(my_year AS DATETIME) my_year id
+NULL NULL 1
+1901-00-00 00:00:00 1901 2
+2155-00-00 00:00:00 2155 3
+2000-00-00 00:00:00 2000 4
+2005-00-00 00:00:00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 47 OR select_id IS NULL) order by id;
+CAST(my_year AS DATETIME) my_year id
+NULL NULL 1
+1901-00-00 00:00:00 1901 2
+2155-00-00 00:00:00 2155 3
+2000-00-00 00:00:00 2000 4
+2005-00-00 00:00:00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS DATETIME),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS DATETIME),
+my_time, id FROM t1_values
+WHERE select_id = 46 OR select_id IS NULL order by id;
+CAST(my_time AS DATETIME) my_time id
+NULL NULL 1
+2000-12-30 01:00:01 -838:59:59 2
+2001-03-09 22:59:59 838:59:59 3
+2001-02-03 13:00:00 13:00:00 4
+2001-02-03 10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 46 OR select_id IS NULL) order by id;
+CAST(my_time AS DATETIME) my_time id
+NULL NULL 1
+2000-12-30 01:00:01 -838:59:59 2
+2001-03-09 22:59:59 838:59:59 3
+2001-02-03 13:00:00 13:00:00 4
+2001-02-03 10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATETIME),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS DATETIME),
+my_timestamp, id FROM t1_values
+WHERE select_id = 45 OR select_id IS NULL order by id;
+CAST(my_timestamp AS DATETIME) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 45 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS DATETIME) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS DATETIME),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS DATETIME),
+my_date, id FROM t1_values
+WHERE select_id = 44 OR select_id IS NULL order by id;
+CAST(my_date AS DATETIME) my_date id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 2
+9999-12-31 00:00:00 9999-12-31 3
+2004-02-29 00:00:00 2004-02-29 4
+2005-06-28 00:00:00 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 44 OR select_id IS NULL) order by id;
+CAST(my_date AS DATETIME) my_date id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 2
+9999-12-31 00:00:00 9999-12-31 3
+2004-02-29 00:00:00 2004-02-29 4
+2005-06-28 00:00:00 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATETIME),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS DATETIME),
+my_datetime, id FROM t1_values
+WHERE select_id = 43 OR select_id IS NULL order by id;
+CAST(my_datetime AS DATETIME) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 43 OR select_id IS NULL) order by id;
+CAST(my_datetime AS DATETIME) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS DATETIME),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS DATETIME),
+my_double, id FROM t1_values
+WHERE select_id = 42 OR select_id IS NULL order by id;
+CAST(my_double AS DATETIME) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 19
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 6
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 42 OR select_id IS NULL) order by id;
+CAST(my_double AS DATETIME) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 19
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATETIME),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS DATETIME),
+my_bigint, id FROM t1_values
+WHERE select_id = 41 OR select_id IS NULL order by id;
+CAST(my_bigint AS DATETIME) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 18
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 6
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 41 OR select_id IS NULL) order by id;
+CAST(my_bigint AS DATETIME) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 18
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATETIME),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS DATETIME),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 40 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 17
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 40 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 17
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATETIME),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS DATETIME),
+my_binary_30, id FROM t1_values
+WHERE select_id = 39 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS DATETIME) my_binary_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 16
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 39 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS DATETIME) my_binary_30 id
+NULL NULL 1
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
+NULL -1
+2005-06-27 17:58:00 2005-06-27 17:58
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATETIME),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS DATETIME),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 38 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 15
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 38 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 15
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATETIME),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS DATETIME),
+my_char_30, id FROM t1_values
+WHERE select_id = 37 OR select_id IS NULL order by id;
+CAST(my_char_30 AS DATETIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 14
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 37 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS DATETIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 14
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS DATE),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS DATE),
+my_year, id FROM t1_values
+WHERE select_id = 36 OR select_id IS NULL order by id;
+CAST(my_year AS DATE) my_year id
+NULL NULL 1
+1901-00-00 1901 2
+2155-00-00 2155 3
+2000-00-00 2000 4
+2005-00-00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 36 OR select_id IS NULL) order by id;
+CAST(my_year AS DATE) my_year id
+NULL NULL 1
+1901-00-00 1901 2
+2155-00-00 2155 3
+2000-00-00 2000 4
+2005-00-00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS DATE),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS DATE),
+my_time, id FROM t1_values
+WHERE select_id = 35 OR select_id IS NULL order by id;
+CAST(my_time AS DATE) my_time id
+NULL NULL 1
+2000-12-30 -838:59:59 2
+2001-03-09 838:59:59 3
+2001-02-03 13:00:00 4
+2001-02-03 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 35 OR select_id IS NULL) order by id;
+CAST(my_time AS DATE) my_time id
+NULL NULL 1
+2000-12-30 -838:59:59 2
+2001-03-09 838:59:59 3
+2001-02-03 13:00:00 4
+2001-02-03 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATE),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS DATE),
+my_timestamp, id FROM t1_values
+WHERE select_id = 34 OR select_id IS NULL order by id;
+CAST(my_timestamp AS DATE) my_timestamp id
+2001-01-01 2001-01-01 10:20:30 1
+1970-01-01 1970-01-01 14:00:01 2
+2038-01-01 2038-01-01 02:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 34 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS DATE) my_timestamp id
+2001-01-01 2001-01-01 10:20:30 1
+1970-01-01 1970-01-01 14:00:01 2
+2038-01-01 2038-01-01 02:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS DATE),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS DATE),
+my_date, id FROM t1_values
+WHERE select_id = 33 OR select_id IS NULL order by id;
+CAST(my_date AS DATE) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 33 OR select_id IS NULL) order by id;
+CAST(my_date AS DATE) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATE),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS DATE),
+my_datetime, id FROM t1_values
+WHERE select_id = 32 OR select_id IS NULL order by id;
+CAST(my_datetime AS DATE) my_datetime id
+NULL NULL 1
+0001-01-01 0001-01-01 00:00:00 2
+9999-12-31 9999-12-31 23:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 32 OR select_id IS NULL) order by id;
+CAST(my_datetime AS DATE) my_datetime id
+NULL NULL 1
+0001-01-01 0001-01-01 00:00:00 2
+9999-12-31 9999-12-31 23:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS DATE),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS DATE),
+my_double, id FROM t1_values
+WHERE select_id = 31 OR select_id IS NULL order by id;
+CAST(my_double AS DATE) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 13
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 31 OR select_id IS NULL) order by id;
+CAST(my_double AS DATE) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 13
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATE),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS DATE),
+my_bigint, id FROM t1_values
+WHERE select_id = 30 OR select_id IS NULL order by id;
+CAST(my_bigint AS DATE) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 12
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 30 OR select_id IS NULL) order by id;
+CAST(my_bigint AS DATE) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 12
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATE),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS DATE),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 29 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 11
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 29 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 11
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATE),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS DATE),
+my_binary_30, id FROM t1_values
+WHERE select_id = 28 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS DATE) my_binary_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 10
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect date value: '2005-06-27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 28 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS DATE) my_binary_30 id
+NULL NULL 1
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
+NULL -1
+2005-06-27 2005-06-27
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect date value: '2005-06-27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATE),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS DATE),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 27 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS DATE) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 9
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 27 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS DATE) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 9
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATE),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS DATE),
+my_char_30, id FROM t1_values
+WHERE select_id = 26 OR select_id IS NULL order by id;
+CAST(my_char_30 AS DATE) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 8
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 26 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS DATE) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 8
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS CHAR),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS CHAR),
+my_year, id FROM t1_values
+WHERE select_id = 25 OR select_id IS NULL order by id;
+CAST(my_year AS CHAR) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 25 OR select_id IS NULL) order by id;
+CAST(my_year AS CHAR) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS CHAR),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS CHAR),
+my_time, id FROM t1_values
+WHERE select_id = 24 OR select_id IS NULL order by id;
+CAST(my_time AS CHAR) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 24 OR select_id IS NULL) order by id;
+CAST(my_time AS CHAR) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS CHAR),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS CHAR),
+my_timestamp, id FROM t1_values
+WHERE select_id = 23 OR select_id IS NULL order by id;
+CAST(my_timestamp AS CHAR) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 23 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS CHAR) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS CHAR),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS CHAR),
+my_date, id FROM t1_values
+WHERE select_id = 22 OR select_id IS NULL order by id;
+CAST(my_date AS CHAR) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 22 OR select_id IS NULL) order by id;
+CAST(my_date AS CHAR) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS CHAR),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS CHAR),
+my_datetime, id FROM t1_values
+WHERE select_id = 21 OR select_id IS NULL order by id;
+CAST(my_datetime AS CHAR) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 21 OR select_id IS NULL) order by id;
+CAST(my_datetime AS CHAR) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS CHAR),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS CHAR),
+my_double, id FROM t1_values
+WHERE select_id = 20 OR select_id IS NULL order by id;
+CAST(my_double AS CHAR) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 20 OR select_id IS NULL) order by id;
+CAST(my_double AS CHAR) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS CHAR),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS CHAR),
+my_decimal, id FROM t1_values
+WHERE select_id = 19 OR select_id IS NULL order by id;
+CAST(my_decimal AS CHAR) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 19 OR select_id IS NULL) order by id;
+CAST(my_decimal AS CHAR) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS CHAR),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS CHAR),
+my_bigint, id FROM t1_values
+WHERE select_id = 18 OR select_id IS NULL order by id;
+CAST(my_bigint AS CHAR) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 18 OR select_id IS NULL) order by id;
+CAST(my_bigint AS CHAR) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS CHAR),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS CHAR),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 17 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 17 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS CHAR),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS CHAR),
+my_binary_30, id FROM t1_values
+WHERE select_id = 16 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS CHAR) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 16 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS CHAR) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS CHAR),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS CHAR),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 15 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 15 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS CHAR),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS CHAR),
+my_char_30, id FROM t1_values
+WHERE select_id = 14 OR select_id IS NULL order by id;
+CAST(my_char_30 AS CHAR) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 14 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS CHAR) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS BINARY),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS BINARY),
+my_year, id FROM t1_values
+WHERE select_id = 13 OR select_id IS NULL order by id;
+CAST(my_year AS BINARY) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 13 OR select_id IS NULL) order by id;
+CAST(my_year AS BINARY) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS BINARY),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS BINARY),
+my_time, id FROM t1_values
+WHERE select_id = 12 OR select_id IS NULL order by id;
+CAST(my_time AS BINARY) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 12 OR select_id IS NULL) order by id;
+CAST(my_time AS BINARY) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS BINARY),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS BINARY),
+my_timestamp, id FROM t1_values
+WHERE select_id = 11 OR select_id IS NULL order by id;
+CAST(my_timestamp AS BINARY) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 11 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS BINARY) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS BINARY),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS BINARY),
+my_date, id FROM t1_values
+WHERE select_id = 10 OR select_id IS NULL order by id;
+CAST(my_date AS BINARY) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 10 OR select_id IS NULL) order by id;
+CAST(my_date AS BINARY) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS BINARY),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS BINARY),
+my_datetime, id FROM t1_values
+WHERE select_id = 9 OR select_id IS NULL order by id;
+CAST(my_datetime AS BINARY) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 9 OR select_id IS NULL) order by id;
+CAST(my_datetime AS BINARY) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS BINARY),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS BINARY),
+my_double, id FROM t1_values
+WHERE select_id = 8 OR select_id IS NULL order by id;
+CAST(my_double AS BINARY) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 8 OR select_id IS NULL) order by id;
+CAST(my_double AS BINARY) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS BINARY),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS BINARY),
+my_decimal, id FROM t1_values
+WHERE select_id = 7 OR select_id IS NULL order by id;
+CAST(my_decimal AS BINARY) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 7 OR select_id IS NULL) order by id;
+CAST(my_decimal AS BINARY) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS BINARY),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS BINARY),
+my_bigint, id FROM t1_values
+WHERE select_id = 6 OR select_id IS NULL order by id;
+CAST(my_bigint AS BINARY) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 6 OR select_id IS NULL) order by id;
+CAST(my_bigint AS BINARY) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS BINARY),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS BINARY),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 5 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 5 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS BINARY),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS BINARY),
+my_binary_30, id FROM t1_values
+WHERE select_id = 4 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS BINARY) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 4 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS BINARY) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS BINARY),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS BINARY),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 3 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 3 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS BINARY),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS BINARY),
+my_char_30, id FROM t1_values
+WHERE select_id = 2 OR select_id IS NULL order by id;
+CAST(my_char_30 AS BINARY) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 2 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS BINARY) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT sqrt(my_bigint), my_bigint, id FROM t1_values;
+SELECT sqrt(my_bigint), my_bigint, id FROM t1_values
+WHERE select_id = 1 OR select_id IS NULL order by id;
+sqrt(my_bigint) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+3037000499.97605 9223372036854775807 3
+0 0 4
+NULL -1 5
+2 4 6
+NULL -25 7
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 1 OR select_id IS NULL) order by id;
+sqrt(my_bigint) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+3037000499.97605 9223372036854775807 3
+0 0 4
+NULL -1 5
+2 4 6
+NULL -25 7
+DROP VIEW v1;
+
+
+DROP TABLE t1_selects, t1_modes, t1_values;
+SET timestamp=DEFAULT;
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result
new file mode 100644
index 00000000..6e9615c2
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result
@@ -0,0 +1,1403 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.2 - Syntax checks for the stored procedure-specific
+programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE:
+--------------------------------------------------------------------------------
+
+Testcase 3.1.2.8:
+-----------------
+
+Ensure that the scope of each BEGIN/END compound statement within a stored
+procedure definition is properly applied
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp1( )
+begin_label: BEGIN
+declare x char DEFAULT 'x';
+declare y char DEFAULT 'y';
+set x = '1';
+set y = '2';
+label1: BEGIN
+declare x char DEFAULT 'X';
+declare y char DEFAULT 'Y';
+SELECT f1, f2 into x, y from t2 limit 1;
+SELECT '1.1', x, y;
+label2: BEGIN
+declare x char default 'a';
+declare y char default 'b';
+label3: BEGIN
+declare x char default 'c';
+declare y char default 'd';
+label4: BEGIN
+declare x char default 'e';
+declare y char default 'f';
+label5: BEGIN
+declare x char default 'g';
+declare y char default 'h';
+SELECT 5, x, y;
+END label5;
+SELECT 4, x, y;
+END label4;
+SELECT 3, x, y;
+END label3;
+SELECT 2, x, y;
+END label2;
+END label1;
+set @v1 = x;
+set @v2 = y;
+SELECT '1.2', @v1, @v2;
+END begin_label//
+CALL sp1();
+1.1 x y
+1.1 a a
+5 x y
+5 g h
+4 x y
+4 e f
+3 x y
+3 c d
+2 x y
+2 a b
+1.2 @v1 @v2
+1.2 1 2
+Warnings:
+Warning 1265 Data truncated for column 'x' at row 1
+Warning 1265 Data truncated for column 'y' at row 1
+DROP PROCEDURE IF EXISTS sp1;
+
+Testcase 3.1.2.26:
+------------------
+
+Ensure that the initial value of every variable declared for a stored procedure
+is either NULL or its DEFAULT value, as appropriate.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+set @v1=0;
+set @v2=0;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x1 char default 'x';
+declare y1 char;
+declare x2 tinytext default 'tinytext';
+declare y2 tinytext;
+declare x3 datetime default '2005-10-03 12:13:14';
+declare y3 datetime;
+declare x4 float default 1.2;
+declare y4 float;
+declare x5 blob default 'b';
+declare y5 blob;
+declare x6 smallint default 127;
+declare y6 smallint;
+SELECT x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6;
+END//
+CALL sp1();
+x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6
+x tinytext 2005-10-03 12:13:14 1.2 b 127 NULL NULL NULL NULL NULL NULL
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.30:
+------------------
+
+Ensure that, when a stored procedure is called/executed, every variable always
+uses the correct value: either the value with which it is initialized or the
+value to which it is subsequently SET or otherwise assigned, as appropriate.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( IN invar INT, OUT outvar INT )
+BEGIN
+declare x integer;
+declare y integer default 1;
+set @x = x;
+set @y = y;
+set @z = 234;
+SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1;
+SELECT @x, @y, @z, invar;
+BEGIN
+set @x = 2;
+SELECT @x, @y, @z;
+SET outvar = @x * invar + @z * @f;
+SET invar = outvar;
+BEGIN
+set @y = null, @z = 'abcd';
+SELECT @x, @y, @z;
+END;
+END;
+END//
+SET @invar = 100;
+SET @outvar = @invar;
+SET @f = 10;
+SELECT @x, @y, @z, @invar, @outvar;
+@x @y @z @invar @outvar
+NULL NULL NULL 100 100
+CALL sp1( @invar, @outvar );
+@x @y @z invar
+a` a` 234 100
+@x @y @z
+2 a` 234
+@x @y @z
+2 NULL abcd
+SELECT @x, @y, @z, @invar, @outvar;
+@x @y @z @invar @outvar
+2 NULL abcd 100 2540
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.31:
+------------------
+
+Ensure that the SELECT ... INTO statement properly assigns values to the
+variables in its variable list.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+set @x=x;
+set @y=y;
+SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1;
+SELECT @x, @y;
+END//
+CALL sp1();
+@x @y
+-5000 1000-01-01
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.32:
+------------------
+
+Ensure that a SELECT ... INTO statement that retrieves multiple rows is
+rejected, with an appropriate error message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+set @x=x;
+set @y=y;
+SELECT f4, f3 into @x, @y from t2;
+END//
+CALL sp1();
+ERROR 42000: Result consisted of more than one row
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.33:
+------------------
+
+Ensure that a SELECT ... INTO statement that retrieves too many columns for the
+number of variables in its variable list is rejected, with an appropriate error
+message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+set @x=x;
+set @y=y;
+SELECT f4, f3, f2, f1 into @x, @y from t2;
+END//
+CALL sp1();
+ERROR 21000: The used SELECT statements have a different number of columns
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.34:
+------------------
+
+Ensure that a SELECT ... INTO statement that retrieves too few columns for the
+number of variables in its variable list is rejected, with an appropriate error
+message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer; declare z integer;
+set @x=x;
+set @y=y;
+set @z=z;
+SELECT f4 into @x, @y, @z from t2;
+END//
+CALL sp1();
+ERROR 21000: The used SELECT statements have a different number of columns
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.38:
+------------------
+
+Ensure that the scope of every condition declared is properly applied.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+create table res_t1(w char unique, x char);
+insert into res_t1 values('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+SELECT '-1-', x1, x2, x3, x4, x5, x6;
+BEGIN
+declare condname condition for sqlstate '23000';
+declare continue handler for condname set x5 = 1;
+set x6 = 0;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+SELECT '-2-', x1, x2, x3, x4, x5, x6;
+END;
+begin1_label: BEGIN
+BEGIN
+declare condname condition for sqlstate '20000';
+declare continue handler for condname set x1 = 1;
+set x2 = 0;
+case x2
+when 1 then set x2=10;
+when 2 then set x2=11;
+END case;
+set x2 = 1;
+SELECT '-3-', x1, x2, x3, x4, x5, x6;
+begin2_label: BEGIN
+BEGIN
+declare condname condition for sqlstate '23000';
+declare exit handler for condname set x3 = 1;
+set x4= 1;
+SELECT '-4a', x1, x2, x3, x4, x5, x6;
+insert into res_t1 values ('a', 'b');
+set x4= 2;
+SELECT '-4b', x1, x2, x3, x4, x5, x6;
+END;
+SELECT '-5-', x1, x2, x3, x4, x5, x6;
+END begin2_label;
+SELECT '-6-', x1, x2, x3, x4, x5, x6;
+END;
+SELECT '-7-', x1, x2, x3, x4, x5, x6;
+END begin1_label;
+SELECT 'END', x1, x2, x3, x4, x5, x6;
+END//
+CALL h1();
+-1- x1 x2 x3 x4 x5 x6
+-1- 0 0 0 0 0 0
+-2- x1 x2 x3 x4 x5 x6
+-2- 0 0 0 0 1 1
+-3- x1 x2 x3 x4 x5 x6
+-3- 1 1 0 0 1 1
+-4a x1 x2 x3 x4 x5 x6
+-4a 1 1 0 1 1 1
+-5- x1 x2 x3 x4 x5 x6
+-5- 1 1 1 1 1 1
+-6- x1 x2 x3 x4 x5 x6
+-6- 1 1 1 1 1 1
+-7- x1 x2 x3 x4 x5 x6
+-7- 1 1 1 1 1 1
+END x1 x2 x3 x4 x5 x6
+END 1 1 1 1 1 1
+DROP TABLE IF EXISTS tnull;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE TABLE tnull(f1 int);
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '42S02';
+declare continue handler for cond1 set @var2 = 1;
+BEGIN
+declare cond1 condition for sqlstate '23000';
+declare continue handler for cond1 set @var2 = 1;
+END;
+insert into tnull values(1);
+END//
+CALL sp1();
+DROP PROCEDURE h1;
+drop table res_t1;
+DROP PROCEDURE sp1;
+DROP TABLE tnull;
+
+Testcase 3.1.2.43:
+------------------
+
+Ensure that the DECLARE ... HANDLER FOR statement can not declare any handler
+for a condition declared outside of the scope of the handler.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS h2;
+drop table IF EXISTS res_t1;
+create table res_t1(w char unique, x char);
+insert into res_t1 values ('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare cond_1 condition for sqlstate '23000';
+declare continue handler for cond_1 set x5 = 1;
+BEGIN
+declare cond_2 condition for sqlstate '20000';
+declare continue handler for cond_1 set x1 = 1;
+BEGIN
+declare continue handler for cond_2 set x3 = 1;
+set x2 = 1;
+END;
+set x6 = 0;
+END;
+BEGIN
+declare continue handler for cond_1 set x1 = 1;
+BEGIN
+declare continue handler for cond_2 set x3 = 1;
+set x2 = 1;
+END;
+set x6 = 0;
+END;
+END;
+SELECT x1, x2, x3, x4, x5, x6;
+END//
+ERROR 42000: Undefined CONDITION: cond_2
+CREATE PROCEDURE h2 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare condname condition for sqlstate '23000';
+declare continue handler for condname set x5 = 1;
+BEGIN
+declare condname condition for sqlstate '20000';
+declare continue handler for condname set x1 = 1;
+BEGIN
+declare condname condition for sqlstate '42000';
+declare continue handler for condname set x3 = 1;
+set x6 = 0;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+set x4= 0;
+CALL sp1();
+set x4= 1;
+set x2 = 0;
+case x2
+when 1 then set x2=10;
+when 2 then set x2=11;
+END case;
+set x2 = 1;
+END;
+set x2 = 0;
+case x2
+when 1 then set x2=10;
+when 2 then set x2=11;
+END case;
+set x2 = 1;
+set x6 = 0;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+END;
+END;
+SELECT x1, x2, x3, x4, x5, x6;
+END//
+CALL h2();
+x1 x2 x3 x4 x5 x6
+1 1 1 1 1 1
+SELECT * FROM res_t1;
+w x
+a b
+DROP PROCEDURE h2;
+drop table res_t1;
+
+Testcase 3.1.2.44:
+------------------
+
+Ensure that the DECLARE ... HANDLER FOR statement cannot declare a handler for
+any invalid, or undeclared, condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare condname1 condition for sqlstate '23000';
+BEGIN
+declare condname2 condition for sqlstate '20000';
+declare continue handler for condname1 set x3 = 1;
+declare continue handler for condname2 set x1 = 1;
+END;
+END;
+BEGIN
+declare condname3 condition for sqlstate '42000';
+declare continue handler for condname1 set x3 = 1;
+declare continue handler for condname2 set x5 = 1;
+declare continue handler for condname3 set x1 = 1;
+END;
+END//
+ERROR 42000: Undefined CONDITION: condname1
+CREATE PROCEDURE h1 ()
+BEGIN
+DECLARE x1 INT DEFAULT 0;
+BEGIN
+DECLARE condname1 CONDITION CHECK SQLSTATE '23000';
+END;
+DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
+END//
+ERROR 42000: 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 'CHECK SQLSTATE '23000';
+END;
+DECLARE CONTINUE HANDLER FOR condname1 SET x1 = ...' at line 5
+CREATE PROCEDURE h1 ()
+BEGIN
+DECLARE x1 INT DEFAULT 0;
+BEGIN
+DECLARE condname1 CONDITION FOR SQLSTATE 'qwert';
+END;
+DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
+END//
+ERROR 42000: Bad SQLSTATE: 'qwert'
+
+Testcase 3.1.2.45 + 3.1.2.50:
+-----------------------------
+
+45. Ensure that the scope of every handler declared is properly applied.
+50. Ensure that a CONTINUE handler allows the execution of the stored procedure
+. to continue once the handler statement has completed its own execution (that
+. is, once the handler action statement has been executed).
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p1undo;
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+drop table IF EXISTS res_t1;
+==> 'UNDO' is still not supported.
+create procedure p1undo ()
+begin
+declare undo handler for sqlexception select '1';
+select * from tqq;
+SELECT 'end of 1';
+end;//
+ERROR 42000: 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 'undo handler for sqlexception select '1';
+select * from tqq;
+SELECT 'end of 1...' at line 3
+create procedure p1 ()
+begin
+declare exit handler for sqlexception select 'exit handler 1';
+begin
+declare exit handler for sqlexception select 'exit handler 2';
+begin
+declare continue handler for sqlexception select 'continue handler 3';
+drop table if exists tqq;
+select * from tqq;
+SELECT 'end of BEGIN/END 3';
+end;
+drop table if exists tqq;
+select * from tqq;
+SELECT 'end of BEGIN/END 2';
+end;
+select * from tqq;
+SELECT 'end of BEGIN/END 1';
+end;//
+call p1()//
+continue handler 3
+continue handler 3
+end of BEGIN/END 3
+end of BEGIN/END 3
+exit handler 2
+exit handler 2
+exit handler 1
+exit handler 1
+create table res_t1(w char unique, x char);
+insert into res_t1 values ('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare continue handler for sqlstate '23000' set x5 = 1;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+END;
+begin1_label: BEGIN
+BEGIN
+declare continue handler for sqlstate '23000' set x1 = 1;
+insert into res_t1 values ('a', 'b');
+set x2 = 1;
+begin2_label: BEGIN
+BEGIN
+declare exit handler for sqlstate '23000' set x3 = 1;
+set x4= 1;
+insert into res_t1 values ('a', 'b');
+set x4= 0;
+END;
+END begin2_label;
+END;
+END begin1_label;
+SELECT x1, x2, x3, x4, x5, x6;
+END//
+CALL h1();
+x1 x2 x3 x4 x5 x6
+1 1 1 1 1 1
+This will fail, SQLSTATE 00000 is not allowed
+CREATE PROCEDURE sp1()
+begin1_label:BEGIN
+declare exit handler for sqlstate '00000' set @var1 = 5;
+set @var2 = 6;
+begin2_label:BEGIN
+declare continue handler for sqlstate '00000' set @var3 = 7;
+set @var4 = 8;
+SELECT @var3, @var4;
+END begin2_label;
+SELECT @var1, @var2;
+END begin1_label//
+ERROR 42000: Bad SQLSTATE: '00000'
+Verify SP wasn't created
+CALL sp1();
+ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
+DROP PROCEDURE p1;
+DROP PROCEDURE h1;
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE res_t1;
+
+Testcase 3.1.2.50:
+------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @y=0;
+END//
+CREATE PROCEDURE sp2 ()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 1;
+set @x=1;
+SELECT @x2;
+CALL sp1(1);
+set @x=2;
+SELECT @x2, @x;
+END//
+CALL sp2();
+@x2
+NULL
+@x2 @x
+1 2
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.2.2.51:
+------------------
+
+Ensure that an EXIT handler causes the execution of the stored procedure to
+terminate, within its scope, once the handler action statement has been
+executed.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @x=0;
+END//
+CREATE PROCEDURE sp2 ()
+BEGIN
+declare exit handler for sqlstate '42000' set @x2 = 1;
+set @x2=0;
+set @x=1;
+SELECT '-1-', @x2, @x;
+CALL sp1(1);
+SELECT '-2-', @x2, @x;
+set @x=2;
+END//
+CALL sp1(1);
+ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
+CALL sp2();
+-1- @x2 @x
+-1- 0 1
+SELECT '-3-', @x2, @x;
+-3- @x2 @x
+-3- 1 1
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.1.2.52:
+------------------
+
+Ensure that an EXIT handler does not cause the execution of the stored procedure
+to terminate outside of its scope.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @x=0;
+END//
+CREATE PROCEDURE sp2()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 2;
+set @x2 = 1;
+set @x =20;
+SELECT '-1-', @x2, @x;
+BEGIN
+declare exit handler for sqlstate '42000' set @x2 = 11;
+SELECT '-2-', @x2, @x;
+CALL sp1(1);
+SELECT '-3a', @x2, @x;
+set @x=21;
+SELECT '-3b', @x2, @x;
+END;
+set @x=22;
+SELECT '-4-', @x2, @x;
+END//
+CALL sp2();
+-1- @x2 @x
+-1- 1 20
+-2- @x2 @x
+-2- 1 20
+-4- @x2 @x
+-4- 11 22
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.1.2.54:
+------------------
+
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+“01“ is always exactly equivalent in action to a handler with an SQLWARNING
+condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+DROP TABLE IF EXISTS temp;
+CREATE TABLE temp( f1 CHAR, f2 CHAR);
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp0()
+BEGIN
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '01000' set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp2()
+BEGIN
+declare continue handler for sqlwarning set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp3()
+BEGIN
+declare exit handler for sqlstate '01000' set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp4()
+BEGIN
+declare exit handler for sqlwarning set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+INSERT INTO temp VALUES('0', NULL);
+CALL sp0();
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
+Warning 1265 Data truncated for column 'f2' at row 1
+SELECT @done, @x;
+@done @x
+0 1
+INSERT INTO temp VALUES('1', NULL);
+CALL sp1();
+SELECT @done, @x;
+@done @x
+1 1
+INSERT INTO temp VALUES('2', NULL);
+CALL sp2();
+SELECT @done, @x;
+@done @x
+1 1
+INSERT INTO temp VALUES('3', NULL);
+CALL sp3();
+SELECT @done, @x;
+@done @x
+1 0
+INSERT INTO temp VALUES('4', NULL);
+CALL sp4();
+SELECT @done, @x;
+@done @x
+1 0
+SELECT * FROM temp;
+f1 f2
+0 NULL
+x y
+1 NULL
+x y
+2 NULL
+x y
+3 NULL
+x y
+4 NULL
+x y
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+DROP TABLE temp;
+
+Testcase 3.1.2.56:
+------------------
+
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+“02“ is always exactly equivalent in action to a handler with a NOT FOUND
+condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp0()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp1()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare continue handler for sqlstate '02000' set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp2()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare continue handler for not found set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp3()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare exit handler for sqlstate '02000' set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp4()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare exit handler for not found set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CALL sp0();
+ERROR 02000: No data - zero rows fetched, selected, or processed
+SELECT @done, @x;
+@done @x
+0 1
+CALL sp1();
+SELECT @done, @x;
+@done @x
+1 2
+CALL sp2();
+SELECT @done, @x;
+@done @x
+1 2
+CALL sp3();
+SELECT @done, @x;
+@done @x
+1 1
+CALL sp4();
+SELECT @done, @x;
+@done @x
+1 1
+DROP PROCEDURE sp0;
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+
+Testcase 3.1.2.58:
+------------------
+
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+anything other that “01“ or “02“ is always exactly equivalent in action to a
+handler with an SQLEXCEPTION condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp0()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp1()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE continue HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE';
+DECLARE continue HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE';
+DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp2()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE continue HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE';
+DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp3()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE EXIT HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE';
+DECLARE EXIT HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE';
+DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp4()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE EXIT HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE';
+DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+CLOSE cur1;
+END//
+CALL sp0();
+ERROR 20000: Case not found for CASE statement
+SELECT '-0-', @x;
+-0- @x
+-0- 1
+CALL sp1();
+SQLSTATE
+20000
+SQLSTATE
+21000
+SQLSTATE
+24000
+SELECT '-1-', @x;
+-1- @x
+-1- 6
+CALL sp2();
+SQLSTATE
+SQLEXCEPTION
+SQLSTATE
+SQLEXCEPTION
+SQLSTATE
+24000
+SELECT '-2-', @x;
+-2- @x
+-2- 6
+CALL sp3();
+SQLSTATE
+20000
+SELECT '-3-', @x;
+-3- @x
+-3- 1
+CALL sp4();
+SQLSTATE
+SQLEXCEPTION
+SELECT '-4-', @x;
+-4- @x
+-4- 1
+DROP PROCEDURE sp0;
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+
+Testcase 3.1.2.65:
+------------------
+
+Ensure that FETCH <cursor name> returns the first row of the cursor_s result set
+the first time FETCH is executed, that it returns each subsequent row of the
+cursor_s result set each of the subsequent times FETCH is executed, and that it
+returns a NOT FOUND warning if it is executed after the last row of the cursor_s
+result set has already been fetched.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS temp;
+CREATE TABLE temp(
+cnt INT,
+f1 CHAR(20),
+f2 CHAR(20),
+f3 INT,
+f4 CHAR(20),
+f5 INT);
+INSERT INTO temp VALUES(0, 'onip', 'abc', 8760, 'xyz', 10);
+CREATE PROCEDURE sp1( )
+BEGIN
+declare proceed int default 1;
+declare count integer default 1;
+declare f1_value char(20);
+declare f2_value char(20);
+declare f5_value char(20);
+declare f4_value integer;
+declare f6_value integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2
+where f4 >=-5000 order by f4 limit 3;
+open cur1;
+while proceed do
+SELECT count AS 'loop';
+fetch cur1 into f1_value, f2_value, f4_value, f5_value, f6_value;
+insert into temp values (count, f1_value, f2_value, f4_value, f5_value, f6_value);
+set count = count + 1;
+END while;
+END//
+CALL sp1();
+loop
+1
+loop
+2
+loop
+3
+loop
+4
+ERROR 02000: No data - zero rows fetched, selected, or processed
+SELECT * FROM temp;
+cnt f1 f2 f3 f4 f5
+0 onip abc 8760 xyz 10
+1 a` a` -5000 a` -5000
+2 aaa aaa -4999 aaa -4999
+3 abaa abaa -4998 abaa -4998
+DROP TABLE temp;
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.68:
+------------------
+
+Ensure that FETCH <cursor name> fails with an appropriate error message if the
+number of columns to be fetched does not match the number of variables specified
+by the FETCH statement.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+--> not enough columns in FETCH statement
+CREATE PROCEDURE sp1( )
+BEGIN
+declare newf1 char(20);
+declare cur1 cursor for SELECT f1, f2 from t2 limit 10;
+declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS '';
+BEGIN
+open cur1;
+fetch cur1 into newf1;
+SELECT newf1;
+close cur1;
+END;
+END//
+--> too many columns in FETCH statement
+CREATE PROCEDURE sp2( )
+BEGIN
+declare newf1 char(20);
+declare newf2 char(20);
+declare cur1 cursor for SELECT f1 from t2 limit 10;
+declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS '';
+BEGIN
+open cur1;
+fetch cur1 into newf1, newf2;
+SELECT newf1, newf2;
+close cur1;
+END;
+END//
+--> not enough columns in FETCH statement
+CALL sp1();
+ERROR HY000: Incorrect number of FETCH variables
+--> too many columns in FETCH statement
+CALL sp2();
+ERROR HY000: Incorrect number of FETCH variables
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.1.2.75:
+------------------
+
+Ensure that, for nested compound statements, a cursor that was declared and
+opened during an outer level of the statement is not closed when an inner level
+of a compound statement ends.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS temp1;
+DROP PROCEDURE IF EXISTS sp1;
+create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) );
+SELECT f1, f2, f4, f5 from t2 order by f4;
+f1 f2 f4 f5
+a` a` -5000 a`
+aaa aaa -4999 aaa
+abaa abaa -4998 abaa
+acaaa acaaa -4997 acaaa
+adaaaa adaaaa -4996 adaaaa
+aeaaaaa aeaaaaa -4995 aeaaaaa
+afaaaaaa afaaaaaa -4994 afaaaaaa
+agaaaaaaa agaaaaaaa -4993 agaaaaaaa
+a^aaaaaaaa a^aaaaaaaa -4992 a^aaaaaaaa
+a_aaaaaaaaa a_aaaaaaaaa -4991 a_aaaaaaaaa
+CREATE PROCEDURE sp1( )
+BEGIN
+declare count integer;
+declare from0 char(20);
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf5 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
+declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
+open cur1;
+open cur2;
+BEGIN
+declare continue handler for sqlstate '02000' set count = 1;
+fetch cur1 into newf1, newf2, newf4, newf5;
+SELECT '-1-', count, newf1, newf2, newf4, newf5;
+insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
+set count = 4;
+BEGIN
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf5;
+SELECT '-2-', count, newf1, newf2, newf4, newf5;
+set count = count - 1;
+END while;
+SELECT '-3-', count, newf1, newf2, newf4, newf4;
+END;
+BEGIN
+fetch cur1 into newf1, newf2, newf4, newf5;
+SELECT '-4-', newf1, newf2, newf4, newf5;
+insert into temp1 values ('cur1_in', newf1, newf2, newf4, newf5);
+END;
+fetch cur2 into newf1, newf2, newf4, newf5;
+SELECT '-5-', newf1, newf2, newf4, newf5;
+insert into temp1 values ('cur2', newf1, newf2, newf4, newf5);
+close cur1;
+END;
+fetch cur2 into newf1, newf2, newf4, newf5;
+SELECT '-6-', newf1, newf2, newf4, newf5;
+close cur2;
+END//
+CALL sp1();
+-1- count newf1 newf2 newf4 newf5
+-1- NULL a` a` -5000 a`
+-2- count newf1 newf2 newf4 newf5
+-2- 4 aaa aaa -4999 aaa
+-2- count newf1 newf2 newf4 newf5
+-2- 3 abaa abaa -4998 abaa
+-2- count newf1 newf2 newf4 newf5
+-2- 2 acaaa acaaa -4997 acaaa
+-2- count newf1 newf2 newf4 newf5
+-2- 1 adaaaa adaaaa -4996 adaaaa
+-3- count newf1 newf2 newf4 newf4
+-3- 0 adaaaa adaaaa -4996 -4996
+-4- newf1 newf2 newf4 newf5
+-4- adaaaa adaaaa -4996 adaaaa
+-5- newf1 newf2 newf4 newf5
+-5- a` a` -5000 a`
+-6- newf1 newf2 newf4 newf5
+-6- aaa aaa -4999 aaa
+SELECT * from temp1;
+f0 f1 f2 f3 f4
+cur1_out a` a` -5000 a`
+cur1_in adaaaa adaaaa -4996 adaaaa
+cur2 a` a` -5000 a`
+DROP PROCEDURE sp1;
+drop table temp1;
+
+Testcase 3.1.2.76:
+------------------
+
+Ensure that all cursors operate asensitively, so that there is no concurrency
+conflict between cursors operating on the same, or similar, sets of results
+during execution of one or more stored procedures.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+drop table IF EXISTS temp1;
+drop table IF EXISTS temp2;
+create table temp1( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer );
+create table temp2( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer );
+CREATE PROCEDURE sp_inner( )
+BEGIN
+declare proceed int default 1;
+declare i_count integer default 20;
+declare i_newf1 char(20);
+declare i_newf2 char(20);
+declare i_newf3 date;
+declare i_newf4 integer;
+declare i_newf11 char(20);
+declare i_newf12 char(20);
+declare i_newf13 date;
+declare i_newf14 integer;
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2
+where f4>=-5000 order by f4 limit 4;
+declare cur2 cursor for SELECT f1, f2, f3, f4 from t2
+where f4>=-5000 order by f4 limit 3;
+declare continue handler for sqlstate '02000' set proceed=0;
+open cur1;
+open cur2;
+set i_count = 10;
+while proceed do
+fetch cur1 into i_newf1, i_newf2, i_newf3, i_newf4;
+IF proceed THEN
+insert into temp1 values ('sp_inner', i_count, i_newf1, i_newf2, i_newf3, i_newf4);
+fetch cur2 into i_newf11, i_newf12, i_newf13, i_newf14;
+IF proceed THEN
+insert into temp2 values ('sp_inner', i_count, i_newf11, i_newf12, i_newf13, i_newf14);
+END IF;
+END IF;
+set i_count = i_count - 1;
+END while;
+close cur1;
+close cur2;
+END//
+CREATE PROCEDURE sp_outer( )
+BEGIN
+DECLARE proceed INT DEFAULT 1;
+DECLARE o_count INTEGER DEFAULT 20;
+DECLARE o_newf1 CHAR(20);
+DECLARE o_newf2 CHAR(20);
+DECLARE o_newf3 DATE;
+DECLARE o_newf4 INTEGER;
+DECLARE o_newf11 CHAR(20);
+DECLARE o_newf12 CHAR(20);
+DECLARE o_newf13 DATE;
+DECLARE o_newf14 INTEGER;
+DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
+WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
+DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
+WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0;
+OPEN cur1;
+OPEN cur2;
+SET o_count = 1;
+WHILE proceed DO
+FETCH cur1 INTO o_newf1, o_newf2, o_newf3, o_newf4;
+IF proceed THEN
+INSERT INTO temp1 VALUES ('_sp_out_', o_count, o_newf1, o_newf2, o_newf3, o_newf4);
+CALL sp_inner();
+FETCH cur2 INTO o_newf11, o_newf12, o_newf13, o_newf14;
+IF proceed THEN
+INSERT INTO temp2 VALUES ('_sp_out_', o_count, o_newf11, o_newf12, o_newf13, o_newf14);
+END IF;
+END IF;
+SET o_count = o_count + 1;
+END WHILE;
+CLOSE cur1;
+CLOSE cur2;
+END//
+CALL sp_outer();
+SELECT * FROM temp1;
+f0 cnt f1 f2 f3 f4
+_sp_out_ 1 a` a` 1000-01-01 -5000
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 2 aaa aaa 1000-01-02 -4999
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 3 abaa abaa 1000-01-03 -4998
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 4 acaaa acaaa 1000-01-04 -4997
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+SELECT * FROM temp2;
+f0 cnt f1 f2 f3 f4
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 1 a` a` 1000-01-01 -5000
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 2 aaa aaa 1000-01-02 -4999
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 3 abaa abaa 1000-01-03 -4998
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 4 acaaa acaaa 1000-01-04 -4997
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996
+DROP PROCEDURE sp_outer;
+DROP PROCEDURE sp_inner;
+DROP TABLE temp1;
+DROP TABLE temp2;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_03.result b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result
new file mode 100644
index 00000000..6390cc24
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result
@@ -0,0 +1,497 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.3 - Syntax checks for the stored procedure-specific flow
+control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
+--------------------------------------------------------------------------------
+
+Testcase 3.1.3.7:
+-----------------
+
+Ensure that the IF statement acts correctly for all variants, including cases
+where statements are nested.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp9;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+CREATE PROCEDURE sp9( action char(20), subaction char(20) )
+BEGIN
+if action = 'action' then
+if subaction = 'subaction' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction' , 1);
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 2);
+END if;
+else
+if subaction = 'subaction'
+ then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction' , 3);
+elseif subaction = 'subaction1'
+ then
+BEGIN
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values ('none', 'subaction1', 4);
+END;
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 5);
+END if;
+END if;
+END//
+CALL sp9( 'action', 'subaction' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=1;
+f1 f2 f3
+action subaction 1
+CALL sp9( 'temp', 'subaction' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=3;
+f1 f2 f3
+none subaction 3
+CALL sp9( 'temp', 'subaction1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=4;
+f1 f2 f3
+none subaction1 4
+CALL sp9( 'action', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=2;
+f1 f2 f3
+action none 2
+CALL sp9( 'temp', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=5;
+f1 f2 f3
+none none 5
+DROP PROCEDURE sp9;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.8.:
+------------------
+
+Ensure that the CASE statement acts correctly for all variants, including cases
+where statements are nested.
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp10;
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+CREATE PROCEDURE sp10( action char(20), subaction char(20) )
+BEGIN
+case action
+when 'action' then
+case
+when subaction = 'subaction_1' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 1);
+when subaction = 'subaction_2' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 2);
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 3);
+END case;
+else
+case
+when subaction = 'subaction_1' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_1' , 4);
+when subaction = 'subaction_2' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_2' , 5);
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 6);
+END case;
+END case;
+END//
+CALL sp10( 'action', 'subaction_1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+action subaction_2 1
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'action', 'subaction_2' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+action subaction_2 2
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'temp', 'subaction_1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+none subaction_1 4
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'temp', 'subaction_2' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+none subaction_2 5
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'action', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+action none 3
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'temp', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+none none 6
+DROP PROCEDURE sp10;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.9 + 3.1.3.15:
+----------------------------
+
+09. Ensure that the LOOP statement acts correctly for all variants, including
+. cases where statements are nested.
+15. Ensure that the LEAVE statement acts correctly for all variants, including
+. cases where statements are nested.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp11;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+CREATE PROCEDURE sp11( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+label1: loop
+if count2 > 3 then leave label1;
+END if;
+set count1 = 1;
+label2: loop
+if count1 > 4 then leave label2;
+END if;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+set count1 = count1 + 1;
+iterate label2;
+END loop label2;
+set count2 = count2 + 1;
+iterate label1;
+END loop label1;
+END//
+CALL sp11();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+xyz pqr 1
+xyz pqr 2
+xyz pqr 3
+xyz pqr 4
+xyz pqr 1
+xyz pqr 2
+xyz pqr 3
+xyz pqr 4
+xyz pqr 1
+xyz pqr 2
+xyz pqr 3
+xyz pqr 4
+DROP PROCEDURE sp11;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.16:
+------------------
+
+Ensure that the ITERATE statement acts correctly for all variants, including
+cases where statements are nested.
+(tests for this testcase are also included in other testcases)
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp31316;
+CREATE PROCEDURE sp31316( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+label1: loop
+if count2 > 3 then leave label1;
+END if;
+set count1 = 1;
+label2: loop
+if count1 > 4 then leave label2;
+END if;
+insert into temp values( count1, count2);
+set count1 = count1 + 1;
+iterate label3;
+END loop label2;
+set count2 = count2 + 1;
+iterate label1;
+END loop label1;
+END//
+ERROR 42000: ITERATE with no matching label: label3
+
+Testcase 3.1.3.18:
+------------------
+
+Ensure that the REPEAT statement acts correctly for all variants, including
+cases where statements are nested.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp17;
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+CREATE PROCEDURE sp17( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+repeat
+set count1 = count1 + 1;
+set count2 = 1;
+label1: repeat
+set count2 = count2 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+until count2 > 3
+END repeat label1;
+until count1 > 3
+END repeat;
+END//
+CALL sp17();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+xyz pqr 2
+xyz pqr 2
+xyz pqr 2
+xyz pqr 3
+xyz pqr 3
+xyz pqr 3
+xyz pqr 4
+xyz pqr 4
+xyz pqr 4
+DROP PROCEDURE sp17;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.24:
+------------------
+
+Ensure that the WHILE statement acts correctly for all variants, including cases
+where statements are nested.
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t21;
+DROP PROCEDURE IF EXISTS sp21;
+create table res_t21(name text(10), surname blob(20), age_averylongfieldname_averylongname_1234569 smallint);
+insert into res_t21 values('ashwin', 'mokadam', 25);
+CREATE PROCEDURE sp21( )
+BEGIN
+declare count1 integer default 0;
+declare count2 integer default 0;
+while count1 < 3 do
+BEGIN
+declare ithisissamevariablename int default 100;
+SELECT ithisissamevariablename;
+BEGIN
+declare ithisissamevariablename int default 200;
+SELECT ithisissamevariablename;
+END;
+set count2 = 0;
+label1: while count2 < 3 do
+BEGIN
+declare count1 integer default 7;
+set count2 = count2 + 1;
+insert into res_t21 values( 'xyz' , 'pqr', count2);
+label2: while count1 < 10 do
+set count1 = count1 + 1;
+insert into res_t21 values( 'xyz' , 'pqr', count1);
+END while label2;
+END;
+END while label1;
+set count1 = count1 + 1;
+END;
+END while;
+END//
+CALL sp21();
+ithisissamevariablename
+100
+ithisissamevariablename
+200
+ithisissamevariablename
+100
+ithisissamevariablename
+200
+ithisissamevariablename
+100
+ithisissamevariablename
+200
+SELECT * from res_t21;
+name surname age_averylongfieldname_averylongname_1234569
+ashwin mokadam 25
+xyz pqr 1
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 2
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 3
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 1
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 2
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 3
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 1
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 2
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 3
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+DROP PROCEDURE sp21;
+drop table res_t21;
+
+Testcase 3.1.3.30:
+------------------
+
+Ensure that multiple cases of all possible combinations of the control flow
+statements, nested within multiple compound statements within a stored
+procedure, always act correctly and return the expected result.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS res_tbl;
+DROP PROCEDURE IF EXISTS sp31330;
+create table res_tbl (f1 int, f2 text, f3 blob, f4 date,
+f5 set('one', 'two', 'three', 'four', 'five') default 'one');
+CREATE PROCEDURE sp31330 (path int)
+BEGIN
+declare count int default 1;
+declare var1 text;
+declare var2 blob;
+declare var3 date;
+declare var4 set('one', 'two', 'three', 'four', 'five') DEFAULT 'five';
+case
+when path=1 then
+set var3 = '2000-11-09';
+set var1 = 'flowing through case 1';
+label1: loop
+if count > 5 then
+if var4=1000 then
+set var2 = 'exiting out of case 1 - invalid SET';
+END if;
+if var4='two' then
+set var2 = 'exiting out of case 1';
+END if;
+insert into res_tbl values (1, var1, var2, var3, (count-2));
+leave label1;
+elseif count = 5 then
+set count= count + 2;
+set var4='two';
+iterate label1;
+else
+set count= count + 1;
+END if;
+set var4='one';
+END loop label1;
+when path=2 then
+set var3 = '1989-11-09';
+set var1 = 'flowing through case 2';
+set @count3=0;
+label2: repeat
+set count=count + 1;
+set @count2=1;
+while @count2 <= 5 do
+set @count2 = @count2 + 1;
+END while;
+SELECT @count2;
+set @count3=@count3 + @count2;
+until count > 5
+END repeat label2;
+set var2 = 'exiting out of case 2';
+set var4 = count-3;
+SELECT @count3;
+insert into res_tbl values (2, var1, var2, var3, var4);
+ELSE BEGIN
+set @error_opt='undefined path specified';
+SELECT @error_opt;
+END;
+END case;
+END//
+CALL sp31330();
+ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp31330; expected 1, got 0
+CALL sp31330(1);
+SELECT * from res_tbl;
+f1 f2 f3 f4 f5
+1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
+CALL sp31330(2);
+@count2
+6
+@count2
+6
+@count2
+6
+@count2
+6
+@count2
+6
+@count3
+30
+SELECT * from res_tbl;
+f1 f2 f3 f4 f5
+1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
+2 flowing through case 2 exiting out of case 2 1989-11-09 one,two
+CALL sp31330(4);
+@error_opt
+undefined path specified
+DROP PROCEDURE sp31330;
+drop table res_tbl;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
new file mode 100644
index 00000000..694cfc01
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
@@ -0,0 +1,436 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+set GLOBAL sql_mode="";
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.6 - Privilege Checks:
+--------------------------------------------------------------------------------
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+
+Testcase 3.1.6.1:
+-----------------
+Ensure that no user may create a stored procedure without the GRANT CREATE
+ROUTINE privilege.
+--------------------------------------------------------------------------------
+create user 'user_1'@'localhost';
+grant all on db_storedproc_1.* to 'user_1'@'localhost';
+revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+DROP PROCEDURE IF EXISTS sp1;
+connect user1a, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+USE db_storedproc_1;
+CREATE PROCEDURE sp1(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
+disconnect user1a;
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
+connect user1b, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+USE db_storedproc_1;
+CREATE PROCEDURE sp1(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+disconnect user1b;
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+DROP USER 'user_1'@'localhost';
+DROP PROCEDURE sp1;
+
+Testcase 3.1.6.2:
+-----------------
+Ensure that root always has the GRANT CREATE ROUTINE privilege.
+(checked by other testscases)
+--------------------------------------------------------------------------------
+grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+DROP PROCEDURE IF EXISTS db_storedproc_1.sp3;
+DROP FUNCTION IF EXISTS db_storedproc_1.fn1;
+connect user2, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+CREATE PROCEDURE sp3(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+CREATE FUNCTION fn1(v1 int) returns int
+BEGIN
+return v1;
+END//
+disconnect user2;
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+drop user 'user_1'@'localhost';
+DROP PROCEDURE sp3;
+DROP FUNCTION fn1;
+
+Testcase 3.1.6.4:
+-----------------
+Ensure that the default security provision of a stored procedure is SQL SECURITY
+DEFINER.
+--------------------------------------------------------------------------------
+CREATE USER 'user_1'@'localhost';
+grant update on db_storedproc_1.t6 to 'user_1'@'localhost';
+grant execute on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+USE db_storedproc_1;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+connect user3, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+USE db_storedproc_1;
+CALL sp4('a');
+f1 f2 f3 f4 f5 f6
+SELECT SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE,
+ROUTINE_BODY, ROUTINE_DEFINITION, IS_DETERMINISTIC,
+SQL_DATA_ACCESS, SECURITY_TYPE, SQL_MODE, ROUTINE_COMMENT
+FROM information_schema.routines
+WHERE routine_schema LIKE 'db_sto%';
+SPECIFIC_NAME sp4
+ROUTINE_SCHEMA db_storedproc_1
+ROUTINE_NAME sp4
+ROUTINE_TYPE PROCEDURE
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION NULL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SECURITY_TYPE DEFINER
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT
+disconnect user3;
+connection default;
+
+root@localhost db_storedproc_1
+DROP PROCEDURE sp4;
+DROP USER 'user_1'@'localhost';
+
+Testcase 3.1.6.5:
+-----------------
+Ensure that a stored procedure defined with SQL SECURITY DEFINER can be
+called/executed by any user, using only the privileges (including database
+access privileges) associated with the user who created the stored procedure.
+--------------------------------------------------------------------------------
+USE db_storedproc_1;
+CREATE TABLE t3165 ( c1 char(20), c2 char(20), c3 date);
+INSERT INTO t3165 VALUES ('inserted', 'outside of SP', NULL);
+create user 'user_1'@'localhost';
+create user 'user_2'@'localhost';
+grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
+grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
+grant execute on db_storedproc_1.* to 'user_2'@'localhost';
+flush privileges;
+connect user5_1, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+CREATE PROCEDURE sp5_s_i () sql security definer
+BEGIN
+SELECT * from db_storedproc_1.t3165;
+insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_s_i', 1000);
+END//
+CREATE PROCEDURE sp5_sel () sql security definer
+BEGIN
+SELECT * from db_storedproc_1.t3165;
+END//
+CREATE PROCEDURE sp5_ins () sql security definer
+BEGIN
+insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
+END//
+disconnect user5_1;
+connect user5_2, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+grant insert on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+CALL sp5_ins();
+CALL sp5_sel();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+inserted from sp5_s_i 2000-10-00
+inserted from sp5_ins 2000-10-00
+connection default;
+
+root@localhost db_storedproc_1
+REVOKE INSERT on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+inserted from sp5_s_i 2000-10-00
+inserted from sp5_ins 2000-10-00
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_sel();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+inserted from sp5_s_i 2000-10-00
+inserted from sp5_ins 2000-10-00
+connection default;
+
+root@localhost db_storedproc_1
+REVOKE SELECT on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+disconnect user5_2;
+connection default;
+
+root@localhost db_storedproc_1
+DROP PROCEDURE sp5_s_i;
+DROP PROCEDURE sp5_sel;
+DROP PROCEDURE sp5_ins;
+DROP TABLE t3165;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+Testcase 3.1.6.6:
+-----------------
+Ensure that a stored procedure defined with SQL SECURITY INVOKER can be
+called/executed by any user, using only the privileges (including database
+access privileges) associated with the user executing the stored procedure.
+--------------------------------------------------------------------------------
+USE db_storedproc_1;
+CREATE TABLE t3166 ( c1 char(30) );
+INSERT INTO db_storedproc_1.t3166 VALUES ('inserted outside SP');
+create user 'user_1'@'localhost';
+create user 'user_2'@'localhost';
+GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
+GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
+GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user6_1, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
+BEGIN
+SELECT * from db_storedproc_1.t3166;
+insert into db_storedproc_1.t3166 values ('inserted from sp3166_s_i');
+END//
+CREATE PROCEDURE sp3166_sel () SQL SECURITY INVOKER
+BEGIN
+SELECT * from db_storedproc_1.t3166;
+END//
+CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
+BEGIN
+insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
+END//
+disconnect user6_1;
+connect user6_2, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+c1
+inserted outside SP
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+CALL sp3166_ins();
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+CALL sp3166_sel();
+c1
+inserted outside SP
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp3166_sel();
+c1
+inserted outside SP
+GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+disconnect user6_2;
+connect user6_3, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+c1
+inserted outside SP
+CALL sp3166_ins();
+CALL sp3166_sel();
+c1
+inserted outside SP
+inserted from sp3166_s_i
+inserted from sp3166_ins
+disconnect user6_3;
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp3166_sel();
+c1
+inserted outside SP
+inserted from sp3166_s_i
+inserted from sp3166_ins
+REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user6_4, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+CALL sp3166_ins();
+CALL sp3166_sel();
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+disconnect user6_4;
+connection default;
+CALL sp3166_s_i();
+c1
+inserted outside SP
+inserted from sp3166_s_i
+inserted from sp3166_ins
+inserted from sp3166_ins
+
+root@localhost db_storedproc_1
+REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user6_5, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_s_i'
+CALL sp3166_ins();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_ins'
+CALL sp3166_sel();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_sel'
+disconnect user6_5;
+connection default;
+
+root@localhost db_storedproc_1
+DROP PROCEDURE sp3166_s_i;
+DROP PROCEDURE sp3166_sel;
+DROP PROCEDURE sp3166_ins;
+DROP TABLE t3166;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+set GLOBAL sql_mode=default;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_07.result b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result
new file mode 100644
index 00000000..751986b8
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result
@@ -0,0 +1,179 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.7 - SQL mode checks:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 3.1.7.1:
+-----------------
+Ensure that the sql_mode setting in effect at the time a stored procedure is
+created is the same setting under which the stored procedure runs when it is
+called/executed.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS temp_tbl;
+DROP TABLE IF EXISTS result;
+CREATE TABLE temp_tbl (f1 tinyint);
+CREATE TABLE result (f1 text(200), f2 char(20));
+set @@sql_mode='traditional';
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+CREATE PROCEDURE sp1()
+BEGIN
+declare a tinyint;
+declare count_ int default 1;
+declare continue handler for sqlstate '22003' set count_=1000;
+SHOW VARIABLES LIKE 'sql_mode';
+SELECT @@sql_mode into @cur_val_sql_mode;
+insert into temp_tbl values (1000);
+if count_ = 1000 THEN
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
+ELSE
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
+END if;
+END//
+SHOW CREATE PROCEDURE sp1;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
+BEGIN
+declare a tinyint;
+declare count_ int default 1;
+declare continue handler for sqlstate '22003' set count_=1000;
+SHOW VARIABLES LIKE 'sql_mode';
+SELECT @@sql_mode into @cur_val_sql_mode;
+insert into temp_tbl values (1000);
+if count_ = 1000 THEN
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
+ELSE
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
+END if;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+set @@sql_mode='';
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode
+CALL sp1();
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+SELECT * from result;
+f1 f2
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION value restored
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode
+SELECT @@sql_mode;
+@@sql_mode
+
+SET @@sql_mode='TRADITIONAL';
+DROP PROCEDURE sp1;
+DROP TABLE temp_tbl;
+DROP TABLE result;
+
+Testcase 3.1.7.2:
+-----------------
+Ensure that if the sql_mode setting is changed when a stored procedure is run,
+that the original setting is restored as soon as the stored procedure execution
+is complete.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp2;
+... show initial value
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+CREATE PROCEDURE sp2()
+BEGIN
+SET @@sql_mode='MAXDB';
+SHOW VARIABLES LIKE 'sql_mode';
+END//
+SHOW CREATE PROCEDURE sp2;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
+BEGIN
+SET @@sql_mode='MAXDB';
+SHOW VARIABLES LIKE 'sql_mode';
+END latin1 latin1_swedish_ci latin1_swedish_ci
+... show value prior calling procedure
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+... call procedure that changes sql_mode
+CALL sp2();
+Variable_name Value
+sql_mode PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
+... check whether old value is re-set
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DROP PROCEDURE sp2;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_08.result b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result
new file mode 100644
index 00000000..1b8a571e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result
@@ -0,0 +1,848 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.8 - SHOW statement checks:
+--------------------------------------------------------------------------------
+
+Testcase 3.1.8.9:
+-----------------
+
+Ensure that all stored procedure changes made with ALTER PROCEDURE or ALTER
+FUNCTION are properly recorded and displayed when a SHOW CREATE PROCEDURE or
+SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE
+FUNCTION STATUS statement (respectively) is executed.
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn_1;
+DROP FUNCTION IF EXISTS fn_2;
+DROP PROCEDURE IF EXISTS sp_1;
+DROP PROCEDURE IF EXISTS sp_2;
+CREATE PROCEDURE sp_1 (i1 int)
+BEGIN
+set @x=i1;
+END//
+CREATE PROCEDURE sp_2 (i1 int) SQL SECURITY INVOKER COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+END//
+CREATE FUNCTION fn_1 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns year
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END//
+CREATE FUNCTION fn_2 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+RETURNS YEAR
+SQL SECURITY INVOKER
+COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END//
+
+... now check what is stored:
+-----------------------------
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+SPECIFIC_NAME fn_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_1
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME fn_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_2
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT created with INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_1
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_2
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT created with INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SHOW CREATE FUNCTION fn_1;
+Function fn_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE FUNCTION fn_2;
+Function fn_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ SQL SECURITY INVOKER
+ COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_1;
+Procedure sp_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_2;
+Procedure sp_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
+ SQL SECURITY INVOKER
+ COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW FUNCTION STATUS LIKE 'fn_%';
+Db db_storedproc
+Name fn_1
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name fn_2
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment created with INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+Db db_storedproc
+Name sp_1
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name sp_2
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment created with INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+
+... now change some stuff:
+--------------------------
+ALTER PROCEDURE sp_1 SQL SECURITY INVOKER;
+ALTER PROCEDURE sp_1 COMMENT 'new comment, SP changed to INVOKER';
+ALTER PROCEDURE sp_2 SQL SECURITY DEFINER;
+ALTER PROCEDURE sp_2 DROP COMMENT;
+ERROR 42000: 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 'DROP COMMENT' at line 1
+ALTER PROCEDURE sp_2 COMMENT 'SP changed to DEFINER';
+ALTER PROCEDURE sp_2 READS SQL DATA;
+ALTER FUNCTION fn_1 SQL SECURITY INVOKER;
+ALTER FUNCTION fn_1 COMMENT 'new comment, FN changed to INVOKER';
+ALTER FUNCTION fn_1 NO SQL;
+ALTER FUNCTION fn_2 SQL SECURITY DEFINER;
+ALTER FUNCTION fn_2 COMMENT 'FN changed to DEFINER';
+ALTER FUNCTION fn_2 MODIFIES SQL DATA;
+
+... now check what is stored:
+-----------------------------
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+SPECIFIC_NAME fn_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_1
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS NO SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT new comment, FN changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME fn_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_2
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS MODIFIES SQL DATA
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT FN changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_1
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT new comment, SP changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_2
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS READS SQL DATA
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT SP changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SHOW CREATE FUNCTION fn_1;
+Function fn_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ NO SQL
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, FN changed to INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE FUNCTION fn_2;
+Function fn_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ MODIFIES SQL DATA
+ COMMENT 'FN changed to DEFINER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_1;
+Procedure sp_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, SP changed to INVOKER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_2;
+Procedure sp_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
+ READS SQL DATA
+ COMMENT 'SP changed to DEFINER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW FUNCTION STATUS LIKE 'fn_%';
+Db db_storedproc
+Name fn_1
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, FN changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name fn_2
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment FN changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+Db db_storedproc
+Name sp_1
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, SP changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name sp_2
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment SP changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+
+... change back to default and check result:
+--------------------------------------------
+ALTER FUNCTION fn_2 CONTAINS SQL;
+
+... now check what is stored:
+-----------------------------
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+SPECIFIC_NAME fn_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_1
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS NO SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT new comment, FN changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME fn_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_2
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT FN changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_1
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT new comment, SP changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_2
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS READS SQL DATA
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT SP changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SHOW CREATE FUNCTION fn_1;
+Function fn_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ NO SQL
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, FN changed to INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE FUNCTION fn_2;
+Function fn_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ COMMENT 'FN changed to DEFINER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_1;
+Procedure sp_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, SP changed to INVOKER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_2;
+Procedure sp_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
+ READS SQL DATA
+ COMMENT 'SP changed to DEFINER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW FUNCTION STATUS LIKE 'fn_%';
+Db db_storedproc
+Name fn_1
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, FN changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name fn_2
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment FN changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+Db db_storedproc
+Name sp_1
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, SP changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name sp_2
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment SP changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+
+... cleanup
+-----------
+DROP FUNCTION fn_1;
+DROP FUNCTION fn_2;
+DROP PROCEDURE sp_1;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
new file mode 100644
index 00000000..ef5aa4c8
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
@@ -0,0 +1,410 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.10 - CALL checks:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 3.1.10.2 + 3.1.10.5:
+-----------------------------
+
+2. Ensure that a procedure cannot be called if the appropriate privileges do not
+exist.
+5. Ensure that a function cannot be executed if the appropriate privileges do
+not exist.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp31102;
+DROP FUNCTION IF EXISTS fn31105;
+create user 'user_1'@'localhost';
+create user 'user_2'@'localhost';
+GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
+GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user2_1, localhost, user_1, , db_storedproc;
+
+user_1@localhost db_storedproc
+CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
+BEGIN
+SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1;
+END//
+CREATE FUNCTION fn31105(n INT) RETURNS INT
+BEGIN
+DECLARE res INT;
+SET res = n * n;
+RETURN res;
+END//
+disconnect user2_1;
+connect user2_2, localhost, user_2, , db_storedproc;
+
+user_2@localhost db_storedproc
+CALL sp31102();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
+SELECT fn31105( 9 );
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+CALL sp31102();
+f1 f2 f3 f4 f5 f6
+a` a` 1000-01-01 -5000 a` -5000
+SELECT fn31105( 9 );
+fn31105( 9 )
+81
+GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+disconnect user2_2;
+connect user2_3, localhost, user_2, , db_storedproc;
+
+user_2@localhost db_storedproc
+CALL sp31102();
+f1 f2 f3 f4 f5 f6
+a` a` 1000-01-01 -5000 a` -5000
+SELECT fn31105( 9 );
+fn31105( 9 )
+81
+disconnect user2_3;
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+CALL sp31102();
+f1 f2 f3 f4 f5 f6
+a` a` 1000-01-01 -5000 a` -5000
+SELECT fn31105( 9 );
+fn31105( 9 )
+81
+connect user2_4, localhost, user_2, , db_storedproc;
+
+user_2@localhost db_storedproc
+CALL sp31102();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
+SELECT fn31105( 9 );
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
+disconnect user2_4;
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+DROP PROCEDURE sp31102;
+DROP FUNCTION fn31105;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+Testcase 3.1.10.3:
+------------------
+
+Ensure that a function can never be called.
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(a int) returns int
+BEGIN
+set @b = 0.9 * a;
+return @b;
+END//
+CALL fn1();
+ERROR 42000: PROCEDURE db_storedproc.fn1 does not exist
+DROP FUNCTION fn1;
+
+Testcase 3.1.10.6:
+------------------
+
+Ensure that a procedure can never be executed.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP FUNCTION IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+SELECT * from t10;
+END//
+SELECT sp1();
+ERROR 42000: FUNCTION db_storedproc.sp1 does not exist
+DROP PROCEDURE sp1;
+
+Testcase 3.1.10.7:
+------------------
+
+Ensure that the ROW_COUNT() SQL function always returns the correct number of
+rows affected by the execution of a stored procedure.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp_ins_1;
+DROP PROCEDURE IF EXISTS sp_ins_3;
+DROP PROCEDURE IF EXISTS sp_upd;
+DROP PROCEDURE IF EXISTS sp_ins_upd;
+DROP PROCEDURE IF EXISTS sp_del;
+DROP PROCEDURE IF EXISTS sp_with_rowcount;
+CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT);
+INSERT INTO temp SELECT * FROM t10;
+CREATE PROCEDURE sp_ins_1()
+BEGIN
+INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000);
+END//
+CREATE PROCEDURE sp_ins_3()
+BEGIN
+INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('abc', 'xyz', '1989-11-09', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000);
+END//
+CREATE PROCEDURE sp_upd()
+BEGIN
+UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc';
+END//
+CREATE PROCEDURE sp_ins_upd()
+BEGIN
+BEGIN
+INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('qwe', 'abc', '2005-11-07', 100, 'uvw', 1000);
+END;
+SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1;
+UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc';
+END//
+CREATE PROCEDURE sp_del()
+BEGIN
+DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2';
+END//
+CREATE PROCEDURE sp_with_rowcount()
+BEGIN
+BEGIN
+INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000),
+('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000),
+('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000),
+('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000);
+END;
+SELECT row_count() AS 'row_count() after insert';
+SELECT row_count() AS 'row_count() after select row_count()';
+SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
+UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc';
+SELECT row_count() AS 'row_count() after update';
+SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
+DELETE FROM temp WHERE temp.f1 = 'updated_2';
+SELECT row_count() AS 'row_count() after delete';
+END//
+CALL sp_ins_1();
+SELECT row_count();
+row_count()
+1
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+abc abc 2005-10-03 100 uvw 1000
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+CALL sp_ins_3();
+SELECT row_count();
+row_count()
+3
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+abc abc 2005-10-03 100 uvw 1000
+abc xyz 1949-05-23 100 uvw 1000
+abc xyz 1989-11-09 100 uvw 1000
+abc xyz 2005-10-24 100 uvw 1000
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+CALL sp_upd();
+SELECT row_count();
+row_count()
+4
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+updated abc 2005-10-03 100 uvw 1000
+updated xyz 1949-05-23 100 uvw 1000
+updated xyz 1989-11-09 100 uvw 1000
+updated xyz 2005-10-24 100 uvw 1000
+CALL sp_ins_upd();
+COUNT( f1 ) f1
+1 aaa
+1 abaa
+1 acaaa
+1 adaaaa
+1 aeaaaaa
+1 afaaaaaa
+1 agaaaaaaa
+1 a^aaaaaaaa
+1 a_aaaaaaaaa
+1 a`
+4 qwe
+4 updated
+SELECT row_count();
+row_count()
+7
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+qwe xyz 1998-03-26 100 uvw 1000
+updated abc 2005-10-03 100 uvw 1000
+updated xyz 1949-05-23 100 uvw 1000
+updated xyz 1989-11-09 100 uvw 1000
+updated xyz 2005-10-24 100 uvw 1000
+updated_2 abc 1989-11-09 100 uvw 1000
+updated_2 abc 2000-11-09 100 uvw 1000
+updated_2 abc 2005-11-07 100 uvw 1000
+CALL sp_del();
+SELECT row_count();
+row_count()
+4
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+updated abc 2005-10-03 100 uvw 1000
+updated xyz 1949-05-23 100 uvw 1000
+updated xyz 1989-11-09 100 uvw 1000
+updated xyz 2005-10-24 100 uvw 1000
+DELETE FROM temp;
+CALL sp_with_rowcount();
+row_count() after insert
+4
+row_count() after select row_count()
+-1
+f1 f2 f3
+qwe abc 1989-11-09
+qwe abc 2000-11-09
+qwe xyz 1998-03-26
+qwe xyz 2005-11-07
+row_count() after update
+2
+f1 f2 f3
+qwe xyz 1998-03-26
+qwe xyz 2005-11-07
+updated_2 abc 1989-11-09
+updated_2 abc 2000-11-09
+row_count() after delete
+2
+SELECT row_count();
+row_count()
+8
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+qwe xyz 1998-03-26 100 uvw 1000
+qwe xyz 2005-11-07 100 uvw 1000
+DROP PROCEDURE sp_ins_1;
+DROP PROCEDURE sp_ins_3;
+DROP PROCEDURE sp_upd;
+DROP PROCEDURE sp_ins_upd;
+DROP PROCEDURE sp_del;
+DROP PROCEDURE sp_with_rowcount;
+DROP TABLE temp;
+
+Testcase 3.1.10.8:
+------------------
+
+Ensure that the mysql_affected_rows() C API function always returns the correct
+number of rows affected by the execution of a stored procedure.
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0102.result b/mysql-test/suite/funcs_1/r/memory_trig_0102.result
new file mode 100644
index 00000000..975c0145
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_trig_0102.result
@@ -0,0 +1,367 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase: 3.5.1.1:
+------------------
+use test;
+Create trigger trg1_1 BEFORE INSERT
+on tb3 for each row set @test_before = 2, new.f142 = @test_before;
+Create trigger trg1_2 AFTER INSERT
+on tb3 for each row set @test_after = 6;
+Create trigger trg1_4 BEFORE UPDATE
+on tb3 for each row set @test_before = 27,
+new.f142 = @test_before,
+new.f122 = 'Before Update Trigger';
+Create trigger trg1_3 AFTER UPDATE
+on tb3 for each row set @test_after = '15';
+Create trigger trg1_5 BEFORE DELETE on tb3 for each row
+select count(*) into @test_before from tb3 as tr_tb3
+where f121 = 'Test 3.5.1.1';
+Create trigger trg1_6 AFTER DELETE on tb3 for each row
+select count(*) into @test_after from tb3 as tr_tb3
+where f121 = 'Test 3.5.1.1';
+set @test_before = 1;
+set @test_after = 5;
+select @test_before, @test_after;
+@test_before @test_after
+1 5
+Insert into tb3 (f121, f122, f142, f144, f134)
+values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 First Row 2 0000000005 1
+select @test_before, @test_after;
+@test_before @test_after
+2 6
+set @test_before = 18;
+set @test_after = 8;
+select @test_before, @test_after;
+@test_before @test_after
+18 8
+Update tb3 set tb3.f122 = 'Update',
+tb3.f142 = @test_before,
+tb3.f144 = @test_after
+where tb3.f121 = 'Test 3.5.1.1';
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 Before Update Trigger 27 0000000008 1
+select @test_before, @test_after;
+@test_before @test_after
+27 15
+Insert into tb3 (f121, f122, f142, f144, f134)
+values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
+set @test_before = 0;
+set @test_after = 0;
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 Before Update Trigger 27 0000000008 1
+Test 3.5.1.1 Second Row 2 0000000006 2
+select @test_before, @test_after;
+@test_before @test_after
+0 0
+Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2;
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 Before Update Trigger 27 0000000008 1
+select @test_before, @test_after;
+@test_before @test_after
+2 1
+drop trigger trg1_1;
+drop trigger trg1_2;
+drop trigger trg1_3;
+drop trigger trg1_4;
+drop trigger trg1_5;
+drop trigger trg1_6;
+delete from tb3 where f121='Test 3.5.1.1';
+
+Testcase: 3.5.1.2:
+------------------
+Create trigger trg_1 after insert
+on tb3 for each statement set @x= 1;
+ERROR 42000: 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 'statement set @x= 1' at line 2
+drop trigger trg_1;
+
+Testcase 3.5.1.3:
+-----------------
+CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't';
+ERROR 42000: 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 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
+CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's';
+ERROR 42000: 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 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1
+CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row;
+ERROR 42000: 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 'set @ret1 = 'test' for each row' at line 1
+CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row;
+ERROR 42000: 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 'DELETE AFTER on tb3 set @ret1 = 'test' for each row' at line 1
+CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test';
+ERROR 42000: 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 'for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'' at line 1
+drop trigger trg3_1;
+drop trigger trg3_2;
+drop trigger trg3_3;
+drop trigger trg3_4;
+drop trigger trg3_5;
+
+Testcase: 3.5.1.5:
+------------------
+CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e';
+ERROR 42000: 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 'on tb3 for each row set new.f120 = 'e'' at line 1
+CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f';
+ERROR 42000: 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 'INSERT on tb3 for each set row new.f120 = 'f'' at line 1
+CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g';
+ERROR 42000: 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 'tb3 for each row set new.f120 = 'g'' at line 1
+CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g';
+ERROR 42000: 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 'set new.f120 = 'g'' at line 1
+CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g';
+ERROR 42000: 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 'trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'' at line 1
+CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g';
+ERROR 42000: 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 'for each row set new.f120 = 'g'' at line 1
+drop trigger trg4_1;
+drop trigger trg4_2;
+drop trigger trg4_3;
+drop trigger trg4_4;
+drop trigger trg4_5;
+drop trigger trg4_6;
+
+Testcase 3.5.1.6: - Need to fix
+-------------------------------
+
+Testcase 3.5.1.7: - need to fix
+-------------------------------
+drop table if exists t1;
+Warnings:
+Note 1051 Unknown table 'test.t1'
+create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
+CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
+for each row set new.f3 = '14';
+CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
+BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
+ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long
+CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
+BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
+insert into t1 (f2) values ('insert 3.5.1.7');
+select * from t1;
+f1 f2 f3
+NULL insert 3.5.1.7 14
+update t1 set f2='update 3.5.1.7';
+select * from t1;
+f1 f2 f3
+NULL update 3.5.1.7 42
+select trigger_name from information_schema.triggers where trigger_schema <> 'sys' order by trigger_name;
+trigger_name
+gs_insert
+trg5_1
+trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
+ts_insert
+drop trigger trg5_1;
+drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ;
+ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long
+drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX;
+drop table t1;
+
+Testcase 3.5.1.8:
+-----------------
+CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '* before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 'trigger before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '100 before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
+for each row set new.f120 ='X';
+ERROR HY000: Trigger in wrong schema
+drop database if exists trig_db;
+create database trig_db;
+use trig_db;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+use test;
+CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
+for each row set @ret_trg6_2 = 5;
+ERROR 42S02: Table 'trig_db.tb3' doesn't exist
+use trig_db;
+CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
+for each row set @ret_trg6_3 = 18;
+ERROR HY000: Trigger in wrong schema
+use test;
+drop database trig_db;
+drop trigger trg6_1;
+drop trigger trg6_3;
+
+Testcase 3.5.1.9:(cannot be inplemented at this point)
+------------------------------------------------------
+
+Testcase 3.5.1.10:
+------------------
+CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X';
+CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y';
+ERROR HY000: Trigger 'test.trg7_1' already exists
+drop trigger trg7_1;
+
+Testcase 3.5.1.?:
+-----------------
+drop table if exists t1;
+drop table if exists t2;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t1
+for each row set new.f1 ='trig t1';
+create trigger trig before update on t2
+for each row set new.f1 ='trig t2';
+ERROR HY000: Trigger 'test.trig' already exists
+insert into t1 value ('insert to t1',1);
+select * from t1;
+f1 f2
+trig t1 1
+update t1 set f1='update to t1';
+select * from t1;
+f1 f2
+update to t1 1
+insert into t2 value ('insert to t2',2);
+update t2 set f1='update to t1';
+select * from t2;
+f1 f2
+update to t1 2
+drop table t1;
+drop table t2;
+drop trigger trig;
+
+Testcase 3.5.1.11:
+------------------
+drop database if exists trig_db1;
+drop database if exists trig_db2;
+drop database if exists trig_db3;
+create database trig_db1;
+create database trig_db2;
+create database trig_db3;
+use trig_db1;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t1
+for each row set new.f1 ='trig1', @test_var1='trig1';
+use trig_db2;
+create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t2
+for each row set new.f1 ='trig2', @test_var2='trig2';
+use trig_db3;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t1
+for each row set new.f1 ='trig3', @test_var3='trig3';
+set @test_var1= '', @test_var2= '', @test_var3= '';
+use trig_db1;
+insert into t1 (f1,f2) values ('insert to db1 t1',1);
+insert into trig_db1.t1 (f1,f2) values ('insert to db1 t1 from db1',2);
+insert into trig_db2.t2 (f1,f2) values ('insert to db2 t2 from db1',3);
+insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4);
+select @test_var1, @test_var2, @test_var3;
+@test_var1 @test_var2 @test_var3
+trig1 trig2 trig3
+select * from t1 order by f2;
+f1 f2
+trig1 1
+trig1 2
+select * from trig_db2.t2;
+f1 f2
+trig2 3
+select * from trig_db3.t1;
+f1 f2
+trig3 4
+select * from t1 order by f2;
+f1 f2
+trig1 1
+trig1 2
+use test;
+drop database trig_db1;
+drop database trig_db2;
+drop database trig_db3;
+
+Testcase 3.5.2.1/2/3:
+---------------------
+drop database if exists trig_db1;
+drop database if exists trig_db2;
+create database trig_db1;
+create database trig_db2;
+use trig_db1;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create table trig_db2.t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig1_b before insert on t1
+for each row set @test_var1='trig1_b';
+create trigger trig_db1.trig1_a after insert on t1
+for each row set @test_var2='trig1_a';
+create trigger trig_db2.trig2 before insert on trig_db2.t1
+for each row set @test_var3='trig2';
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where trigger_schema like 'trig_db%'
+ order by trigger_name;
+trigger_schema trigger_name event_object_table
+trig_db1 trig1_a t1
+trig_db1 trig1_b t1
+trig_db2 trig2 t1
+set @test_var1= '', @test_var2= '', @test_var3= '';
+insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
+insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
+select @test_var1, @test_var2, @test_var3;
+@test_var1 @test_var2 @test_var3
+trig1_b trig1_a trig2
+drop database trig_db1;
+drop database trig_db2;
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result
new file mode 100644
index 00000000..c1c1c6f8
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result
@@ -0,0 +1,768 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase 3.5.3:
+---------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= <engine_to_be_used>;
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+
+Testcase 3.5.3.2/6:
+-------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant ALL on *.* to test_noprivs@localhost;
+revoke TRIGGER on *.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+
+Testcase 3.5.3.2:
+-----------------
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.2_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.2-no');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.2_2-yes';
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.2-yes');
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
+insert into t1 (f1) values ('insert 3.5.3.2-yes');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+trig 3.5.3.2_2-yes
+
+Testcase 3.5.3.6:
+-----------------
+connection no_privs;
+use priv_db;
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.6-yes');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+connection yes_privs;
+use priv_db;
+drop trigger trg1_2;
+connection default;
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.6-no');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+connection default;
+drop trigger trg1_2;
+disconnect no_privs;
+disconnect yes_privs;
+
+Testcase 3.5.3.7a:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant ALL on *.* to test_noprivs@localhost;
+revoke UPDATE on *.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connect no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs_424a;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+show grants;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+create trigger trg4a_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1a';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1a');
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+drop trigger trg4a_1;
+connection yes_privs_424a;
+use priv_db;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants;
+Grants for test_yesprivs@localhost
+GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create trigger trg4a_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2a';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2b');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+drop trigger trg4a_2;
+disconnect no_privs_424a;
+disconnect yes_privs_424a;
+
+Testcase 3.5.3.7b:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs;
+grant ALL on priv_db.* to test_noprivs@localhost;
+revoke UPDATE on priv_db.* from test_noprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant UPDATE on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost`
+connect no_privs_424b,localhost,test_noprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_424b;
+show grants;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg4b_1 before UPDATE on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1b';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1b');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+drop trigger trg4b_1;
+connection yes_privs_424b;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg4b_2 before UPDATE on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2b';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2b');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+insert 3.5.3.7-2b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+drop trigger trg4b_2;
+disconnect no_privs_424b;
+disconnect yes_privs_424b;
+
+Testcase 3.5.3.7c
+-----------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant ALL on priv_db.t1 to test_noprivs@localhost;
+revoke UPDATE on priv_db.t1 from test_noprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_424c;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg4c_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1c';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1c');
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+drop trigger trg4c_1;
+connection yes_privs_424c;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg4c_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2c';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2c');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+trig 3.5.3.7-2c
+drop trigger trg4c_2;
+disconnect no_privs_424c;
+disconnect yes_privs_424c;
+
+Testcase 3.5.3.7d:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+connect no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_424d;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg4d_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1d';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1d');
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+trig 3.5.3.7-2c
+drop trigger trg4d_1;
+connection yes_privs_424d;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg4d_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2d';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2d');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+trig 3.5.3.7-2c
+trig 3.5.3.7-2d
+drop trigger trg4d_2;
+disconnect no_privs_424d;
+disconnect yes_privs_424d;
+
+Testcase 3.5.3.8a:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant ALL on *.* to test_noprivs@localhost;
+revoke SELECT on *.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connect no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425a;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+show grants;
+Grants for test_noprivs@localhost
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create trigger trg5a_1 before INSERT on t1 for each row
+set @test_var = new.f1;
+connection default;
+set @test_var = 'before trig 3.5.3.8-1a';
+select @test_var;
+@test_var
+before trig 3.5.3.8-1a
+insert into t1 (f1) values ('insert 3.5.3.8-1a');
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1a
+drop trigger trg5a_1;
+connection yes_privs_425a;
+use priv_db;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants;
+Grants for test_yesprivs@localhost
+GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create trigger trg5a_2 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-2a';
+select @test_var;
+@test_var
+before trig 3.5.3.8-2a
+insert into t1 (f1) values ('insert 3.5.3.8-2a');
+select @test_var;
+@test_var
+insert 3.5.3.8-2a
+drop trigger trg5a_2;
+disconnect no_privs_425a;
+disconnect yes_privs_425a;
+
+Testcase: 3.5.3.8b
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant ALL on priv_db.* to test_noprivs@localhost;
+revoke SELECT on priv_db.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost`
+connect no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425b;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg5b_1 before UPDATE on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-1b';
+insert into t1 (f1) values ('insert 3.5.3.8-1b');
+select @test_var;
+@test_var
+before trig 3.5.3.8-1b
+update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1b
+drop trigger trg5b_1;
+connection yes_privs_425b;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg5b_2 before UPDATE on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-2b';
+insert into t1 (f1) values ('insert 3.5.3.8-2b');
+select @test_var;
+@test_var
+before trig 3.5.3.8-2b
+update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
+select @test_var;
+@test_var
+update 3.5.3.8-2b
+drop trigger trg5b_2;
+disconnect no_privs_425b;
+disconnect yes_privs_425b;
+
+Testcase 3.5.3.8c:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant ALL on priv_db.t1 to test_noprivs@localhost;
+revoke SELECT on priv_db.t1 from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425c;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg5c_1 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-1c';
+insert into t1 (f1) values ('insert 3.5.3.8-1c');
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1c
+drop trigger trg5c_1;
+connection yes_privs_425c;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg5c_2 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var='before trig 3.5.3.8-2c';
+insert into t1 (f1) values ('insert 3.5.3.8-2c');
+select @test_var;
+@test_var
+insert 3.5.3.8-2c
+drop trigger trg5c_2;
+disconnect no_privs_425c;
+disconnect yes_privs_425c;
+
+Testcase: 3.5.3.8d:
+-------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425d;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg5d_1 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var='before trig 3.5.3.8-1d';
+insert into t1 (f1) values ('insert 3.5.3.8-1d');
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1d
+drop trigger trg5d_1;
+connection yes_privs_425d;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg5d_2 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var='before trig 3.5.3.8-2d';
+insert into t1 (f1) values ('insert 3.5.3.8-2d');
+select @test_var;
+@test_var
+insert 3.5.3.8-2d
+drop trigger trg5d_2;
+
+Testcase: 3.5.3.x:
+------------------
+use priv_db;
+drop table if exists t1;
+drop table if exists t2;
+create table t1 (f1 int) engine= <engine_to_be_used>;
+create table t2 (f2 int) engine= <engine_to_be_used>;
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
+grant SELECT on priv_db.t2 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_353x;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1 before insert on t1 for each row
+insert into t2 values (new.f1);
+connection default;
+use priv_db;
+insert into t1 (f1) values (4);
+ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
+grant INSERT on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (4);
+select f1 from t1 order by f1;
+f1
+4
+select f2 from t2 order by f2;
+f2
+4
+connection yes_353x;
+use priv_db;
+drop trigger trg1;
+create trigger trg2 before insert on t1 for each row
+update t2 set f2=new.f1-1;
+connection default;
+use priv_db;
+insert into t1 (f1) values (2);
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
+grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (2);
+select f1 from t1 order by f1;
+f1
+2
+4
+select f2 from t2 order by f2;
+f2
+1
+connection yes_353x;
+use priv_db;
+drop trigger trg2;
+create trigger trg3 before insert on t1 for each row
+select f2 into @aaa from t2 where f2=new.f1;
+connection default;
+use priv_db;
+insert into t1 (f1) values (1);
+ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
+grant SELECT on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (1);
+select f1 from t1 order by f1;
+f1
+1
+2
+4
+select f2 from t2 order by f2;
+f2
+1
+select @aaa;
+@aaa
+1
+connection yes_353x;
+use priv_db;
+drop trigger trg3;
+create trigger trg4 before insert on t1 for each row
+delete from t2;
+connection default;
+use priv_db;
+insert into t1 (f1) values (1);
+ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
+grant DELETE on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (1);
+select f1 from t1 order by f1;
+f1
+1
+1
+2
+4
+select f2 from t2 order by f2;
+f2
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+drop user test_noprivs;
+use test;
+drop table tb3;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
new file mode 100644
index 00000000..9397e076
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
@@ -0,0 +1,1710 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+
+Testcase for db level:
+----------------------
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+create database priv_db;
+create database no_priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= memory;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant select on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost`
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant select,insert on priv_db.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT ON `priv_db`.* TO `test_noprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+
+no trigger privilege on db level for create:
+--------------------------------------------
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connect no_privs,localhost,test_noprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+
+trigger privilege on db level for create:
+-----------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant UPDATE on priv_db.* to test_yesprivs@localhost;
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost`
+
+no trigger privilege on db level for drop:
+------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+
+no trigger privilege at activation time:
+----------------------------------------
+insert into t1 (f1) values ('insert-yes');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+
+trigger privilege at activation time:
+-------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+trigger privilege on db level for drop:
+---------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+
+takes effect after use priv_db:
+-------------------------------
+use priv_db;
+drop trigger trg1_2;
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+switch to db without having trigger priv for it:
+------------------------------------------------
+use no_priv_db;
+create table t1 (f1 char(20)) engine= memory;
+grant SELECT,UPDATE on no_priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `no_priv_db`.* TO `test_yesprivs`@`localhost`
+
+use db with trigger privilege on db level and without...:
+---------------------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+create trigger trg1_3 before INSERT on t1 for each row
+set new.f1 = 'trig 1_3-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+use priv_db;
+create trigger trg1_3 before INSERT on t1 for each row
+set new.f1 = 'trig 1_3-yes';
+use no_priv_db;
+create trigger trg1_4 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_4-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+use priv_db;
+create trigger trg1_4 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_4-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use no_priv_db;
+ERROR 42000: Access denied for user 'test_noprivs'@'localhost' to database 'no_priv_db'
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_3-yes
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_3-yes
+trig 1_3-yes
+disconnect no_privs;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+drop trigger trg1_3;
+ERROR HY000: Trigger does not exist
+use priv_db;
+drop trigger trg1_3;
+use no_priv_db;
+drop trigger trg1_4;
+ERROR HY000: Trigger does not exist
+use priv_db;
+drop trigger trg1_4;
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop table priv_db.t1;
+drop table no_priv_db.t1;
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+######### Testcase for table level: ########
+---------------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= memory;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connect no_privs,localhost,test_noprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs;
+
+no trigger privilege on table level for create:
+-----------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+grant select, update, insert on priv_db.t1 to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+show tables;
+Tables_in_priv_db
+t1
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert1-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+show tables;
+Tables_in_priv_db
+t1
+insert into t1 (f1) values ('insert2-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+
+trigger privilege on table level for create:
+--------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert3-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+insert into t1 (f1) values ('insert4-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+trig 1_2-yes
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+
+no trigger privilege on table level for drop:
+---------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+
+no trigger privilege at activation time:
+----------------------------------------
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert5-no');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+
+trigger privilege at activation time:
+-------------------------------------
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert6-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+trigger privilege on table level for drop:
+------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+drop trigger trg1_2;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert7-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+insert7-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+insert into t1 (f1) values ('insert8-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+insert7-yes
+insert8-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+switch to table without having trigger priv for it:
+---------------------------------------------------
+create table t2 (f1 char(20)) engine= memory;
+grant SELECT, INSERT, UPDATE on priv_db.t2 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+grant SELECT, INSERT, UPDATE on priv_db.t2 to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_noprivs`@`localhost`
+
+use table with trigger privilege and without...:
+------------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+create trigger trg1_3 before INSERT on t1 for each row
+set new.f1 = 'trig 1_3-yes';
+create trigger trg2_2 before UPDATE on t2 for each row
+set new.f1 = 'trig 2_2-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+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 # STRICT_TRANS_TABLES,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,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
+test_noprivs@localhost
+insert into t2 (f1) values ('insert9-yes');
+select f1 from t2 order by f1;
+f1
+insert9-yes
+insert into t1 (f1) values ('insert10-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+insert7-yes
+insert8-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_3-yes
+disconnect no_privs;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg2_1;
+ERROR HY000: Trigger does not exist
+drop trigger trg1_3;
+drop trigger trg2_2;
+ERROR HY000: Trigger does not exist
+drop trigger trg1_4;
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+#### Testcase for mix of user(global) and db level: ####
+--------------------------------------------------------
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+create database priv_db;
+create database no_priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= memory;
+use no_priv_db;
+create table t1 (f1 char(20)) engine= memory;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant ALL on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant SELECT,INSERT on *.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+
+trigger privilege on user level for create:
+-------------------------------------------
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+use no_priv_db;
+create trigger priv_db.trg1_5 before UPDATE on priv_db.t1
+for each row
+set new.f1 = 'trig 1_5-yes';
+insert into priv_db.t1 (f1) values ('insert-no');
+select f1 from priv_db.t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+drop trigger priv_db.trg1_5;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+revoke TRIGGER on *.* from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+disconnect yes_privs;
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+select * from information_schema.triggers;
+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
+drop trigger trg1_1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+show grants;
+Grants for root@localhost
+GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
+GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+drop trigger trg1_1;
+use priv_db;
+
+no trigger privilege on db level for create:
+--------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+
+trigger privilege on db level for create:
+-----------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
+for each row
+set new.f1 = 'trig 1_9-yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+use no_priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
+for each row
+set new.f1 = 'trig 1_9-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+use no_priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+drop trigger priv_db.trg1_9;
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+drop trigger priv_db.trg1_9;
+revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+grant TRIGGER on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+use no_priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+disconnect yes_privs;
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+disconnect yes_privs;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+use no_priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+disconnect no_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+drop database if exists h1;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+####### Testcase for mix of db and table level: #######
+-------------------------------------------------------
+drop database if exists priv1_db;
+drop database if exists priv2_db;
+create database priv1_db;
+create database priv2_db;
+use priv1_db;
+create table t1 (f1 char(20)) engine= memory;
+create table t2 (f1 char(20)) engine= memory;
+use priv2_db;
+create table t1 (f1 char(20)) engine= memory;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant ALL on priv1_db.* to test_yesprivs@localhost;
+grant SELECT,UPDATE on priv2_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant SELECT,INSERT,UPDATE on priv1_db.* to test_noprivs@localhost;
+grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO `test_noprivs`@`localhost`
+GRANT SELECT, INSERT ON `priv2_db`.* TO `test_noprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,priv1_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect no_privs,localhost,test_noprivs,PWD,priv1_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+
+trigger privilege on one db1 db level, not on db2
+-------------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv1_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+use priv2_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig1_1-yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv2_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert1_no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+insert into t2 (f1) values ('insert1_no');
+select f1 from t2 order by f1;
+f1
+trig 2_1-yes
+insert into priv2_db.t1 (f1) values ('insert21-yes');
+select f1 from priv2_db.t1 order by f1;
+f1
+insert21-yes
+use priv2_db;
+insert into t1 (f1) values ('insert1_yes');
+select f1 from t1 order by f1;
+f1
+insert1_yes
+insert21-yes
+insert into priv1_db.t1 (f1) values ('insert11-no');
+select f1 from priv1_db.t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+insert into priv1_db.t2 (f1) values ('insert22-no');
+select f1 from priv1_db.t2 order by f1;
+f1
+trig 2_1-yes
+trig 2_1-yes
+
+revoke trigger privilege on table level (not existing)
+------------------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv1_db;
+revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost;
+ERROR 42000: There is no such grant defined for user 'test_yesprivs' on host 'localhost' on table 't1'
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_1;
+ERROR HY000: Trigger does not exist
+drop trigger trg2_1;
+ERROR HY000: Trigger does not exist
+use priv1_db;
+drop trigger trg1_1;
+drop trigger trg2_1;
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv1_db;
+revoke TRIGGER on priv1_db.* from test_yesprivs@localhost;
+
+no trigger privilege on table level for create:
+-----------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv1_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE HISTORY ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost`
+
+trigger privilege on table level for create:
+--------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv1_db;
+insert into t1 (f1) values ('insert2-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+insert into t2 (f1) values ('insert2-yes');
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+trig 2_1-yes
+insert into priv2_db.t1 (f1) values ('insert22-yes');
+select f1 from priv2_db.t1 order by f1;
+f1
+insert1_yes
+insert21-yes
+insert22-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv1_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
+use priv1_db;
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv1_db;
+insert into t1 (f1) values ('insert3-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+insert into t2 (f1) values ('insert3-no');
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+trig 2_1-yes
+trig 2_1-yes
+use priv2_db;
+insert into priv1_db.t1 (f1) values ('insert12-no');
+select f1 from priv1_db.t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+insert into priv1_db.t2 (f1) values ('insert23-no');
+select f1 from priv1_db.t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+trig 2_1-yes
+trig 2_1-yes
+trig 2_1-yes
+disconnect no_privs;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_2;
+drop trigger trg2_1;
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv1_db;
+drop database if exists priv2_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+#### Testcase for trigger privilege on execution time ########
+--------------------------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= memory;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+create User test_useprivs@localhost;
+set password for test_useprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+grant select, insert, update ,trigger
+on priv_db.t1 to test_yesprivs@localhost
+with grant option;
+grant select
+on priv_db.t1 to test_useprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+grant insert on t1 to test_useprivs@localhost;
+prepare ins1 from 'insert into t1 (f1) values (''insert1-no'')';
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
+connect use_privs,localhost,test_useprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+prepare ins1 from 'insert into t1 (f1) values (''insert3-no'')';
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert4-no'')';
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert6-no'')';
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert7-no'')';
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+deallocate prepare ins1;
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+deallocate prepare ins1;
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_1;
+connection default;
+select current_user;
+current_user
+root@localhost
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_useprivs@localhost;
+
+######### Testcase for definer: ########
+-----------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= memory;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+create definer=not_ex_user@localhost trigger trg1_0
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_0-yes';
+Warnings:
+Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
+drop trigger trg1_0;
+create definer=test_yesprivs@localhost trigger trg1_0
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_0-yes';
+grant select, insert, update
+on priv_db.t1 to test_yesprivs@localhost;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+drop trigger trg1_0;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+grant select, insert, update ,trigger
+on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_0-yes
+drop trigger trg1_0;
+create definer=not_ex_user@localhost trigger trg1_0
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_0-yes';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
+create definer=current_user trigger trg1_1
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_0-yes
+trig 1_1-yes
+create definer=test_yesprivs@localhost trigger trg1_2
+before UPDATE on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+update t1 set f1 = 'update-yes' where f1 like '%trig%';
+select f1 from t1 order by f1;
+f1
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant trigger on priv_db.* to test_yesprivs@localhost
+with grant option;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+create definer=not_ex_user@localhost trigger trg1_3
+after UPDATE on t1 for each row
+set @var1 = 'trig 1_3-yes';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
+connection default;
+select current_user;
+current_user
+root@localhost
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+
+####### Testcase for column privileges of triggers: #######
+-----------------------------------------------------------
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= memory;
+create table t2 (f1 char(20)) engine= memory;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE ON `priv_db`.* TO `test_noprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connect no_privs,localhost,test_noprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs;
+
+update only on column:
+----------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t1
+to test_yesprivs@localhost;
+grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t2
+to test_yesprivs@localhost;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert1-yes');
+insert into t2 (f1) values ('insert1-yes');
+create trigger trg1_1 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+create trigger trg2_1 before UPDATE on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+select f1 from t1 order by f1;
+f1
+insert1-yes
+update t1 set f1 = 'update1_no'
+ where f1 like '%insert%';
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+select f1 from t2 order by f1;
+f1
+insert1-yes
+update t2 set f1 = 'update1_no'
+ where f1 like '%insert%';
+select f1 from t2 order by f1;
+f1
+trig 2_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke UPDATE on priv_db.*
+from test_yesprivs@localhost;
+revoke UPDATE(f1) on priv_db.t2
+from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert2-yes');
+insert into t2 (f1) values ('insert2-yes');
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f1 = 'update2_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update2_no'
+ where f1 like '%insert%';
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2'
+update t1 set f1 = 'update3_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update3_no'
+ where f1 like '%insert%';
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2'
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+
+check if access only on one of three columns
+--------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+alter table priv_db.t1 add f2 char(20), add f3 int;
+revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+grant TRIGGER,SELECT on priv_db.t1 to test_yesprivs@localhost;
+grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 values ('insert2-yes','insert2-yes',1);
+insert into t1 values ('insert3-yes','insert3-yes',2);
+select * from t1 order by f1;
+f1 f2 f3
+insert2-yes insert2-yes 1
+insert3-yes insert3-yes 2
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f1 = 'update4-no',
+f2 = 'update4-yes',
+f3 = f3*10
+where f2 like '%yes';
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update4-yes 10
+trig 1_1-yes update4-yes 20
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg1_2 after UPDATE on t1 for each row
+set @f2 = 'trig 1_2-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+update t1 set f1 = 'update5-yes',
+f2 = 'update5-yes'
+ where f2 like '%yes';
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update5-yes 10
+trig 1_1-yes update5-yes 20
+select @f2;
+@f2
+trig 1_2-yes
+update t1 set f1 = 'update6_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update6_no'
+ where f1 like '%insert%';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+update t1 set f1 = 'update7_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update7_no'
+ where f1 like '%insert%';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+
+check if rejected without trigger privilege:
+--------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+update t1 set f1 = 'update8-no',
+f2 = 'update8-no'
+ where f2 like '%yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update5-yes 10
+trig 1_1-yes update5-yes 20
+select @f2;
+@f2
+trig 1_2-yes
+
+check trigger, but not update privilege on column:
+--------------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost;
+grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1
+to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+drop trigger trg1_1;
+create trigger trg1_3 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_3-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f1 = 'update9-no',
+f2 = 'update9-no'
+ where f2 like '%yes';
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update5-yes 10
+trig 1_1-yes update5-yes 20
+update t1 set f3= f3+1;
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select f3 from t1 order by f3;
+f3
+NULL
+NULL
+10
+20
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+grant UPDATE(f1),UPDATE(f2),UPDATE(f3) on priv_db.t1
+to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f3= f3+1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f3 from t1 order by f3;
+f3
+NULL
+NULL
+10
+20
+
+##### trigger privilege on column level? #######
+------------------------------------------------
+grant TRIGGER(f1) on priv_db.t1 to test_yesprivs@localhost;
+ERROR 42000: 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 '(f1) on priv_db.t1 to test_yesprivs@localhost' at line 1
+disconnect yes_privs;
+disconnect no_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0407.result b/mysql-test/suite/funcs_1/r/memory_trig_0407.result
new file mode 100644
index 00000000..c9a15b46
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_trig_0407.result
@@ -0,0 +1,496 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+set GLOBAL sql_mode="";
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase: 3.5:
+--------------
+create User test_general@localhost;
+set password for test_general@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
+create User test_super@localhost;
+set password for test_super@localhost = password('PWD');
+grant ALL on *.* to test_super@localhost with grant OPTION;
+connect con1_general,localhost,test_general,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection con1_general;
+connect con1_super,localhost,test_super,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection con1_super;
+connection default;
+
+Testcase 3.5.4:
+---------------
+connection default;
+use test;
+
+Testcase 3.5.4.1:
+-----------------
+connection con1_super;
+create database db_drop;
+Use db_drop;
+create table t1 (f1 char(30)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on db_drop.t1 to test_general;
+Use db_drop;
+Create trigger trg1 BEFORE INSERT on t1
+for each row set new.f1='Trigger 3.5.4.1';
+connection con1_general;
+Use db_drop;
+Insert into t1 values ('Insert error 3.5.4.1');
+Select * from t1 order by f1;
+f1
+Trigger 3.5.4.1
+connection con1_super;
+drop trigger trg1;
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where trigger_schema = 'db_drop'
+ order by trigger_name;
+trigger_schema trigger_name event_object_table
+connection con1_general;
+Insert into t1 values ('Insert no trigger 3.5.4.1');
+Select * from t1 order by f1;
+f1
+Insert no trigger 3.5.4.1
+Trigger 3.5.4.1
+connection con1_super;
+drop trigger trg1;
+drop database if exists db_drop;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.4.2:
+-----------------
+connection con1_super;
+create database db_drop2;
+Use db_drop2;
+drop table if exists t1_432 ;
+create table t1_432 (f1 char (30)) engine = <engine_to_be_used>;
+Drop trigger tr_does_not_exit;
+ERROR HY000: Trigger does not exist
+drop table if exists t1_432 ;
+drop database if exists db_drop2;
+
+Testcase 3.5.4.3:
+-----------------
+connection con1_super;
+create database db_drop3;
+Use db_drop3;
+drop table if exists t1_433 ;
+drop table if exists t1_433a ;
+create table t1_433 (f1 char (30)) engine = <engine_to_be_used>;
+create table t1_433a (f1a char (5)) engine = <engine_to_be_used>;
+CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
+set new.f1 = 'Trigger 3.5.4.3';
+Drop trigger t1.433.trg3;
+ERROR 42000: 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 '.trg3' at line 1
+Drop trigger db_drop3.t1.433.trg3;
+ERROR 42000: 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 '.433.trg3' at line 1
+Drop trigger mysql.trg3;
+ERROR HY000: Trigger does not exist
+Drop trigger tbx.trg3;
+ERROR HY000: Trigger does not exist
+Drop trigger db_drop3.trg3;
+drop table if exists t1_433;
+drop table if exists t1_433a;
+drop database if exists db_drop3;
+
+Testcase 3.5.4.4:
+-----------------
+connection con1_super;
+create database db_drop4;
+Use db_drop4;
+create table t1 (f1 char(30)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on db_drop4.t1 to test_general;
+Create trigger trg4 BEFORE INSERT on t1
+for each row set new.f1='Trigger 3.5.4.4';
+connection con1_general;
+Use db_drop4;
+Insert into t1 values ('Insert 3.5.4.4');
+Select * from t1;
+f1
+Trigger 3.5.4.4
+connection con1_super;
+Drop database db_drop4;
+Show databases like 'db_drop4';
+Database (db_drop4)
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where information_schema.triggers.trigger_name='trg4';
+trigger_schema trigger_name event_object_table
+create database db_drop4;
+Use db_drop4;
+create table t1 (f1 char(30)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on db_drop4.t1 to test_general;
+connection con1_general;
+Insert into t1 values ('2nd Insert 3.5.4.4');
+Select * from t1;
+f1
+2nd Insert 3.5.4.4
+connection con1_super;
+drop trigger trg4;
+ERROR HY000: Trigger does not exist
+drop database if exists db_drop4;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.4.5:
+-----------------
+connection con1_super;
+create database db_drop5;
+Use db_drop5;
+create table t1 (f1 char(50)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on t1 to test_general;
+Create trigger trg5 BEFORE INSERT on t1
+for each row set new.f1='Trigger 3.5.4.5';
+connection con1_general;
+Use db_drop5;
+Insert into t1 values ('Insert 3.5.4.5');
+Select * from t1;
+f1
+Trigger 3.5.4.5
+connection con1_super;
+Drop table t1;
+Show tables;
+Tables_in_db_drop5
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where information_schema.triggers.trigger_name='trg5';
+trigger_schema trigger_name event_object_table
+create table t1 (f1 char(50)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on t1 to test_general;
+connection con1_general;
+Insert into t1 values ('2nd Insert 3.5.4.5');
+Select * from t1;
+f1
+2nd Insert 3.5.4.5
+connection con1_super;
+drop trigger trg5;
+ERROR HY000: Trigger does not exist
+drop database if exists db_drop5;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.5:
+---------------
+connection default;
+use test;
+
+Testcase 3.5.5.1:
+-----------------
+Create trigger trg1 before INSERT on t100 for each row set new.f2=1000;
+ERROR 42S02: Table 'test.t100' doesn't exist
+
+Testcase 3.5.5.2:
+-----------------
+Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
+Create trigger trg2 before INSERT
+on t1_temp for each row set new.f2=9999;
+ERROR HY000: Trigger's 't1_temp' is a view, temporary table or sequence
+drop table t1_temp;
+
+Testcase 3.5.5.3:
+-----------------
+Create view vw3 as select f118 from tb3;
+Create trigger trg3 before INSERT
+on vw3 for each row set new.f118='s';
+ERROR HY000: 'test.vw3' is not of type 'BASE TABLE'
+drop view vw3;
+
+Testcase 3.5.5.4:
+-----------------
+connection con1_super;
+create database dbtest_one;
+create database dbtest_two;
+use dbtest_two;
+create table t2 (f1 char(15)) engine = <engine_to_be_used>;
+use dbtest_one;
+create trigger trg4 before INSERT
+on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
+ERROR HY000: Trigger in wrong schema
+grant INSERT, SELECT on dbtest_two.t2 to test_general;
+grant SELECT on dbtest_one.* to test_general;
+connection con1_general;
+use dbtest_two;
+Insert into t2 values ('1st Insert 3.5.5.4');
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
+Select * from t2;
+f1
+1st Insert 3.5.
+use dbtest_one;
+Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4');
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
+Select * from dbtest_two.t2 order by f1;
+f1
+1st Insert 3.5.
+2nd Insert 3.5.
+connection con1_super;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+DROP DATABASE if exists dbtest_one;
+drop database if EXISTS dbtest_two;
+
+Testcase 3.5.6:
+---------------
+connection default;
+use test;
+
+Testcase 3.5.6.1 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.6.2 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.6.3:
+-----------------
+Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25;
+ERROR 42000: 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 'DURING UPDATE on tb3 for each row set new.f132=25' at line 1
+Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15;
+ERROR 42000: 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 'TIME INSERT on tb3 for each row set new.f132=15' at line 1
+drop trigger tb3.trg3_1;
+drop trigger tb3.trg3_2;
+
+Testcase 3.5.6.4 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.6.5 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.1 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.2 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.3 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.4:
+-----------------
+Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5;
+ERROR 42000: 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 'SELECT on tb3 for each row set new.f132=5' at line 1
+Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1;
+ERROR 42000: 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 'VALUE on tb3 for each row set new.f132=1' at line 1
+drop trigger tb3.trg4_1;
+drop trigger tb3.trg4_2;
+
+Testcase 3.5.7.5 / 3.5.7.6:
+---------------------------
+Create trigger trg5_1 BEFORE INSERT
+on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
+Create trigger trg5_2 BEFORE INSERT
+on tb3 for each row set new.f122='Trigger2 3.5.7.5';
+Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
+Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
+f121 f122
+Test 3.5.7.5/6 Trigger2 3.5.7.5
+update tb3 set f122='Update 3.5.7.6' where f121= 'Test 3.5.7.5/6';
+Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
+f121 f122
+Test 3.5.7.5/6 Update 3.5.7.6
+drop trigger trg5_1;
+drop trigger trg5_2;
+delete from tb3 where f121='Test 3.5.7.5/6';
+
+Testcase 3.5.7.7 / 3.5.7.8:
+---------------------------
+set @test_var='Before trig 3.5.7.7';
+Create trigger trg6_1 AFTER INSERT
+on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
+Create trigger trg6_2 AFTER INSERT
+on tb3 for each row set @test_var='Trigger2 3.5.7.7';
+select @test_var;
+@test_var
+Before trig 3.5.7.7
+Insert into tb3 (f121,f122) values ('Test 3.5.7.7/8','Insert 3.5.7.7');
+Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
+f121 f122
+Test 3.5.7.7/8 Insert 3.5.7.7
+select @test_var;
+@test_var
+Trigger2 3.5.7.7
+update tb3 set f122='Update 3.5.7.8' where f121= 'Test 3.5.7.7/8';
+Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
+f121 f122
+Test 3.5.7.7/8 Update 3.5.7.8
+select @test_var;
+@test_var
+Trigger2 3.5.7.7
+drop trigger trg6_1;
+drop trigger trg6_2;
+delete from tb3 where f121='Test 3.5.7.7/8';
+
+Testcase 3.5.7.9/10:
+--------------------
+Create trigger trg7_1 BEFORE UPDATE
+on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
+Create trigger trg7_2 BEFORE UPDATE
+on tb3 for each row set new.f122='Trigger2 3.5.7.9';
+Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
+Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
+f121 f122
+Test 3.5.7.9/10 Insert 3.5.7.9
+update tb3 set f122='update 3.5.7.10' where f121='Test 3.5.7.9/10';
+Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
+f121 f122
+Test 3.5.7.9/10 Trigger2 3.5.7.9
+drop trigger trg7_1;
+drop trigger trg7_2;
+delete from tb3 where f121='Test 3.5.7.9/10';
+
+Testcase 3.5.7.11/12:
+---------------------
+set @test_var='Before trig 3.5.7.11';
+Create trigger trg8_1 AFTER UPDATE
+on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
+Create trigger trg8_2 AFTER UPDATE
+on tb3 for each row set @test_var='Trigger2 3.5.7.11';
+select @test_var;
+@test_var
+Before trig 3.5.7.11
+Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12');
+select @test_var;
+@test_var
+Before trig 3.5.7.11
+Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
+f121 f122
+Test 3.5.7.11/12 Insert 3.5.7.11/12
+update tb3 set f122='update 3.5.7.12' where f121='Test 3.5.7.11/12';
+Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
+f121 f122
+Test 3.5.7.11/12 update 3.5.7.12
+select @test_var;
+@test_var
+Trigger2 3.5.7.11
+delete from tb3 where f121='Test 3.5.7.11/12';
+drop trigger trg8_1;
+drop trigger trg8_2;
+delete from tb3 where f121='Test 3.5.7.11/12';
+
+Testcase 3.5.7.13/14:
+---------------------
+set @test_var=1;
+Create trigger trg9_1 BEFORE DELETE
+on tb3 for each row set @test_var=@test_var+1;
+Create trigger trg9_2 BEFORE DELETE
+on tb3 for each row set @test_var=@test_var+10;
+select @test_var;
+@test_var
+1
+Insert into tb3 (f121,f122) values ('Test 3.5.7.13/14','Insert 3.5.7.13');
+Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
+f121 f122
+Test 3.5.7.13/14 Insert 3.5.7.13
+select @test_var;
+@test_var
+1
+delete from tb3 where f121='Test 3.5.7.13/14';
+Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
+f121 f122
+select @test_var;
+@test_var
+12
+delete from tb3 where f121='Test 3.5.7.13/14';
+select @test_var;
+@test_var
+12
+drop trigger trg9_1;
+drop trigger trg9_2;
+delete from tb3 where f121='Test 3.5.7.13/14';
+
+Testcase 3.5.7.15/16:
+---------------------
+set @test_var=1;
+Create trigger trg_3_406010_1 AFTER DELETE
+on tb3 for each row set @test_var=@test_var+5;
+Create trigger trg_3_406010_2 AFTER DELETE
+on tb3 for each row set @test_var=@test_var+50;
+Create trigger trg_3_406010_1 AFTER INSERT
+on tb3 for each row set @test_var=@test_var+1;
+ERROR HY000: Trigger 'test.trg_3_406010_1' already exists
+select @test_var;
+@test_var
+1
+Insert into tb3 (f121,f122) values ('Test 3.5.7.15/16','Insert 3.5.7.15/16');
+Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
+f121 f122
+Test 3.5.7.15/16 Insert 3.5.7.15/16
+select @test_var;
+@test_var
+1
+delete from tb3 where f121='Test 3.5.7.15/16';
+Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
+f121 f122
+select @test_var;
+@test_var
+56
+delete from tb3 where f121='Test 3.5.7.15/16';
+select @test_var;
+@test_var
+56
+drop trigger trg_3_406010_1;
+drop trigger trg_3_406010_2;
+delete from tb3 where f121='Test 3.5.7.15/16';
+
+Testcase 3.5.7.17 (see Testcase 3.5.1.1)
+----------------------------------------
+connection default;
+drop user test_general@localhost;
+drop user test_general;
+drop user test_super@localhost;
+DROP TABLE test.tb3;
+set GLOBAL sql_mode=default;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result
new file mode 100644
index 00000000..c37266bb
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result
@@ -0,0 +1,542 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+set GLOBAL sql_mode="";
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase: 3.5:
+--------------
+create User test_general@localhost;
+set password for test_general@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
+grant SELECT,UPDATE,DELETE,INSERT on test.* to test_general@localhost;
+create User test_super@localhost;
+set password for test_super@localhost = password('PWD');
+grant ALL on *.* to test_super@localhost with grant OPTION;
+connect con2_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect con2_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+
+Testcase 3.5.8.1: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.8.2: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.8.3/4:
+-------------------
+connection con2_super;
+create database db_test;
+grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
+grant LOCK TABLES on db_test.* to test_general;
+Use db_test;
+create table t1_i (
+i120 char ascii not null DEFAULT b'101',
+i136 smallint zerofill not null DEFAULT 999,
+i144 int zerofill not null DEFAULT 99999,
+i163 decimal (63,30)) engine=<engine_to_be_used>;
+create table t1_u (
+u120 char ascii not null DEFAULT b'101',
+u136 smallint zerofill not null DEFAULT 999,
+u144 int zerofill not null DEFAULT 99999,
+u163 decimal (63,30)) engine=<engine_to_be_used>;
+create table t1_d (
+d120 char ascii not null DEFAULT b'101',
+d136 smallint zerofill not null DEFAULT 999,
+d144 int zerofill not null DEFAULT 99999,
+d163 decimal (63,30)) engine=<engine_to_be_used>;
+Insert into t1_u values ('a',111,99999,999.99);
+Insert into t1_u values ('b',222,99999,999.99);
+Insert into t1_u values ('c',333,99999,999.99);
+Insert into t1_u values ('d',222,99999,999.99);
+Insert into t1_u values ('e',222,99999,999.99);
+Insert into t1_u values ('f',333,99999,999.99);
+Insert into t1_d values ('a',111,99999,999.99);
+Insert into t1_d values ('b',222,99999,999.99);
+Insert into t1_d values ('c',333,99999,999.99);
+Insert into t1_d values ('d',444,99999,999.99);
+Insert into t1_d values ('e',222,99999,999.99);
+Insert into t1_d values ('f',222,99999,999.99);
+
+3.5.8.4 - multiple SQL
+----------------------
+use test;
+Create trigger trg1 AFTER INSERT on tb3 for each row
+BEGIN
+insert into db_test.t1_i
+values (new.f120, new.f136, new.f144, new.f163);
+update db_test.t1_u
+set u144=new.f144, u163=new.f163
+where u136=new.f136;
+delete from db_test.t1_d where d136= new.f136;
+select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
+where u136= new.f136;
+END//
+connection con2_general;
+Use test;
+set @test_var=0;
+Insert into tb3 (f120, f122, f136, f144, f163)
+values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
+Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
+f120 f122 f136 f144 f163
+1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_i;
+i120 i136 i144 i163
+1 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_u;
+u120 u136 u144 u163
+a 00111 0000099999 999.990000000000000000000000000000
+b 00222 0000023456 1.050000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+d 00222 0000023456 1.050000000000000000000000000000
+e 00222 0000023456 1.050000000000000000000000000000
+f 00333 0000099999 999.990000000000000000000000000000
+select * from db_test.t1_d;
+d120 d136 d144 d163
+a 00111 0000099999 999.990000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+d 00444 0000099999 999.990000000000000000000000000000
+select @test_var;
+@test_var
+3.150000000000000000000000000000
+
+3.5.8.4 - single SQL - insert
+-----------------------------
+connection con2_super;
+Create trigger trg2 BEFORE UPDATE on tb3 for each row
+BEGIN
+insert into db_test.t1_i
+values (new.f120, new.f136, new.f144, new.f163);
+END//
+connection con2_general;
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_i order by i120;
+i120 i136 i144 i163
+1 00222 0000023456 1.050000000000000000000000000000
+update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert'
+ where f122='Test 3.5.8.4';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_i order by i120;
+i120 i136 i144 i163
+1 00222 0000023456 1.050000000000000000000000000000
+I 00222 0000023456 1.050000000000000000000000000000
+
+3.5.8.4 - single SQL - update
+-----------------------------
+connection con2_super;
+drop trigger trg2;
+Create trigger trg3 BEFORE UPDATE on tb3 for each row
+update db_test.t1_u
+set u120=new.f120
+where u136=new.f136;
+connection con2_general;
+update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
+ where f122='Test 3.5.8.4-Single Insert';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_u order by u120;
+u120 u136 u144 u163
+a 00111 0000099999 999.990000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+f 00333 0000099999 999.990000000000000000000000000000
+U 00222 0000023456 1.050000000000000000000000000000
+U 00222 0000023456 1.050000000000000000000000000000
+U 00222 0000023456 1.050000000000000000000000000000
+
+3.5.8.3/4 - single SQL - delete
+-------------------------------
+connection con2_super;
+drop trigger trg3;
+Create trigger trg4 AFTER UPDATE on tb3 for each row
+delete from db_test.t1_d where d136= new.f136;
+connection con2_general;
+update tb3 set f120='D', f136=444,
+f122='Test 3.5.8.4-Single Delete'
+ where f122='Test 3.5.8.4-Single Update';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_d order by d120;
+d120 d136 d144 d163
+a 00111 0000099999 999.990000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+
+3.5.8.3/4 - single SQL - select
+-------------------------------
+connection con2_super;
+drop trigger trg4;
+Create trigger trg5 AFTER UPDATE on tb3 for each row
+select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
+where u136= new.f136;
+connection con2_general;
+set @test_var=0;
+update tb3 set f120='S', f136=111,
+f122='Test 3.5.8.4-Single Select'
+ where f122='Test 3.5.8.4-Single Delete';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+S Test 3.5.8.4-Single Select 00111 0000023456 1.050000000000000000000000000000
+select @test_var;
+@test_var
+999.990000000000000000000000000000
+connection default;
+drop trigger trg1;
+drop trigger trg5;
+drop database if exists db_test;
+delete from tb3 where f122 like 'Test 3.5.8.4%';
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.8.5 (IF):
+----------------------
+create trigger trg2 before insert on tb3 for each row
+BEGIN
+IF new.f120='1' then
+set @test_var='one', new.f120='2';
+ELSEIF new.f120='2' then
+set @test_var='two', new.f120='3';
+ELSEIF new.f120='3' then
+set @test_var='three', new.f120='4';
+END IF;
+IF (new.f120='4') and (new.f136=10) then
+set @test_var2='2nd if', new.f120='d';
+ELSE
+set @test_var2='2nd else', new.f120='D';
+END IF;
+END//
+set @test_var='Empty', @test_var2=0;
+Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+D Test 3.5.8.5-if 00101 one 2nd else
+Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+D Test 3.5.8.5-if 00101 two 2nd else
+D Test 3.5.8.5-if 00102 two 2nd else
+Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+d Test 3.5.8.5-if 00010 three 2nd if
+D Test 3.5.8.5-if 00101 three 2nd if
+D Test 3.5.8.5-if 00102 three 2nd if
+Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+d Test 3.5.8.5-if 00010 three 2nd else
+D Test 3.5.8.5-if 00101 three 2nd else
+D Test 3.5.8.5-if 00102 three 2nd else
+D Test 3.5.8.5-if 00103 three 2nd else
+create trigger trg3 before update on tb3 for each row
+BEGIN
+ELSEIF new.f120='2' then
+END IF;
+END//
+ERROR 42000: 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 'ELSEIF new.f120='2' then
+END IF;
+END' at line 3
+drop trigger trg3//
+create trigger trg4 before update on tb3 for each row
+BEGIN
+IF (new.f120='4') and (new.f136=10) then
+set @test_var2='2nd if', new.f120='d';
+ELSE
+set @test_var2='2nd else', new.f120='D';
+END//
+ERROR 42000: 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 7
+drop trigger trg4;
+drop trigger trg2;
+delete from tb3 where f121='Test 3.5.8.5-if';
+
+Testcase 3.5.8.5-case:
+----------------------
+create trigger trg3 before insert on tb3 for each row
+BEGIN
+SET new.f120=char(ascii(new.f120)-32);
+CASE
+when new.f136<100 then set new.f136=new.f136+120;
+when new.f136<10 then set new.f144=777;
+when new.f136>100 then set new.f120=new.f136-1;
+END case;
+CASE
+when new.f136=200 then set @test_var=CONCAT(new.f120, '=');
+ELSE set @test_var=concat(new.f120, '*');
+END case;
+CASE new.f144
+when 1 then set @test_var=concat(@test_var, 'one');
+when 2 then set @test_var=concat(@test_var, 'two');
+when 3 then set @test_var=concat(@test_var, 'three');
+when 4 then set @test_var=concat(@test_var, 'four');
+when 5 then set @test_var=concat(@test_var, 'five');
+when 6 then set @test_var=concat(@test_var, 'six');
+when 7 then set @test_var=concat(@test_var, 'seven');
+when 8 then set @test_var=concat(@test_var, 'eight');
+when 9 then set @test_var=concat(@test_var, 'nine');
+when 10 then set @test_var=concat(@test_var, 'ten');
+when 11 then set @test_var=concat(@test_var, 'eleven');
+when 12 then set @test_var=concat(@test_var, 'twelve');
+when 13 then set @test_var=concat(@test_var, 'thirteen');
+when 14 then set @test_var=concat(@test_var, 'fourteen');
+when 15 then set @test_var=concat(@test_var, 'fifteen');
+ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
+END case;
+END//
+set @test_var='Empty';
+Insert into tb3 (f120, f122, f136, f144)
+values ('a', 'Test 3.5.8.5-case', 5, 7);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+A Test 3.5.8.5-case 00125 0000000007 A*seven
+Insert into tb3 (f120, f122, f136, f144)
+values ('b', 'Test 3.5.8.5-case', 71,16);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+A Test 3.5.8.5-case 00125 0000000007 B*0000000016
+B Test 3.5.8.5-case 00191 0000000016 B*0000000016
+Insert into tb3 (f120, f122, f136, f144)
+values ('c', 'Test 3.5.8.5-case', 80,1);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+A Test 3.5.8.5-case 00125 0000000007 C=one
+B Test 3.5.8.5-case 00191 0000000016 C=one
+C Test 3.5.8.5-case 00200 0000000001 C=one
+Insert into tb3 (f120, f122, f136)
+values ('d', 'Test 3.5.8.5-case', 152);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
+A Test 3.5.8.5-case 00125 0000000007 1*0000099999
+B Test 3.5.8.5-case 00191 0000000016 1*0000099999
+C Test 3.5.8.5-case 00200 0000000001 1*0000099999
+Insert into tb3 (f120, f122, f136, f144)
+values ('e', 'Test 3.5.8.5-case', 200, 8);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+1 Test 3.5.8.5-case 00152 0000099999 1=eight
+1 Test 3.5.8.5-case 00200 0000000008 1=eight
+A Test 3.5.8.5-case 00125 0000000007 1=eight
+B Test 3.5.8.5-case 00191 0000000016 1=eight
+C Test 3.5.8.5-case 00200 0000000001 1=eight
+Insert into tb3 (f120, f122, f136, f144)
+values ('f', 'Test 3.5.8.5-case', 100, 8);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+1 Test 3.5.8.5-case 00152 0000099999 1=eight
+1 Test 3.5.8.5-case 00200 0000000008 1=eight
+A Test 3.5.8.5-case 00125 0000000007 1=eight
+B Test 3.5.8.5-case 00191 0000000016 1=eight
+C Test 3.5.8.5-case 00200 0000000001 1=eight
+create trigger trg3a before update on tb3 for each row
+BEGIN
+CASE
+when new.f136<100 then set new.f120='p';
+END//
+ERROR 42000: 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 5
+drop trigger trg3a;
+drop trigger trg3;
+delete from tb3 where f121='Test 3.5.8.5-case';
+
+Testcase 3.5.8.5-loop/leave:
+----------------------------
+Create trigger trg4 after insert on tb3 for each row
+BEGIN
+set @counter=0, @flag='Initial';
+Label1: loop
+if new.f136<new.f144 then
+set @counter='Nothing to loop';
+leave Label1;
+else
+set @counter=@counter+1;
+if new.f136=new.f144+@counter then
+set @counter=concat(@counter, ' loops');
+leave Label1;
+end if;
+end if;
+iterate label1;
+set @flag='Final';
+END loop Label1;
+END//
+Insert into tb3 (f122, f136, f144)
+values ('Test 3.5.8.5-loop', 2, 8);
+select @counter, @flag;
+@counter @flag
+Nothing to loop Initial
+Insert into tb3 (f122, f136, f144)
+values ('Test 3.5.8.5-loop', 11, 8);
+select @counter, @flag;
+@counter @flag
+3 loops Initial
+Create trigger trg4_2 after update on tb3 for each row
+BEGIN
+Label1: loop
+set @counter=@counter+1;
+END;
+END//
+ERROR 42000: 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 ';
+END' at line 5
+drop trigger trg4_2;
+drop trigger trg4;
+delete from tb3 where f122='Test 3.5.8.5-loop';
+
+Testcase 3.5.8.5-repeat:
+------------------------
+Create trigger trg6 after insert on tb3 for each row
+BEGIN
+rp_label: REPEAT
+SET @counter1 = @counter1 + 1;
+IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
+END IF;
+SET @counter2 = @counter2 + 1;
+UNTIL @counter1> new.f136 END REPEAT rp_label;
+END//
+set @counter1= 0, @counter2= 0;
+Insert into tb3 (f122, f136)
+values ('Test 3.5.8.5-repeat', 13);
+select @counter1, @counter2;
+@counter1 @counter2
+15 8
+Create trigger trg6_2 after update on tb3 for each row
+BEGIN
+REPEAT
+SET @counter2 = @counter2 + 1;
+END//
+ERROR 42000: 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 'END' at line 5
+drop trigger trg6;
+delete from tb3 where f122='Test 3.5.8.5-repeat';
+
+Testcase 3.5.8.5-while:
+-----------------------
+Create trigger trg7 after insert on tb3 for each row
+wl_label: WHILE @counter1 < new.f136 DO
+SET @counter1 = @counter1 + 1;
+IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
+END IF;
+SET @counter2 = @counter2 + 1;
+END WHILE wl_label//
+set @counter1= 0, @counter2= 0;
+Insert into tb3 (f122, f136)
+values ('Test 3.5.8.5-while', 7);
+select @counter1, @counter2;
+@counter1 @counter2
+7 4
+Create trigger trg7_2 after update on tb3 for each row
+BEGIN
+WHILE @counter1 < new.f136
+SET @counter1 = @counter1 + 1;
+END//
+ERROR 42000: 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 'SET @counter1 = @counter1 + 1;
+END' at line 4
+delete from tb3 where f122='Test 3.5.8.5-while';
+drop trigger trg7;
+
+Testcase 3.5.8.6: (requirement void)
+------------------------------------
+CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END//
+CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW
+BEGIN
+CALL sp_01 ();
+END//
+Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101);
+update tb3 set f120='S', f136=111,
+f122='Test 3.5.8.6-tr8_1'
+ where f122='Test 3.5.8.6-insert';
+select f120, f122
+from tb3 where f122 like 'Test 3.5.8.6%' order by f120;
+f120 f122
+S Test 3.5.8.6-tr8_1
+DROP TRIGGER trg8_1;
+DROP PROCEDURE sp_01;
+
+Testcase 3.5.8.7
+----------------
+Create trigger trg9_1 before update on tb3 for each row
+BEGIN
+Start transaction;
+Set new.f120='U';
+Commit;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+Create trigger trg9_2 before delete on tb3 for each row
+BEGIN
+Start transaction;
+Set @var2=old.f120;
+Rollback;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+connection default;
+drop user test_general@localhost;
+drop user test_general;
+drop user test_super@localhost;
+DROP TABLE test.tb3;
+set GLOBAL sql_mode=default;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_09.result b/mysql-test/suite/funcs_1/r/memory_trig_09.result
new file mode 100644
index 00000000..b3e5e109
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_trig_09.result
@@ -0,0 +1,268 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
+
+Testcase 3.5.9.1/2:
+-------------------
+Create trigger trg1 BEFORE UPDATE on tb3 for each row
+set new.f142 = 94087, @counter=@counter+1;
+TotalRows
+10
+Affected
+9
+NotAffected
+1
+NewValuew
+0
+set @counter=0;
+Update tb3 Set f142='1' where f130<100;
+select count(*) as ExpectedChanged, @counter as TrigCounter
+from tb3 where f142=94087;
+ExpectedChanged TrigCounter
+9 9
+select count(*) as ExpectedNotChange from tb3
+where f130<100 and f142<>94087;
+ExpectedNotChange
+0
+select count(*) as NonExpectedChanged from tb3
+where f130>=130 and f142=94087;
+NonExpectedChanged
+0
+drop trigger trg1;
+
+Testcase 3.5.9.3:
+-----------------
+Create trigger trg2_a before update on tb3 for each row
+set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
+@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
+@tr_var_b4_163=old.f163;
+Create trigger trg2_b after update on tb3 for each row
+set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
+@tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
+@tr_var_af_163=old.f163;
+Create trigger trg2_c before delete on tb3 for each row
+set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
+@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
+@tr_var_b4_163=old.f163;
+Create trigger trg2_d after delete on tb3 for each row
+set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
+@tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
+@tr_var_af_163=old.f163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+0 0 0 0 0
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+0 0 0 0 0
+Insert into tb3 (f122, f136, f163)
+values ('Test 3.5.9.3', 7, 123.17);
+Update tb3 Set f136=8 where f122='Test 3.5.9.3';
+select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
+f118 f121 f122 f136 f163
+a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+0 0 0 0 0
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+0 0 0 0 0
+delete from tb3 where f122='Test 3.5.9.3';
+select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
+f118 f121 f122 f136 f163
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
+drop trigger trg2_a;
+drop trigger trg2_b;
+drop trigger trg2_c;
+drop trigger trg2_d;
+
+Testcase 3.5.9.4:
+-----------------
+Create trigger trg3_a before insert on tb3 for each row
+set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
+@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
+@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
+Create trigger trg3_b after insert on tb3 for each row
+set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
+@tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
+@tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
+Create trigger trg3_c before update on tb3 for each row
+set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
+@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
+@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
+Create trigger trg3_d after update on tb3 for each row
+set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
+@tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
+@tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+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
+Insert into tb3 (f122, f136, f151, f163)
+values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
+select f118, f121, f122, f136, f151, f163 from tb3
+where f122 like 'Test 3.5.9.4%' order by f163;
+f118 f121 f122 f136 f151 f163
+a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
+a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+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 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
+select f118, f121, f122, f136, f151, f163 from tb3
+where f122 like 'Test 3.5.9.4-trig' order by f163;
+f118 f121 f122 f136 f151 f163
+a NULL Test 3.5.9.4-trig 00000 999 NULL
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+a NULL Test 3.5.9.4-trig NULL 999 NULL
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
+a NULL Test 3.5.9.4-trig 0 999 NULL
+drop trigger trg3_a;
+drop trigger trg3_b;
+drop trigger trg3_c;
+drop trigger trg3_d;
+delete from tb3 where f122='Test 3.5.9.4-trig';
+
+Testcase 3.5.9.5: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.9.6:
+-----------------
+create trigger trg4a before insert on tb3 for each row
+set @temp1= old.f120;
+ERROR HY000: There is no OLD row in on INSERT trigger
+create trigger trg4b after insert on tb3 for each row
+set old.f120= 'test';
+ERROR HY000: Updating of OLD row is not allowed in trigger
+drop trigger trg4a;
+drop trigger trg4b;
+
+Testcase 3.5.9.7: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.9.8: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.9.9:
+-----------------
+create trigger trg5a before DELETE on tb3 for each row
+set @temp1=new.f122;
+ERROR HY000: There is no NEW row in on DELETE trigger
+create trigger trg5b after DELETE on tb3 for each row
+set new.f122='test';
+ERROR HY000: There is no NEW row in on DELETE trigger
+drop trigger trg5a;
+drop trigger trg5b;
+
+Testcase 3.5.9.10: (implied in previous tests)
+----------------------------------------------
+
+Testcase 3.5.9.11: covered by 3.5.9.9
+-------------------------------------
+
+Testcase 3.5.9.12: covered by 3.5.9.6
+-------------------------------------
+
+Testcase 3.5.9.13:
+------------------
+create trigger trg6a before UPDATE on tb3 for each row
+set old.f118='C', new.f118='U';
+ERROR HY000: Updating of OLD row is not allowed in trigger
+create trigger trg6b after INSERT on tb3 for each row
+set old.f136=163, new.f118='U';
+ERROR HY000: Updating of OLD row is not allowed in trigger
+create trigger trg6c after UPDATE on tb3 for each row
+set old.f136=NULL;
+ERROR HY000: Updating of OLD row is not allowed in trigger
+drop trigger trg6a;
+drop trigger trg6b;
+drop trigger trg6c;
+
+Testcase 3.5.9.14: (implied in previous tests)
+----------------------------------------------
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result
new file mode 100644
index 00000000..c1b697bd
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result
@@ -0,0 +1,405 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
+
+Testcase 3.5.10.1/2/3:
+----------------------
+Create view vw11 as select * from tb3
+where f122 like 'Test 3.5.10.1/2/3%';
+Create trigger trg1a before insert on tb3
+for each row set new.f163=111.11;
+Create trigger trg1b after insert on tb3
+for each row set @test_var='After Insert';
+Create trigger trg1c before update on tb3
+for each row set new.f121='Y', new.f122='Test 3.5.10.1/2/3-Update';
+Create trigger trg1d after update on tb3
+for each row set @test_var='After Update';
+Create trigger trg1e before delete on tb3
+for each row set @test_var=5;
+Create trigger trg1f after delete on tb3
+for each row set @test_var= 2* @test_var+7;
+Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1);
+Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2);
+Insert into vw11 (f122, f151) values ('Not in View', 3);
+select f121, f122, f151, f163
+from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+f121 f122 f151 f163
+NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
+NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
+select f121, f122, f151, f163 from vw11;
+f121 f122 f151 f163
+NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
+NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
+select f121, f122, f151, f163
+from tb3 where f122 like 'Not in View';
+f121 f122 f151 f163
+NULL Not in View 3 111.110000000000000000000000000000
+Update vw11 set f163=1;
+select f121, f122, f151, f163 from tb3
+where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+select f121, f122, f151, f163 from vw11;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+set @test_var=0;
+Select @test_var as 'before delete';
+before delete
+0
+delete from vw11 where f151=1;
+select f121, f122, f151, f163 from tb3
+where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+select f121, f122, f151, f163 from vw11;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+Select @test_var as 'after delete';
+after delete
+17
+drop view vw11;
+drop trigger trg1a;
+drop trigger trg1b;
+drop trigger trg1c;
+drop trigger trg1d;
+drop trigger trg1e;
+drop trigger trg1f;
+delete from tb3 where f122 like 'Test 3.5.10.1/2/3%';
+
+Testcase 3.5.10.4:
+------------------
+create table tb_load (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
+Create trigger trg4 before insert on tb_load
+for each row set new.f3=-(new.f1 div 5), @counter= @counter+1;
+set @counter= 0;
+select @counter as 'Rows Loaded Before';
+Rows Loaded Before
+0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table tb_load;
+select @counter as 'Rows Loaded After';
+Rows Loaded After
+10
+Select * from tb_load order by f1 limit 10;
+f1 f2 f3
+-5000 a` 1000
+-4999 aaa 999
+-4998 abaa 999
+-4997 acaaa 999
+-4996 adaaaa 999
+-4995 aeaaaaa 999
+-4994 afaaaaaa 998
+-4993 agaaaaaaa 998
+-4992 a^aaaaaaaa 998
+-4991 a_aaaaaaaaa 998
+drop trigger trg4;
+drop table tb_load;
+
+Testcase 3.5.10.5: (implemented in trig_frkey.test)
+---------------------------------------------------
+
+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;
+create procedure trig_sp()
+begin
+declare done int default 0;
+declare var151 decimal;
+declare var136 tinyint;
+declare cur1 cursor for select f136, f151 from tb3;
+declare continue handler for sqlstate '01000' set done = 1;
+open cur1;
+fetch cur1 into var136, var151;
+wl_loop: WHILE NOT done DO
+insert into t1_sp values (var136, var151);
+fetch cur1 into var136, var151;
+END WHILE wl_loop;
+close cur1;
+end//
+set @counter=0;
+select @counter;
+@counter
+0
+call trig_sp();
+ERROR 02000: No data - zero rows fetched, selected, or processed
+select @counter;
+@counter
+11
+select count(*) from tb3;
+count(*)
+11
+select count(*) from t1_sp;
+count(*)
+11
+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)
+-------------------------------------------------
+
+Testcase y.y.y.2: Check for triggers starting triggers
+------------------------------------------------------
+use test;
+drop table if exists t1;
+drop table if exists t2_1;
+drop table if exists t2_2;
+drop table if exists t2_3;
+drop table if exists t2_4;
+drop table if exists t3;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+create table t2_1 (f1 integer) engine = <engine_to_be_used>;
+create table t2_2 (f1 integer) engine = <engine_to_be_used>;
+create table t2_3 (f1 integer) engine = <engine_to_be_used>;
+create table t2_4 (f1 integer) engine = <engine_to_be_used>;
+create table t3 (f1 integer) engine = <engine_to_be_used>;
+insert into t1 values (1);
+create trigger tr1 after insert on t1 for each row
+BEGIN
+insert into t2_1 (f1) values (new.f1+1);
+insert into t2_2 (f1) values (new.f1+1);
+insert into t2_3 (f1) values (new.f1+1);
+insert into t2_4 (f1) values (new.f1+1);
+END//
+create trigger tr2_1 after insert on t2_1 for each row
+insert into t3 (f1) values (new.f1+10);
+create trigger tr2_2 after insert on t2_2 for each row
+insert into t3 (f1) values (new.f1+100);
+create trigger tr2_3 after insert on t2_3 for each row
+insert into t3 (f1) values (new.f1+1000);
+create trigger tr2_4 after insert on t2_4 for each row
+insert into t3 (f1) values (new.f1+10000);
+insert into t1 values (1);
+select * from t3 order by f1;
+f1
+12
+102
+1002
+10002
+drop trigger tr1;
+drop trigger tr2_1;
+drop trigger tr2_2;
+drop trigger tr2_3;
+drop trigger tr2_4;
+drop table t1, t2_1, t2_2, t2_3, t2_4, t3;
+
+Testcase y.y.y.3: Circular trigger reference
+--------------------------------------------
+use test;
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+drop table if exists t4;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+create table t2 (f2 integer) engine = <engine_to_be_used>;
+create table t3 (f3 integer) engine = <engine_to_be_used>;
+create table t4 (f4 integer) engine = <engine_to_be_used>;
+insert into t1 values (0);
+create trigger tr1 after insert on t1
+for each row insert into t2 (f2) values (new.f1+1);
+create trigger tr2 after insert on t2
+for each row insert into t3 (f3) values (new.f2+1);
+create trigger tr3 after insert on t3
+for each row insert into t4 (f4) values (new.f3+1);
+create trigger tr4 after insert on t4
+for each row insert into t1 (f1) values (new.f4+1);
+insert into t1 values (1);
+ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
+select * from t1 order by f1;
+f1
+0
+1
+select * from t2 order by f2;
+f2
+2
+select * from t3 order by f3;
+f3
+3
+select * from t4 order by f4;
+f4
+4
+drop trigger tr1;
+drop trigger tr2;
+drop trigger tr3;
+drop trigger tr4;
+drop table t1;
+drop table t2;
+drop table t3;
+drop table t4;
+
+Testcase y.y.y.4: Recursive trigger/SP references
+-------------------------------------------------
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
+create table t1_sp (
+count integer,
+var136 tinyint,
+var151 decimal) engine = <engine_to_be_used>;
+create procedure trig_sp()
+begin
+declare done int default 0;
+declare var151 decimal;
+declare var136 tinyint;
+declare cur1 cursor for select f136, f151 from tb3;
+declare continue handler for sqlstate '01000' set done = 1;
+set @counter= @counter+1;
+open cur1;
+fetch cur1 into var136, var151;
+wl_loop: WHILE NOT done DO
+insert into t1_sp values (@counter, var136, var151);
+fetch cur1 into var136, var151;
+END WHILE wl_loop;
+close cur1;
+end//
+create trigger trg before insert on t1_sp
+for each row call trig_sp();
+set @counter=0;
+select @counter;
+@counter
+0
+call trig_sp();
+ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine trig_sp
+select @counter;
+@counter
+1
+select count(*) from tb3;
+count(*)
+11
+select count(*) from t1_sp;
+count(*)
+0
+set @@max_sp_recursion_depth= 10;
+set @counter=0;
+select @counter;
+@counter
+0
+call trig_sp();
+ERROR HY000: Can't update table 't1_sp' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
+select @counter;
+@counter
+2
+select count(*) from tb3;
+count(*)
+11
+select count(*) from t1_sp;
+count(*)
+0
+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
+-------------------------------------------------------
+set @@sql_mode='traditional';
+use test;
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+drop table if exists t4;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+create table t2 (f2 integer) engine = <engine_to_be_used>;
+create table t3 (f3 integer) engine = <engine_to_be_used>;
+create table t4 (f4 tinyint) engine = <engine_to_be_used>;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+insert into t1 values (1);
+create trigger tr1 after insert on t1
+for each row insert into t2 (f2) values (new.f1+1);
+create trigger tr2 after insert on t2
+for each row insert into t3 (f3) values (new.f2+1);
+create trigger tr3 after insert on t3
+for each row insert into t4 (f4) values (new.f3+1000);
+set autocommit=0;
+start transaction;
+insert into t1 values (1);
+ERROR 22003: Out of range value for column 'f4' at row 1
+commit;
+select * from t1 order by f1;
+f1
+1
+1
+select * from t2 order by f2;
+f2
+2
+select * from t3 order by f3;
+f3
+3
+drop trigger tr1;
+drop trigger tr2;
+drop trigger tr3;
+drop table t1;
+drop table t2;
+drop table t3;
+drop table t4;
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result
new file mode 100644
index 00000000..417c0e85
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/memory_views.result
@@ -0,0 +1,22921 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = memory;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
+into table tb2 ;
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+USE test1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set"
+) engine = memory;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
+into table tb2 ;
+USE test;
+
+! Attention: The file with the expected results is not
+| thoroughly checked.
+! The server return codes are correct, but
+| most result sets where the table tb2 is
+! involved are not checked.
+--------------------------------------------------------------------------------
+
+There are some statements where the ps-protocol is switched off.
+Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
+--------------------------------------------------------------------------------
+insert into test.tb2 (f59,f60) values (76710,226546);
+insert into test.tb2 (f59,f60) values(2760,985654);
+insert into test.tb2 (f59,f60) values(569300,9114376);
+insert into test.tb2 (f59,f60) values(660,876546);
+insert into test.tb2 (f59,f60) values(250,87895654);
+insert into test.tb2 (f59,f60) values(340,9984376);
+insert into test.tb2 (f59,f60) values(3410,996546);
+insert into test.tb2 (f59,f60) values(2550,775654);
+insert into test.tb2 (f59,f60) values(3330,764376);
+insert into test.tb2 (f59,f60) values(441,16546);
+insert into test.tb2 (f59,f60) values(24,51654);
+insert into test.tb2 (f59,f60) values(323,14376);
+insert into test.tb2 (f59,f60) values(34,41);
+insert into test.tb2 (f59,f60) values(04,74);
+insert into test.tb2 (f59,f60) values(15,87);
+insert into test.tb2 (f59,f60) values(22,93);
+insert into test.tb2 (f59,f60) values(394,41);
+insert into test.tb2 (f59,f60) values(094,74);
+insert into test.tb2 (f59,f60) values(195,87);
+insert into test.tb2 (f59,f60) values(292,93);
+insert into test.tb2 (f59,f60) values(0987,41) ;
+insert into test.tb2 (f59,f60) values(7876,74) ;
+INSERT INTO tb2 (f59,f61) VALUES(321,765 );
+INSERT INTO tb2 (f59,f61) VALUES(9112,8771);
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+Insert into tb2 (f59,f60,f61) values (107,105,106) ;
+Insert into tb2 (f59,f60,f61) values (109,108,104) ;
+Insert into tb2 (f59,f60,f61) values (207,205,206) ;
+Insert into tb2 (f59,f60,f61) values (209,208,204) ;
+Insert into tb2 (f59,f60,f61) values (27,25,26) ;
+Insert into tb2 (f59,f60,f61) values (29,28,24) ;
+Insert into tb2 (f59,f60,f61) values (17,15,16) ;
+Insert into tb2 (f59,f60,f61) values (19,18,14) ;
+insert into tb2 (f59,f60,f61) values (107,105,106);
+insert into tb2 (f59,f60,f61) values (109,108,104);
+INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
+INSERT INTO tb2 (f59,f60) VALUES( 242,79 );
+INSERT INTO tb2 (f59,f60) VALUES( 424,89 );
+SELECT * FROM tb2 ORDER BY f59, f60, f61;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+Use test;
+
+Testcase 3.3.1.1
+--------------------------------------------------------------------------------
+Drop table if exists t1;
+Create table t1 (f59 INT, f60 INT) ;
+Insert into t1 values (100,4234);
+Insert into t1 values (990,6624);
+Insert into t1 values (710,765);
+Insert into t1 values (300,433334);
+Insert into t1 values (800,9788);
+Insert into t1 values (500,9866);
+Drop view if exists v1 ;
+CREATE VIEW v1 AS select f59,f60,f61
+FROM test.tb2 where f59=250;
+select * FROM v1 order by f60,f61 limit 0,10;
+f59 f60 f61
+250 87895654 NULL
+Drop view if exists v1 ;
+CREATE VIEW v1 AS select f59,f60,f61
+FROM test.tb2 limit 100;
+select * FROM v1 order by f59,f60,f61 limit 0,10;
+f59 f60 f61
+1 1 0000000001
+2 2 0000000002
+3 3 0000000003
+4 4 0000000004
+4 74 NULL
+5 5 0000000005
+6 6 0000000006
+7 7 0000000007
+8 8 0000000008
+9 9 0000000009
+CREATE or REPLACE VIEW v1 AS select f59,f60,f61
+FROM test.tb2;
+select * FROM v1 order by f59,f60,f61 limit 4,3;
+f59 f60 f61
+4 74 NULL
+5 5 0000000005
+6 6 0000000006
+CREATE or REPLACE VIEW v1 AS select distinct f59
+FROM test.tb2;
+select * FROM v1 order by f59 limit 4,3;
+f59
+5
+6
+7
+ALTER VIEW v1 AS select f59
+FROM test.tb2;
+select * FROM v1 order by f59 limit 6,2;
+f59
+6
+7
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 order by f59;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+4
+5
+6
+7
+8
+9
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 order by f59 asc;
+select * FROM v1 limit 0,10;
+f59
+1
+2
+3
+4
+4
+5
+6
+7
+8
+9
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 order by f59 desc;
+select * FROM v1 limit 0,10;
+f59
+569300
+76710
+9112
+7876
+3410
+3330
+2760
+2550
+987
+660
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 group by f59;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 group by f59 asc;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 group by f59 desc;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
+union (select f59 from t1);
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
+UNION DISTINCT(select f59 FROM t1) ;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
+UNION ALL(select f59 FROM t1) ;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+4
+5
+6
+7
+8
+9
+CREATE or REPLACE VIEW v1 AS select *
+FROM test.tb2 WITH LOCAL CHECK OPTION ;
+select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 4
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 4
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+CREATE or REPLACE VIEW v1 AS select *
+FROM test.tb2 WITH CASCADED CHECK OPTION ;
+select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 4
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 4
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 WITH CASCADED CHECK OPTION;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+F59 F60
+1 1
+2 2
+3 3
+4 4
+4 74
+5 5
+6 6
+7 7
+8 8
+9 9
+CREATE or REPLACE VIEW v1 AS select f59, f60
+from test.tb2 where f59=3330 ;
+select * FROM v1 order by f60 limit 0,10;
+f59 f60
+3330 764376
+DROP VIEW v1 ;
+DROP TABLE t1 ;
+
+Testcase 3.3.1.2
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS v2 ;
+CREATE TABLE t1 (f1 BIGINT) ;
+SET @x=0;
+CREATE or REPLACE VIEW v1 AS Select 1 INTO @x;
+ERROR 42000: 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 'INTO @x' at line 1
+Select @x;
+@x
+0
+CREATE or REPLACE VIEW v1 AS Select 1
+FROM (SELECT 1 FROM t1) my_table;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ;
+SET @a:=0 ;
+SELECT @a ;
+@a
+0
+INSERT INTO v1 VALUES (1) ;
+SELECT @a ;
+@a
+1
+SELECT * FROM t1;
+f1
+1
+DROP TRIGGER tr1 ;
+SET @a:=0 ;
+CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ;
+ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
+RENAME TABLE v1 TO v2;
+RENAME VIEW v2 TO v1;
+ERROR 42000: 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 'VIEW v2 TO v1' at line 1
+ALTER TABLE v2 RENAME AS v1;
+ERROR HY000: 'test.v2' is not of type 'BASE TABLE'
+ALTER VIEW v1 RENAME AS v2;
+ERROR 42000: 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 'RENAME AS v2' at line 1
+DROP TABLE IF EXISTS t1, t2 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS v2 ;
+CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE );
+CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
+ALTER TABLE t1 ADD PRIMARY KEY(f1);
+ALTER TABLE v1 ADD PRIMARY KEY(f1);
+ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
+ALTER VIEW v1 ADD PRIMARY KEY(f1);
+ERROR 42000: 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 'ADD PRIMARY KEY(f1)' at line 1
+CREATE INDEX t1_idx ON t1(f3);
+CREATE INDEX v1_idx ON v1(f3);
+ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
+DROP TABLE t1;
+DROP VIEW v1;
+
+Testcase 3.3.1.3 + 3.1.1.4
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
+ERROR 42000: 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 'or REPLACE AS Select * from tb2 my_table' at line 1
+CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
+from tb2 my_table limit 50;
+ERROR 42000: 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 'WITH CASCADED CHECK OPTION AS Select *
+from tb2 my_table limit 50' at line 1
+CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
+from tb2 my_table limit 50;
+ERROR 42000: 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 'WITH LOCAL CHECK OPTION AS Select *
+from tb2 my_table limit 50' at line 1
+SELECT * FROM tb2 my_table CREATE VIEW As v1;
+ERROR 42000: 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 'CREATE VIEW As v1' at line 1
+CREATE or REPLACE VIEW v1 Select f59, f60
+from test.tb2 my_table where f59 = 250 ;
+ERROR 42000: 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 'Select f59, f60
+from test.tb2 my_table where f59 = 250' at line 1
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+DROP VIEW v1;
+REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+ERROR 42000: 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 'OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHE...' at line 1
+CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+ERROR 42000: 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 'SELECT AS F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION' at line 1
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CASCADED WITH CHECK OPTION;
+ERROR 42000: 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 'CASCADED WITH CHECK OPTION' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED OPTION CHECK;
+ERROR 42000: 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 'OPTION CHECK' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CHECK OPTION WITH CASCADED;
+ERROR 42000: 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 'CHECK OPTION WITH CASCADED' at line 2
+CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table;
+ERROR 42000: 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 'WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1
+REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
+ERROR 42000: 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 'OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK ...' at line 1
+CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
+ERROR 42000: 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 'SELECT AS F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION' at line 1
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table LOCAL WITH CHECK OPTION;
+ERROR 42000: 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 'LOCAL WITH CHECK OPTION' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL OPTION CHECK;
+ERROR 42000: 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 'OPTION CHECK' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CHECK OPTION WITH LOCAL;
+ERROR 42000: 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 'CHECK OPTION WITH LOCAL' at line 2
+CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table;
+ERROR 42000: 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 'WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1' at line 1
+Drop table if exists t1 ;
+CREATE table t1 (f1 int ,f2 int) ;
+INSERT INTO t1 values (235, 22);
+INSERT INTO t1 values (554, 11);
+CREATE or REPLACE view v1 as (Select from f59 tb2)
+Union ALL (Select from f1 t1);
+ERROR 42000: 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 'from f59 tb2)
+Union ALL (Select from f1 t1)' at line 1
+CREATE or REPLACE view v1 as Select f59, f60
+from tb2 by order f59;
+ERROR 42000: 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 'by order f59' at line 2
+CREATE or REPLACE view v1 as Select f59, f60
+from tb2 by group f59 ;
+ERROR 42000: 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 'by group f59' at line 2
+
+Testcase 3.3.1.5
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+CREATE VIEW v1 SELECT * FROM tb2;
+ERROR 42000: 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 'SELECT * FROM tb2' at line 1
+CREATE v1 AS SELECT * FROM tb2;
+ERROR 42000: 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 'v1 AS SELECT * FROM tb2' at line 1
+VIEW v1 AS SELECT * FROM tb2;
+ERROR 42000: 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 'VIEW v1 AS SELECT * FROM tb2' at line 1
+CREATE VIEW v1 AS SELECT 1;
+DROP VIEW v1;
+VIEW v1 AS SELECT 1;
+ERROR 42000: 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 'VIEW v1 AS SELECT 1' at line 1
+CREATE v1 AS SELECT 1;
+ERROR 42000: 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 'v1 AS SELECT 1' at line 1
+CREATE VIEW AS SELECT 1;
+ERROR 42000: 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 'AS SELECT 1' at line 1
+CREATE VIEW v1 SELECT 1;
+ERROR 42000: 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 'SELECT 1' at line 1
+CREATE VIEW v1 AS ;
+ERROR 42000: 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
+
+Testcase 3.3.1.6
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+CREATE or REPLACE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = MERGE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 '= TEMPTABLE VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'TEMPTABLE VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE ALGORITHM = VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'TEMPTABLE = ALGORITHM VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'TEMPTABLE - ALGORITHM VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'GARBAGE = TEMPTABLE VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'GARBAGE VIEW v1
+as SELECT * from tb2' at line 1
+Drop view if exists v1 ;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH LOCAL CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH NO CHECK OPTION;
+ERROR 42000: 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 'NO CHECK OPTION' at line 2
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 CASCADED CHECK OPTION;
+ERROR 42000: 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 'CASCADED CHECK OPTION' at line 2
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED OPTION;
+ERROR 42000: 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 'OPTION' at line 2
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK ;
+ERROR 42000: 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 2
+
+Testcase 3.3.1.7
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+Create view test.v1 AS Select * from test.tb2;
+Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
+Drop view test.v1 ;
+Create view v1 AS Select * from test.tb2 limit 100 ;
+Alter view v1 AS Select F59 from test.tb2 limit 100 ;
+Drop view v1 ;
+
+Testcase 3.3.1.A0
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS V1 ;
+CREATE TABLE t1 (f1 NUMERIC(4)) ENGINE = memory;
+INSERT INTO t1 VALUES(1111), (2222);
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111;
+CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222;
+SELECT * FROM v1;
+f1
+1111
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS V1 ;
+
+Testcase 3.3.1.8
+--------------------------------------------------------------------------------
+Create view select AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'select AS Select * from test.tb2 limit 100' at line 1
+Create view as AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'as AS Select * from test.tb2 limit 100' at line 1
+Create view where AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'where AS Select * from test.tb2 limit 100' at line 1
+Create view from AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'from AS Select * from test.tb2 limit 100' at line 1
+Create view while AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'while AS Select * from test.tb2 limit 100' at line 1
+Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ;
+ERROR 42000: 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 '*(&*&&^ as Select * from test.tb2 limit 100' at line 1
+Drop view if exists test.procedure ;
+Create view test.procedure as Select * from test.tb2 limit 100 ;
+Drop view if exists test.procedure ;
+
+Testcase 3.3.1.9
+--------------------------------------------------------------------------------
+Drop TABLE IF EXISTS t1 ;
+Drop VIEW IF EXISTS v1;
+Drop VIEW IF EXISTS v2;
+Drop VIEW IF EXISTS v3;
+CREATE TABLE t1 ( f1 char(5));
+INSERT INTO t1 SET f1 = 'abcde';
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+CREATE VIEW v2 AS SELECT * FROM v1;
+DROP TABLE t1;
+SELECT * FROM v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DELETE FROM v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE v1 SET f1 = 'aaaaa';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v1 SET f1 = "fffff";
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DELETE FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE v2 SET f1 = 'aaaaa';
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v2 SET f1 = "fffff";
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DROP VIEW v1;
+SELECT * FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DELETE FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE v2 SET f1 = 'aaaaa';
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v2 SET f1 = "fffff";
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DROP VIEW v2;
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 (f1 FLOAT);
+CREATE VIEW v1 AS SELECT * FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE or REPLACE VIEW v1 AS SELECT * FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+DROP VIEW v1;
+DROP TABLE t1;
+
+Testcase 3.3.1.10
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Create view test.v1 AS Select * from test.tb2 ;
+Create view test.v1 AS Select F59 from test.tb2 ;
+ERROR 42S01: Table 'v1' already exists
+Create view v1 AS Select F59 from test.tb2 ;
+ERROR 42S01: Table 'v1' already exists
+
+Testcase 3.3.1.11
+--------------------------------------------------------------------------------
+Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ;
+ERROR 42S01: Table 'tb2' already exists
+Create view tb2 AS Select f59,f60 from test.tb2 limit 100 ;
+ERROR 42S01: Table 'tb2' already exists
+Drop view if exists test.v111 ;
+Create view test.v111 as select * from tb2 limit 50;
+Create table test.v111(f1 int );
+ERROR 42S01: Table 'v111' already exists
+Create table v111(f1 int );
+ERROR 42S01: Table 'v111' already exists
+DROP VIEW test.v111;
+
+Testcase 3.3.1.12
+--------------------------------------------------------------------------------
+USE test;
+Drop database if exists test2 ;
+Create database test2 ;
+DROP TABLE IF EXISTS test.t0, test.t1, test.t2;
+DROP VIEW IF EXISTS test.v1;
+DROP VIEW IF EXISTS test.v2;
+CREATE TABLE test.t1 ( f1 VARCHAR(20));
+CREATE TABLE test2.t1 ( f1 VARCHAR(20));
+CREATE TABLE test.t2 ( f1 VARCHAR(20));
+CREATE TABLE test2.v1 ( f1 VARCHAR(20));
+CREATE TABLE test.t0 ( f1 VARCHAR(20));
+CREATE TABLE test2.t0 ( f1 VARCHAR(20));
+CREATE VIEW test2.t2 AS SELECT * FROM test2.t0;
+CREATE VIEW test.v1 AS SELECT * FROM test.t0;
+CREATE VIEW test.v2 AS SELECT * FROM test.t0;
+CREATE VIEW test2.v2 AS SELECT * FROM test2.t0;
+INSERT INTO test.t1 VALUES('test.t1 - 1');
+INSERT INTO test2.t1 VALUES('test2.t1 - 1');
+INSERT INTO test.t2 VALUES('test.t2 - 1');
+INSERT INTO test2.v1 VALUES('test2.v1 - 1');
+INSERT INTO test.t0 VALUES('test.t0 - 1');
+INSERT INTO test2.t0 VALUES('test2.t0 - 1');
+USE test;
+INSERT INTO t1 VALUES('test.t1 - 2');
+INSERT INTO t2 VALUES('test.t2 - 2');
+INSERT INTO t0 VALUES('test.t0 - 2');
+USE test2;
+INSERT INTO t1 VALUES('test2.t1 - 2');
+INSERT INTO v1 VALUES('test2.v1 - 2');
+INSERT INTO t0 VALUES('test2.t0 - 2');
+SELECT * FROM t1;
+f1
+test2.t1 - 1
+test2.t1 - 2
+SELECT * FROM t2;
+f1
+test2.t0 - 1
+test2.t0 - 2
+SELECT * FROM v1;
+f1
+test2.v1 - 1
+test2.v1 - 2
+SELECT * FROM v2;
+f1
+test2.t0 - 1
+test2.t0 - 2
+USE test;
+SELECT * FROM t1;
+f1
+test.t1 - 1
+test.t1 - 2
+SELECT * FROM t2;
+f1
+test.t2 - 1
+test.t2 - 2
+SELECT * FROM v1;
+f1
+test.t0 - 1
+test.t0 - 2
+SELECT * FROM v2;
+f1
+test.t0 - 1
+test.t0 - 2
+
+Testcase 3.3.1.13
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (f1 BIGINT);
+INSERT INTO t1 VALUES(1);
+CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
+SELECT * FROM test.v1;
+f1
+1
+CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1
+AS SELECT * FROM t1 limit 2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
+SELECT * FROM test.v1;
+f1
+1
+CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109` from `tb2` order by `tb2`.`f59` limit 2 latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by F59 limit 10,100;
+F59
+10
+15
+17
+19
+22
+24
+27
+29
+34
+94
+107
+107
+109
+109
+195
+207
+209
+242
+250
+292
+299
+321
+323
+340
+394
+424
+441
+500
+500
+500
+660
+987
+2550
+2760
+3330
+3410
+7876
+9112
+76710
+569300
+Drop table test.t1 ;
+Drop view test.v1 ;
+
+Testcase 3.3.1.14
+--------------------------------------------------------------------------------
+CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2;
+ERROR HY000: 'test.tb2' is not of type 'VIEW'
+CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2;
+ERROR HY000: 'test.tb2' is not of type 'VIEW'
+
+Testcase 3.3.1.15
+--------------------------------------------------------------------------------
+Drop table if exists test.v1 ;
+CREATE OR REPLACE view test.v1 as select * from tb2;
+SELECT * FROM test.v1;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+Drop view test.v1 ;
+
+Testcase 3.3.1.16 + 3.3.1.17
+--------------------------------------------------------------------------------
+Drop table if exists test.v1 ;
+CREATE OR REPLACE VIEW v1 AS SELECT * From tb2;
+SELECT * FROM tb2 WHERE 1 = 2;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+SELECT * FROM v1 WHERE 1 = 2;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+Drop view v1;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (f1 NUMERIC(15,3));
+INSERT INTO t1 VALUES(8.8);
+CREATE VIEW v1 AS SELECT * FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+f1
+8.800
+CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+f1
+8.800
+CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+my_column
+8.800
+CREATE OR REPLACE VIEW v1(column1,column2)
+AS SELECT f1 As my_column, f1 FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+column1 column2
+8.800 8.800
+CREATE OR REPLACE VIEW test.v1(column1,column2)
+AS SELECT f1 As my_column, f1 FROM test.t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+column1 column2
+8.800 8.800
+
+Testcase 3.3.1.18
+--------------------------------------------------------------------------------
+Drop view if exists v1 ;
+Drop view if exists v1_1 ;
+Create view v1
+as Select test.tb2.f59 as NewNameF1, test.tb2.f60
+from test.tb2 limit 0,100 ;
+Create view v1_1
+as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
+from tb2 limit 0,100 ;
+SELECT NewNameF1,f60 FROM test.v1_1 ;
+ERROR 42S22: Unknown column 'f60' in 'field list'
+SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
+ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
+SELECT f59, f60 FROM test.v1 ;
+ERROR 42S22: Unknown column 'f59' in 'field list'
+Use test ;
+SELECT F59 FROM v1 ;
+ERROR 42S22: Unknown column 'F59' in 'field list'
+
+Testcase 3.3.1.19
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1, t2;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
+INSERT INTO t1 VALUES(7, 7.7);
+CREATE TABLE t2( f1 BIGINT, f2 DECIMAL(5,2));
+INSERT INTO t2 VALUES(6, 6.6);
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1;
+f1 f2
+7 7.70
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1;
+SELECT * FROM v1;
+f1 f2
+7 7.70
+CREATE OR REPLACE VIEW v1 AS SELECT f1 AS my_f1, f2 AS my_f2 FROM t1;
+SELECT * FROM v1;
+my_f1 my_f2
+7 7.70
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
+SELECT * FROM v1;
+my_f1 my_f2
+7 7.70
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT t1.f1, t2.f2 FROM t1, t2;
+SELECT * FROM v1;
+my_f1 my_f2
+7 6.60
+SELECT f1, f2 AS f1 FROM t1;
+f1 f1
+7 7.70
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1;
+ERROR 42S21: Duplicate column name 'f1'
+SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
+f1 f1
+7 6
+CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
+ERROR 42S21: Duplicate column name 'f1'
+CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1;
+ERROR 42S21: Duplicate column name 'my_col'
+
+Testcase 3.3.1.20
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT * FROM t1;
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
+CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT * FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT f1, f2 FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT * FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+
+Testcase 3.3.1.21
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1;
+CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2;
+SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2;
+F59 F60
+1 1
+2 2
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.22
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1;
+CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 WHERE f59 < 3;
+SELECT * FROM test.v1;
+product
+1
+4
+CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
+SELECT * FROM test.v1;
+product
+2
+CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
+SELECT * FROM test.v1;
+product
+root@localhost
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.23 + 3.3.1.24
+--------------------------------------------------------------------------------
+USE test;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+CREATE VIEW test.v2 AS SELECT * FROM test.t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+CREATE VIEW v2 AS Select * from test.v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+DROP VIEW IF EXISTS v2;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v2'
+
+Testcase 3.3.1.25
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1_temp;
+DROP TABLE IF EXISTS t2_temp;
+DROP VIEW IF EXISTS v1;
+Create table t1_temp(f59 char(10),f60 int) ;
+Create temporary table t1_temp(f59 char(10),f60 int) ;
+Insert into t1_temp values('FER',90);
+Insert into t1_temp values('CAR',27);
+Create view v1 as select * from t1_temp ;
+ERROR HY000: View's SELECT refers to a temporary table 't1_temp'
+Create temporary table t2_temp(f59 char(10),f60 int) ;
+Insert into t2_temp values('AAA',11);
+Insert into t2_temp values('BBB',22);
+Create or replace view v1
+as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ;
+ERROR HY000: View's SELECT refers to a temporary table 't1_temp'
+DROP temporary table t1_temp;
+DROP table t1_temp;
+DROP temporary table t2_temp;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (f1 char(10));
+CREATE TEMPORARY TABLE t2 (f2 char(10));
+INSERT INTO t1 VALUES('t1');
+INSERT INTO t1 VALUES('A');
+INSERT INTO t2 VALUES('t2');
+INSERT INTO t2 VALUES('B');
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2, t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1, t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2 UNION SELECT * FROM t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
+WHERE f2 = ( SELECT f1 FROM t1 );
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1
+WHERE f1 = ( SELECT f2 FROM t2 );
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+DROP TABLE t1;
+DROP TEMPORARY TABLE t2;
+
+Testcase 3.3.1.26
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1;
+Create view test.v1 AS Select * from test.tb2;
+Select * from test.v1;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+Drop view test.v1 ;
+
+Testcase 3.3.1.27
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS test.v1;
+Drop VIEW IF EXISTS test.v1_1 ;
+Create view test.v1 AS Select * from test.tb2;
+Create view test.v1_1 AS Select F59 from test.v1 ;
+Select * from test.v1_1 order by F59 limit 2;
+F59
+1
+2
+Drop view test.v1 ;
+Drop view test.v1_1 ;
+
+Testcase 3.3.1.28
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+create database test2 ;
+Create view test2.v2 AS Select * from test.tb2 limit 50,50;
+use test2 ;
+Create view v1 AS Select * from test.tb2 limit 50 ;
+Select * from v1 order by f59,f60,f61,f62,f63,f64,f65;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 4
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 4
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+Select * from test2.v2 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+Drop view if exists test2.v1 ;
+Drop view if exists test2.v2 ;
+Drop database test2 ;
+
+Testcase 3.3.1.29
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+Drop view if exists test.v1 ;
+create database test2 ;
+use test2;
+Create view test.v1 AS Select * from test.tb2 limit 50 ;
+Create view test2.v2 AS Select F59 from test.v1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test2.v2 ;
+
+Testcase 3.3.1.31
+--------------------------------------------------------------------------------
+Drop table if exists test.t1 ;
+CREATE TABLE test.t1 ( f59 int, f60 int );
+INSERT INTO test.t1 VALUES( 34, 654 );
+INSERT INTO test.t1 VALUES( 906, 434 );
+INSERT INTO test.t1 VALUES( 445, 765 );
+Create or replace view test.v1
+AS SELECT test.t1.F59, test.tb2.F60
+FROM test.tb2 JOIN test.t1 ON test.tb2.F59 = test.t1.F59 ;
+Select * from test.v1;
+F59 F60
+34 41
+Drop view test.v1 ;
+
+Testcase 3.3.1.32
+--------------------------------------------------------------------------------
+Drop table if exists test.t1 ;
+Drop database if exists test2 ;
+Drop view if exists test.v1 ;
+create database test2 ;
+use test2 ;
+CREATE TABLE t1 ( f59 int, f60 int );
+INSERT INTO t1 VALUES( 34, 654 );
+INSERT INTO t1 VALUES( 906, 434 );
+INSERT INTO t1 VALUES( 445, 765 );
+CREATE VIEW test2.v1
+AS SELECT test.tb2.F59, test.tb2.F60
+FROM test.tb2 INNER JOIN test2.t1 ON tb2.f59 = t1.f59;
+Select * from test2.v1;
+F59 F60
+34 41
+Use test;
+
+Testcase 3.3.1.33
+--------------------------------------------------------------------------------
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1
+AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
+FROM test.v1_firstview INNER JOIN test.v1_secondview
+ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
+SELECT * FROM test.v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.34
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+create database test2 ;
+use test2 ;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2 ;
+CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2 ;
+CREATE VIEW v1
+AS SELECT test.v1_firstview.F59, test.v1_firstview.F60
+FROM test.v1_firstview INNER JOIN test.v1_secondview
+ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+F59 F60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop view v1 ;
+Drop view test.v1_firstview ;
+Drop view test.v1_secondview ;
+
+Testcase 3.3.1.35
+--------------------------------------------------------------------------------
+use test;
+Drop view if exists test.v1;
+Drop view if exists test.v1_firstview;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1
+AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
+FROM test.v1_firstview INNER JOIN test.tb2
+ON test.v1_firstview.f59 = test.tb2.f59;
+SELECT * FROM test.v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop view test.v1 ;
+Drop view test.v1_firstview;
+
+Testcase 3.3.1.36
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+create database test2 ;
+use test2 ;
+CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ;
+CREATE VIEW v1
+AS SELECT v1_firstview.f59, v1_firstview.f60
+FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop database test2 ;
+
+Testcase 3.3.1.37
+--------------------------------------------------------------------------------
+use test;
+Drop table if exists t1;
+Drop view if exists test.v1 ;
+Drop view if exists test.v1_1 ;
+Drop view if exists test.v1_1 ;
+Drop view if exists test.v1_main ;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 74
+5 5
+6 6
+7 7
+8 8
+9 9
+Create table t1(f59 int, f60 int);
+Insert into t1 values (90,507) ;
+Create view v1_1 as Select f59,f60 from t1 ;
+Select * from v1_1 ;
+f59 f60
+90 507
+Create view v1_main
+as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1
+ON test.tb2.f59 = test.v1.f59;
+Select * from v1_main order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+4
+4
+4
+5
+6
+7
+Drop table t1;
+Drop view test.v1 ;
+Drop view test.v1_1 ;
+Drop view test.v1_main ;
+
+Testcase 3.3.1.31 - 3.3.1.37 New Implementation
+--------------------------------------------------------------------------------
+USE test;
+DROP DATABASE IF EXISTS test2;
+DROP TABLE IF EXISTS t0,t1;
+DROP VIEW IF EXISTS t3,t4;
+CREATE DATABASE test2;
+CREATE TABLE test1.t0 (f1 VARCHAR(20));
+CREATE TABLE test1.t1 (f1 VARCHAR(20));
+CREATE TABLE test2.t0 (f1 VARCHAR(20));
+CREATE TABLE test2.t1 (f1 VARCHAR(20));
+CREATE VIEW test1.t2 AS SELECT * FROM test1.t0;
+CREATE VIEW test1.t3 AS SELECT * FROM test2.t0;
+CREATE VIEW test2.t2 AS SELECT * FROM test2.t0;
+CREATE VIEW test2.t3 AS SELECT * FROM test1.t0;
+INSERT INTO test1.t0 VALUES('test1.t0');
+INSERT INTO test1.t1 VALUES('test1.t1');
+INSERT INTO test2.t0 VALUES('test2.t0');
+INSERT INTO test2.t1 VALUES('test2.t1');
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test1.t1
+
+Testcase 3.3.1.38
+--------------------------------------------------------------------------------
+Drop table if exists test1.t1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test.v1_main;
+Drop view if exists test1.v1_1 ;
+Drop database if exists test3 ;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 20;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 74
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+15 87
+17 15
+19 18
+22 93
+24 51654
+27 25
+29 28
+34 41
+94 74
+Create table test1.t1 (f59 int,f60 int) ;
+Insert into test1.t1 values (199,507) ;
+Create view test1.v1_1 as Select f59,f60 from test1.t1 ;
+Select * from test1.v1_1 ;
+f59 f60
+199 507
+Create database test3 ;
+Create table test3.t1(f59 int,f60 int) ;
+Insert into test3.t1 values (1023,7670) ;
+Create view test3.v1_2 as Select f59,f60 from test3.t1 ;
+Select * from test3.v1_2 ;
+f59 f60
+1023 7670
+use test ;
+Create view v1_main
+as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2,
+test3.v1_2.f59 as f3
+FROM (test.tb2,test1.v1_1,test.v1) JOIN test3.v1_2
+ON (test.v1.f59 = test1.v1_1.f59) ;
+Select * from v1_main ;
+f1 f2 f3
+DROP VIEW test.v1 ;
+DROP VIEW test1.v1_1 ;
+DROP VIEW test.v1_main ;
+DROP DATABASE test3;
+
+Testcase 3.3.1.39
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1
+AS Select f59 from (Select * FROM tb2 limit 20) tx ;
+DROP VIEW test.v1;
+SELECT * FROM test.v1 order by f59 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.40
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Set @var1 = 'ABC' ;
+Set @var2 = 'XYZ' ;
+CREATE VIEW test.v1 AS SELECT @var1, @var2 ;
+ERROR HY000: View's SELECT contains a variable or parameter
+CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size;
+ERROR HY000: View's SELECT contains a variable or parameter
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.41
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Drop procedure if exists sp1 ;
+Create procedure sp1() DETERMINISTIC
+Begin
+DECLARE x char;
+Set x = 200 ;
+Create view test.v1 as SELECT * FROM tb2 WHERE f59 = x ;
+End //
+ERROR HY000: View's SELECT contains a variable or parameter
+Call sp1() ;
+ERROR 42000: PROCEDURE test.sp1 does not exist
+Drop view if exists test.v1 ;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v1'
+Drop procedure sp1 ;
+ERROR 42000: PROCEDURE test.sp1 does not exist
+
+Testcase 3.3.1.42
+--------------------------------------------------------------------------------
+Drop VIEW if exists test.v1 ;
+CREATE TEMPORARY VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2 ;
+ERROR 42000: 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 'VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2' at line 1
+CREATE OR REPLACE TEMPORARY VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2 ;
+ERROR 42000: 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 'VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2' at line 1
+Drop view if exists test.v1 ;
+Use test;
+
+Testcase 3.3.1.43
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2;
+INSERT INTO test.v1 values(122,432);
+SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20;
+f59 122
+f60 432
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ;
+SELECT * FROM test.tb2 where f59 = 3000 limit 0,20;
+f59 3000
+f60 432
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+DELETE FROM test.v1
+where test.v1.f59 = 3000 and test.v1.f60 = 432;
+SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+drop view test.v1 ;
+
+Testcase 3.3.1.44
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100;
+INSERT INTO test.v1 values(31, 32, 33) ;
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+Drop view test.v1 ;
+
+Testcase 3.3.1.45
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04;
+UPDATE test.v1 SET f59 = 30 where F59 = 04 ;
+affected rows: 2
+info: Rows matched: 2 Changed: 2 Warnings: 0
+SELECT * FROM test.v1 where f59 = 30 order by f59;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+SELECT * FROM test.tb2 where f59 = 30 ;
+f59 30
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 30
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+UPDATE tb2 SET f59 = 100 where f59 = 30 ;
+affected rows: 2
+info: Rows matched: 2 Changed: 2 Warnings: 0
+SELECT * FROM tb2 where f59 = 100 ;
+f59 100
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 100
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+SELECT * FROM test.v1 order by f59 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+drop view if exists test.v1 ;
+Drop TABLE IF EXISTS test.t1 ;
+Drop VIEW IF EXISTS test.v1 ;
+CREATE TABLE t1 (f1 BIGINT, f2 VARCHAR(20), PRIMARY KEY(f1))
+ENGINE = memory;
+INSERT INTO t1 VALUES(1,'one');
+INSERT INTO t1 VALUES(2,'two');
+INSERT INTO t1 VALUES(3,'three');
+INSERT INTO t1 VALUES(5,'five');
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 BETWEEN 2 AND 4;
+SELECT COUNT(*) FROM v1 WHERE f1 = 2;
+COUNT(*)
+1
+SELECT COUNT(*) FROM v1 WHERE f1 = 4;
+COUNT(*)
+0
+SELECT COUNT(*) FROM v1 WHERE f1 = 5;
+COUNT(*)
+0
+SELECT COUNT(*) FROM v1 WHERE f1 = 10;
+COUNT(*)
+0
+INSERT INTO t1 VALUES(4,'four');
+DELETE FROM v1 WHERE f1 = 3;
+affected rows: 1
+DELETE FROM v1 WHERE f1 = 5;
+affected rows: 0
+SELECT * FROM t1 ORDER BY f1;
+f1 f2
+1 one
+2 two
+4 four
+5 five
+SELECT * FROM v1 ORDER BY f1;
+f1 f2
+2 two
+4 four
+INSERT INTO v1 VALUES(2,'two');
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+INSERT INTO v1 VALUES(3,'three');
+affected rows: 1
+INSERT INTO v1 VALUES(6,'six');
+affected rows: 1
+SELECT * FROM t1 ORDER BY f1;
+f1 f2
+1 one
+2 two
+3 three
+4 four
+5 five
+6 six
+SELECT * FROM v1 ORDER BY f1;
+f1 f2
+2 two
+3 three
+4 four
+UPDATE v1 SET f1 = 2 WHERE f1 = 3;
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+UPDATE v1 SET f2 = 'number' WHERE f1 = 3;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+UPDATE v1 SET f1 = 10 WHERE f1 = 3;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+UPDATE v1 SET f2 = 'number' WHERE f1 = 1;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+
+Testcase 3.3.1.46
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60
+FROM test.tb2 where f59 = 195 WITH CHECK OPTION ;
+UPDATE test.v1 SET f59 = 198 where f59=195 ;
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+SELECT * FROM test.v1 order by f59 ;
+f59 f60
+195 87
+drop view if exists test.v1 ;
+
+Testcase 3.3.1.47
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Drop view if exists test.v2 ;
+CREATE VIEW test.v1 AS SELECT f59,f60
+FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ;
+CREATE VIEW test.v2 as SELECT * FROM test.v1 ;
+UPDATE test.v1 SET F59 = 919 where f59 = 0987 ;
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+SELECT * FROM test.v1 order by f59 ;
+f59 f60
+987 41
+UPDATE test.v2 SET F59 = 9879 where f59 = 919 ;
+SELECT * FROM tb2 where f59 = 9879 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+drop view if exists v1 ;
+drop view if exists v2 ;
+
+Testcase 3.3.1.48
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS test.t1;
+DROP VIEW IF EXISTS test.v1;
+CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER)
+ENGINE = memory;
+INSERT INTO t1 VALUES ('A', 1);
+SELECT * FROM t1 order by f1, f2;
+f1 f2
+A 1
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2
+WITH CASCADED CHECK OPTION ;
+SELECT * FROM v1 order by f1, f2;
+f1 f2
+A 1
+UPDATE v1 SET f2 = 2 WHERE f2 = 1;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+INSERT INTO v1 VALUES('B',2);
+affected rows: 1
+SELECT * FROM v1 order by f1, f2;
+f1 f2
+A 2
+B 2
+UPDATE v1 SET f2 = 4;
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+INSERT INTO v1 VALUES('B',3);
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+SELECT * FROM v1 order by f1, f2;
+f1 f2
+A 2
+B 2
+
+Testcase 3.3.1.49
+--------------------------------------------------------------------------------
+Drop table if exists test.t1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test.v2 ;
+Drop view if exists test.v3 ;
+Create table test.t1 (f59 INT, f60 INT) ;
+Insert into test.t1 values (100,4234);
+Insert into test.t1 values (290,6624);
+Insert into test.t1 values (410,765);
+Insert into test.t1 values (300,433334);
+Insert into test.t1 values (800,9788);
+Insert into test.t1 values (501,9866);
+Create view test.v1 as select f59
+FROM test.t1 where f59<500 with check option ;
+Create view test.v2 as select *
+from test.v1 where f59>0 with local check option ;
+Create view test.v3 as select *
+from test.v1 where f59>0 with cascaded check option ;
+Insert into test.v2 values(23) ;
+Insert into test.v3 values(24) ;
+drop view if exists test.v1 ;
+drop view if exists test.v2 ;
+drop view if exists test.v3 ;
+
+Testcase 3.3.1.49A
+--------------------------------------------------------------------------------
+USE test;
+DROP TABLE IF EXISTS test.t1 ;
+DROP TABLE IF EXISTS test.t1_results ;
+DROP VIEW IF EXISTS test.v1;
+DROP VIEW IF EXISTS test.v2;
+DROP VIEW IF EXISTS test.v3;
+CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20));
+CREATE TABLE t1_results (v3_to_v1_options VARCHAR(100), statement VARCHAR(10),
+v3_to_v1_violation VARCHAR(20), errno CHAR(10));
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH LOCAL CHECK OPTION ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CASCADED CHECK OPTION ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CHECK OPTION ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+SELECT * FROM t1_results ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+ <nothing> - <nothing> - <nothing> UPDATE _v2_ 0
+ <nothing> - <nothing> - <nothing> INSERT _v2_ 0
+ <nothing> - <nothing> - <nothing> INSERT _ _v1 0
+ <nothing> - <nothing> - <nothing> UPDATE _ _ 0
+ <nothing> - <nothing> - <nothing> UPDATE _ _v1 0
+ <nothing> - <nothing> - <nothing> UPDATE v3_ _ 0
+ <nothing> - <nothing> - <nothing> INSERT _ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - <nothing> - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE _v2_ 0
+ <nothing> - WITH CHECK OPTION - <nothing> INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - <nothing> INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - <nothing> - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+
+Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above).
+All following SELECTs must give ROW NOT FOUND
+--------------------------------------------------------------------------------
+SELECT * FROM t1_results
+WHERE v3_to_v1_violation = ' _ _ ' AND errno <> 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE ' %' AND errno <> 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE 'WITH %'
+ AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %'
+ AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE errno <> 0 AND errno <> 1369
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+
+End of plausibility checks
+--------------------------------------------------------------------------------
+DROP TABLE t1_results;
+
+Testcase 3.3.1.50 - 3.3.1.53
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS test.v1;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f60,f61 ;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 100
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 100
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+drop view test.v1 ;
+CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2;
+SELECT * FROM test.v1 order by F59, F61 limit 50;
+F59 F61
+1 0000000001
+2 0000000002
+3 0000000003
+5 0000000005
+6 0000000006
+7 0000000007
+8 0000000008
+9 0000000009
+10 0000000010
+15 NULL
+17 0000000016
+19 0000000014
+22 NULL
+24 NULL
+27 0000000026
+29 0000000024
+34 NULL
+94 NULL
+100 NULL
+100 0000000004
+107 0000000106
+107 0000000106
+109 0000000104
+109 0000000104
+195 NULL
+207 0000000206
+209 0000000204
+242 NULL
+250 NULL
+292 NULL
+299 NULL
+321 0000000765
+323 NULL
+340 NULL
+394 NULL
+424 NULL
+441 NULL
+500 0000000900
+500 0000000900
+500 0000000900
+660 NULL
+987 NULL
+2550 NULL
+2760 NULL
+3330 NULL
+3410 NULL
+7876 NULL
+9112 0000008771
+76710 NULL
+569300 NULL
+drop view test.v1 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61;
+SELECT * FROM test.v1 order by f59,f60,f61 ;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 100
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f59 100
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+drop view test.v1 ;
+CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f61 desc limit 20;
+F59 f61
+1 0000000001
+2 0000000002
+3 0000000003
+5 0000000005
+6 0000000006
+7 0000000007
+8 0000000008
+9 0000000009
+10 0000000010
+15 NULL
+17 0000000016
+19 0000000014
+22 NULL
+24 NULL
+27 0000000026
+29 0000000024
+34 NULL
+94 NULL
+100 0000000004
+100 NULL
+drop view test.v1 ;
+
+Testcase 3.3.1.54
+--------------------------------------------------------------------------------
+USE test;
+drop table if exists test.t1 ;
+drop table if exists test.t2 ;
+drop view if exists test.v1 ;
+Create table t1 (f59 int, f60 int) ;
+Create table t2 (f59 int, f60 int) ;
+Insert into t1 values (1,10) ;
+Insert into t1 values (2,20) ;
+Insert into t1 values (47,80) ;
+Insert into t2 values (1,1000) ;
+Insert into t2 values (2,2000) ;
+Insert into t2 values (31,97) ;
+Create view test.v1 as select t1.f59, t1.f60
+from t1,t2 where t1.f59=t2.f59 ;
+Select * from test.v1 order by f59 limit 50 ;
+f59 f60
+1 10
+2 20
+drop table test.t1 ;
+drop table test.t2 ;
+drop view test.v1 ;
+
+Testcase 3.3.1.50 - 3.3.1.54 additional implementation
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 ( f1 BIGINT, f2 char(10), f3 DECIMAL(10,5) );
+INSERT INTO t1 VALUES(1, 'one', 1.1);
+INSERT INTO t1 VALUES(2, 'two', 2.2);
+INSERT INTO t1 VALUES(3, 'three', 3.3);
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1;
+f1 f2 f3
+1 one 1.10000
+2 two 2.20000
+3 three 3.30000
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1;
+SELECT * FROM v1;
+f2
+one
+two
+three
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE f3 = 2.2;
+SELECT * FROM v1;
+f1 f2 f3
+2 two 2.20000
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1 WHERE f3 = 2.2;
+SELECT * FROM v1;
+f2
+two
+SET sql_mode = 'traditional,ansi';
+CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
+FROM t1 WHERE f1 = 2;
+CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
+FROM t1 WHERE f1 = 2;
+ERROR 42000: Incorrect column name 'pure column f3: '
+SELECT * FROM v1;
+pure column f3: 2.20000
+sum of columns f1 + f3 = 4.20000
+product of constants 3 * (- 0.11111E+1): -3.3333
+expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
+SET sql_mode = '';
+
+Testcases 3.3.1.55 - 3.3.1.62
+--------------------------------------------------------------------------------
+Drop table if exists t1, t2 ;
+Drop view if exists v1 ;
+Create table t1 (f59 int, f60 char(10), f61 int, a char(1)) ;
+Insert into t1 values (1, 'single', 3, '1') ;
+Insert into t1 values (2, 'double', 6, '2') ;
+Insert into t1 values (3, 'single-f3', 4, '3') ;
+Create table t2 (f59 int, f60 char(10), f61 int, b char(1)) ;
+Insert into t2 values (2, 'double', 6, '2') ;
+Insert into t2 values (3, 'single-f3', 6, '3') ;
+Insert into t2 values (4, 'single', 4, '4') ;
+create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+from t1 inner join t2 where t1.f59 = t2.f59 ;
+select * from test.v1 order by t1_f59 ;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+from t1 inner join t2 where t1.f59 = t2.f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Create or replace view test.v1 as
+Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2 cross join t1;
+Select * from v1 order by t1_f59,t2_f59;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2 cross join t1;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Create or replace view test.v1 as
+Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2,t1;
+Select * from v1 order by t1_f59,t2_f59;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2,t1;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Create or replace view test.v1 as
+Select f59, f60, f61, a, b
+FROM t2 natural join t1;
+Select * from v1 order by f59;
+f59 f60 f61 a b
+2 double 6 2 2
+Select f59, f60, f61, a, b
+FROM t2 natural join t1;
+f59 f60 f61 a b
+2 double 6 2 2
+Create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 left outer join t1 on t2.f59=t1.f59;
+Select * from v1 order by t1_f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+NULL 4 NULL single NULL 4
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 left outer join t1 on t2.f59=t1.f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+NULL 4 NULL single NULL 4
+Create or replace view test.v1 as
+Select f59, f60, f61, t1.a, t2.b
+FROM t2 natural left outer join t1;
+Select * from v1 order by f59;
+f59 f60 f61 a b
+2 double 6 2 2
+3 single-f3 6 NULL 3
+4 single 4 NULL 4
+Select f59, f60, f61, t1.a, t2.b
+FROM t2 natural left outer join t1;
+f59 f60 f61 a b
+2 double 6 2 2
+3 single-f3 6 NULL 3
+4 single 4 NULL 4
+set @save_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='outer_join_with_cache=off';
+Create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 right outer join t1 on t2.f59=t1.f59;
+Select * from v1 order by t1_f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+1 NULL single NULL 3 NULL
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 right outer join t1 on t2.f59=t1.f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+1 NULL single NULL 3 NULL
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Create or replace view test.v1 as
+Select f59, f60, a, b
+FROM t2 natural right outer join t1;
+Select * from v1 order by f59 desc;
+f59 f60 a b
+3 single-f3 3 NULL
+2 double 2 2
+1 single 1 NULL
+Select f59, f60, a, b
+FROM t2 natural right outer join t1;
+f59 f60 a b
+1 single 1 NULL
+2 double 2 2
+3 single-f3 3 NULL
+set optimizer_switch=@save_optimizer_switch;
+drop table t1, t2;
+drop view v1 ;
+Use test;
+
+Testcase 3.3.1.A1 - 3.3.1.A3
+--------------------------------------------------------------------------------
+Drop table if exists t1 ;
+Drop view if exists v1;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (101,201,301) ;
+Insert into t1 values (107,501,601) ;
+Insert into t1 values (901,801,401) ;
+Create or replace view test.v1 as
+Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+5
+6
+7
+8
+9
+10
+15
+Drop view if exists test.v1 ;
+Drop table if exists t1 ;
+Drop view if exists v1;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (201,201,201) ;
+Insert into t1 values (207,201,201) ;
+Insert into t1 values (201,201,201) ;
+Create or replace view test.v1
+as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+f59
+207
+Drop view if exists test.v1 ;
+Drop table if exists t1 ;
+Drop view if exists v1;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (21,21,21) ;
+Insert into t1 values (27,21,21) ;
+Insert into t1 values (21,21,21) ;
+Create or replace view test.v1
+as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+f59
+27
+Drop view test.v1 ;
+
+Testcase 3.3.1.63
+--------------------------------------------------------------------------------
+Drop table if exists t1 ;
+Drop view if exists test.v1 ;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (11,21,31) ;
+Insert into t1 values (17,51,61) ;
+Insert into t1 values (91,81,41) ;
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union ALL (Select f59 from t1 where f59=17 );
+Select * from test.v1 order by f59 limit 0,10;
+f59
+17
+17
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union (Select f59 from t1 where f59=17 );
+Select * from test.v1 order by f59 limit 0,10;
+f59
+17
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union Distinct (Select f59 from t1 where f60=17 );
+Select * from test.v1 order by f59 limit 0,10;
+f59
+17
+Drop view test.v1 ;
+drop table if exists t1;
+drop view if exists test.v1;
+create table t1 (f59 int, f60 int, f61 int);
+insert into t1 values (101,201,301);
+insert into t1 values (107,501,601);
+insert into t1 values (901,801,401);
+create or replace view test.v1 as
+select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59;
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+107
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union all
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+107
+107
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union distinct
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+drop view if exists test.v1 ;
+drop table t1;
+
+Testcase 3.3.1.64
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT F59
+FROM test.tb2 where test.tb2.F59 = 109;
+SELECT * FROM test.v1 order by f59 limit 0,10;
+F59
+109
+109
+ALTER VIEW test.v1 AS SELECT *
+FROM test.tb2 WHERE test.tb2.f59 = 242 ;
+SELECT * FROM test.v1 order by f59 limit 0,10;
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+Drop view test.v1 ;
+
+Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS test.v1 ;
+CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = memory ;
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+DROP VIEW v1;
+DROP VIEW v1;
+ERROR 42S02: Unknown VIEW: 'test.v1'
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v1;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v1'
+
+Testcase 3.3.1.68
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1_base ;
+DROP VIEW IF EXISTS v1_top ;
+CREATE TABLE t1 ( f1 DOUBLE);
+CREATE VIEW v1_base AS SELECT * FROM t1;
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_top ;
+DROP VIEW v1_top;
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_base ;
+DROP VIEW v1_base;
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
+DROP VIEW v1_top;
+CREATE VIEW v1_base AS SELECT * FROM t1;
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_top CASCADE ;
+DROP VIEW v1_top;
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_base CASCADE ;
+DROP VIEW v1_base;
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
+DROP VIEW v1_top;
+CREATE VIEW v1_base AS SELECT * FROM t1;
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_top RESTRICT ;
+DROP VIEW v1_top;
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_base RESTRICT ;
+DROP VIEW v1_base;
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
+DROP VIEW v1_top;
+
+Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ENGINE = memory;
+CREATE VIEW v1 AS SELECT * FROM t1;
+DROP VIEW v1 ;
+SELECT * FROM v1 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW CREATE VIEW v1 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW CREATE TABLE v1 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW TABLE STATUS like 'v1' ;
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+SHOW TABLES LIKE 'v1';
+Tables_in_test (v1)
+SHOW COLUMNS FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW FIELDS FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+CHECK TABLE v1;
+Table Op Msg_type Msg_text
+test.v1 check Error Table 'test.v1' doesn't exist
+test.v1 check status Operation failed
+DESCRIBE v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+EXPLAIN SELECT * FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+Use test;
+
+Testcase 3.3.1.A6
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS test3;
+CREATE DATABASE test3;
+CREATE TABLE test3.t1 (f1 DECIMAL(5,3)) ENGINE = memory;
+INSERT INTO test3.t1 SET f1 = 1.0;
+CREATE VIEW test3.v0 AS SELECT * FROM test3.t1;
+CREATE VIEW test3.v1 AS SELECT * FROM test3.v0;
+CREATE VIEW test3.v2 AS SELECT * FROM test3.v1;
+CREATE VIEW test3.v3 AS SELECT * FROM test3.v2;
+CREATE VIEW test3.v4 AS SELECT * FROM test3.v3;
+CREATE VIEW test3.v5 AS SELECT * FROM test3.v4;
+CREATE VIEW test3.v6 AS SELECT * FROM test3.v5;
+CREATE VIEW test3.v7 AS SELECT * FROM test3.v6;
+CREATE VIEW test3.v8 AS SELECT * FROM test3.v7;
+CREATE VIEW test3.v9 AS SELECT * FROM test3.v8;
+CREATE VIEW test3.v10 AS SELECT * FROM test3.v9;
+CREATE VIEW test3.v11 AS SELECT * FROM test3.v10;
+CREATE VIEW test3.v12 AS SELECT * FROM test3.v11;
+CREATE VIEW test3.v13 AS SELECT * FROM test3.v12;
+CREATE VIEW test3.v14 AS SELECT * FROM test3.v13;
+CREATE VIEW test3.v15 AS SELECT * FROM test3.v14;
+CREATE VIEW test3.v16 AS SELECT * FROM test3.v15;
+CREATE VIEW test3.v17 AS SELECT * FROM test3.v16;
+CREATE VIEW test3.v18 AS SELECT * FROM test3.v17;
+CREATE VIEW test3.v19 AS SELECT * FROM test3.v18;
+CREATE VIEW test3.v20 AS SELECT * FROM test3.v19;
+CREATE VIEW test3.v21 AS SELECT * FROM test3.v20;
+CREATE VIEW test3.v22 AS SELECT * FROM test3.v21;
+CREATE VIEW test3.v23 AS SELECT * FROM test3.v22;
+CREATE VIEW test3.v24 AS SELECT * FROM test3.v23;
+CREATE VIEW test3.v25 AS SELECT * FROM test3.v24;
+CREATE VIEW test3.v26 AS SELECT * FROM test3.v25;
+CREATE VIEW test3.v27 AS SELECT * FROM test3.v26;
+CREATE VIEW test3.v28 AS SELECT * FROM test3.v27;
+CREATE VIEW test3.v29 AS SELECT * FROM test3.v28;
+CREATE VIEW test3.v30 AS SELECT * FROM test3.v29;
+CREATE VIEW test3.v31 AS SELECT * FROM test3.v30;
+CREATE VIEW test3.v32 AS SELECT * FROM test3.v31;
+SHOW CREATE VIEW test3.v32;
+View Create View character_set_client collation_connection
+v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
+SELECT * FROM test3.v32;
+f1
+1.000
+EXPLAIN SELECT * FROM test3.v32;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 1
+DROP VIEW test3.v0;
+SHOW CREATE VIEW test3.v32;
+View Create View character_set_client collation_connection
+v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
+Warnings:
+Warning 1356 View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM test3.v32;
+ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+EXPLAIN SELECT * FROM test3.v32;
+ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+
+FIXME - Setting join_limit to 28 - hangs for higher values
+----------------------------------------------------------
+SET @join_limit = 28;
+SET @max_level = @join_limit - 1;
+DROP DATABASE IF EXISTS test3;
+DROP TABLE IF EXISTS test1.t1;
+DROP TABLE IF EXISTS test2.t1;
+DROP VIEW IF EXISTS test1.v27;
+DROP VIEW IF EXISTS test1.v26;
+DROP VIEW IF EXISTS test1.v25;
+DROP VIEW IF EXISTS test1.v24;
+DROP VIEW IF EXISTS test1.v23;
+DROP VIEW IF EXISTS test1.v22;
+DROP VIEW IF EXISTS test1.v21;
+DROP VIEW IF EXISTS test1.v20;
+DROP VIEW IF EXISTS test1.v19;
+DROP VIEW IF EXISTS test1.v18;
+DROP VIEW IF EXISTS test1.v17;
+DROP VIEW IF EXISTS test1.v16;
+DROP VIEW IF EXISTS test1.v15;
+DROP VIEW IF EXISTS test1.v14;
+DROP VIEW IF EXISTS test1.v13;
+DROP VIEW IF EXISTS test1.v12;
+DROP VIEW IF EXISTS test1.v11;
+DROP VIEW IF EXISTS test1.v10;
+DROP VIEW IF EXISTS test1.v9;
+DROP VIEW IF EXISTS test1.v8;
+DROP VIEW IF EXISTS test1.v7;
+DROP VIEW IF EXISTS test1.v6;
+DROP VIEW IF EXISTS test1.v5;
+DROP VIEW IF EXISTS test1.v4;
+DROP VIEW IF EXISTS test1.v3;
+DROP VIEW IF EXISTS test1.v2;
+DROP VIEW IF EXISTS test1.v1;
+DROP VIEW IF EXISTS test1.v0;
+CREATE DATABASE test3;
+USE test1;
+CREATE TABLE t1 (f1 BIGINT, f2 CHAR(50)) ENGINE = memory ;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (0, NULL);
+INSERT INTO t1 VALUES (5, 'five');
+INSERT INTO t1 VALUES (1, 'one');
+INSERT INTO t1 VALUES (2, 'two');
+USE test2;
+CREATE TABLE t1 (f1 DECIMAL(64,30), f2 VARCHAR(50)) ENGINE = memory;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (0.000000000000000000000000000000, NULL);
+INSERT INTO t1 VALUES (5.000000000000000000000000000000, 'five');
+INSERT INTO t1 VALUES (+1.000000000000000000000000000000, 'one');
+INSERT INTO t1 VALUES (3.000000000000000, 'three');
+USE test3;
+CREATE TABLE t1 (f1 DOUBLE, f2 VARBINARY(50)) ENGINE = memory;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (+0.0E-35, NULL);
+INSERT INTO t1 VALUES (+0.5E+1, 'five');
+INSERT INTO t1 VALUES (20.0E-1, 'two');
+INSERT INTO t1 VALUES (0.0300E2, 'three');
+USE test;
+CREATE OR REPLACE VIEW test1.v0 AS SELECT * FROM test2.t1;
+CREATE OR REPLACE VIEW test1.v1 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v0 tab2;
+CREATE OR REPLACE VIEW test1.v2 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v1 tab2;
+CREATE OR REPLACE VIEW test1.v3 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v2 tab2;
+CREATE OR REPLACE VIEW test1.v4 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v3 tab2;
+CREATE OR REPLACE VIEW test1.v5 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v4 tab2;
+CREATE OR REPLACE VIEW test1.v6 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v5 tab2;
+CREATE OR REPLACE VIEW test1.v7 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v6 tab2;
+CREATE OR REPLACE VIEW test1.v8 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v7 tab2;
+CREATE OR REPLACE VIEW test1.v9 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v8 tab2;
+CREATE OR REPLACE VIEW test1.v10 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v9 tab2;
+CREATE OR REPLACE VIEW test1.v11 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v10 tab2;
+CREATE OR REPLACE VIEW test1.v12 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v11 tab2;
+CREATE OR REPLACE VIEW test1.v13 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v12 tab2;
+CREATE OR REPLACE VIEW test1.v14 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v13 tab2;
+CREATE OR REPLACE VIEW test1.v15 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v14 tab2;
+CREATE OR REPLACE VIEW test1.v16 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v15 tab2;
+CREATE OR REPLACE VIEW test1.v17 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v16 tab2;
+CREATE OR REPLACE VIEW test1.v18 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v17 tab2;
+CREATE OR REPLACE VIEW test1.v19 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v18 tab2;
+CREATE OR REPLACE VIEW test1.v20 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v19 tab2;
+CREATE OR REPLACE VIEW test1.v21 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v20 tab2;
+CREATE OR REPLACE VIEW test1.v22 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v21 tab2;
+CREATE OR REPLACE VIEW test1.v23 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v22 tab2;
+CREATE OR REPLACE VIEW test1.v24 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v23 tab2;
+CREATE OR REPLACE VIEW test1.v25 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v24 tab2;
+CREATE OR REPLACE VIEW test1.v26 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v25 tab2;
+CREATE OR REPLACE VIEW test1.v27 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v26 tab2;
+SHOW CREATE VIEW test1.v27;
+View Create View character_set_client collation_connection
+v27 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v27` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test1`.`t1` `tab1` join `test1`.`v26` `tab2` on(`tab1`.`f1` = `tab2`.`f1` and `tab1`.`f2` = `tab2`.`f2`)) latin1 latin1_swedish_ci
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+f1 f2
+5 five
+
+The output of following EXPLAIN is deactivated, because the result
+differs on some platforms
+FIXME Is this a bug ?
+--------------------------------------------------------------------------------
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+CREATE VIEW test1.v28 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v27 tab2;
+SHOW CREATE VIEW test1.v28;
+View Create View character_set_client collation_connection
+v28 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v28` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v27` `tab2` on(`tab1`.`f1` = `tab2`.`f1` and `tab1`.`f2` = `tab2`.`f2`)) latin1 latin1_swedish_ci
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v28;
+f1 f2
+5 five
+
+The output of following EXPLAIN is deactivated, because the result
+differs on some platforms
+FIXME Is this a bug ?
+--------------------------------------------------------------------------------
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v28;
+DROP VIEW IF EXISTS test1.v28;
+CREATE OR REPLACE VIEW test1.v0 AS
+SELECT f1 as f2, f2 as f1 FROM test2.t1;
+CREATE OR REPLACE VIEW test2.v0 AS
+SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
+SHOW CREATE VIEW test1.v27;
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+CREATE OR REPLACE VIEW test3.v0 AS
+SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1;
+SHOW CREATE VIEW test1.v27;
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+CREATE OR REPLACE VIEW test3.v0 AS
+SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1;
+SHOW CREATE VIEW test1.v27;
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v27;
+DROP VIEW IF EXISTS test1.v27;
+DROP VIEW IF EXISTS test1.v26;
+DROP VIEW IF EXISTS test1.v25;
+DROP VIEW IF EXISTS test1.v24;
+DROP VIEW IF EXISTS test1.v23;
+DROP VIEW IF EXISTS test1.v22;
+DROP VIEW IF EXISTS test1.v21;
+DROP VIEW IF EXISTS test1.v20;
+DROP VIEW IF EXISTS test1.v19;
+DROP VIEW IF EXISTS test1.v18;
+DROP VIEW IF EXISTS test1.v17;
+DROP VIEW IF EXISTS test1.v16;
+DROP VIEW IF EXISTS test1.v15;
+DROP VIEW IF EXISTS test1.v14;
+DROP VIEW IF EXISTS test1.v13;
+DROP VIEW IF EXISTS test1.v12;
+DROP VIEW IF EXISTS test1.v11;
+DROP VIEW IF EXISTS test1.v10;
+DROP VIEW IF EXISTS test1.v9;
+DROP VIEW IF EXISTS test1.v8;
+DROP VIEW IF EXISTS test1.v7;
+DROP VIEW IF EXISTS test1.v6;
+DROP VIEW IF EXISTS test1.v5;
+DROP VIEW IF EXISTS test1.v4;
+DROP VIEW IF EXISTS test1.v3;
+DROP VIEW IF EXISTS test1.v2;
+DROP VIEW IF EXISTS test1.v1;
+DROP VIEW IF EXISTS test1.v0;
+DROP DATABASE test3;
+DROP TABLE test1.t1;
+DROP TABLE test2.t1;
+Use test;
+
+Testcase 3.3.2.1
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Create View test.v1 AS SELECT f59,f60 FROM tb2 where f59 = 1995 ;
+INSERT INTO test.v1 (f59,f60) values (879,700) ;
+affected rows: 1
+SELECT f59,f60 FROM test.v1 where f59 = 879 and f60 = 700 ;
+f59 f60
+DELETE FROM tb2 where f59 = 879 and f60 = 700 ;
+Drop view test.v1 ;
+
+Testcase 3.3.2.2
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ;
+affected rows: 1
+SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ;
+f59 2005
+f60 101
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ;
+f59 f60
+2005 101
+DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ;
+Drop view test.v1 ;
+
+Testcase 3.3.2.3
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (780,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM tb2 where f59 = 8 and f60 = 105;
+f59 8
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ;
+f59 f60
+8 105
+Drop view test.v1 ;
+
+Testcase 3.3.2.4
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (781,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ;
+affected rows: 4
+info: Rows matched: 4 Changed: 4 Warnings: 0
+SELECT * FROM tb2 where f59 = 891 and f60 = 105;
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ;
+f59 f60
+891 105
+891 105
+891 105
+891 105
+Drop view test.v1 ;
+
+Testcase 3.3.2.5
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (789,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ;
+DELETE FROM test.v1 where f59 = 789 ;
+affected rows: 1
+SELECT * FROM tb2 where f59 = 789 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ;
+f59 f60
+Drop view test.v1 ;
+
+Testcase 3.3.2.6
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (711,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 711 ;
+DELETE FROM test.v1 where f59 = 711 ;
+affected rows: 1
+SELECT * FROM tb2 where f59 = 711 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ;
+f59 f60
+Drop view test.v1 ;
+
+Testcase 3.3.2.1 - 3.3.2.6 alternative implementation
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 ( f1 BIGINT DEFAULT 0, f2 CHAR(20), f3 NUMERIC(7,4),
+f4 CHAR, PRIMARY KEY(f1));
+CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
+INSERT INTO v1 SET f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NULL NULL NULL
+DELETE FROM t1;
+INSERT INTO v1 SET f2 = 'ABC';
+INSERT INTO v1 SET f2 = 'ABC';
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SELECT * from t1;
+f1 f2 f3 f4
+0 ABC NULL NULL
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 NNN -0.0012 X
+DELETE FROM t1;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f2, f3 FROM t1;
+INSERT INTO v1 SET f2 = 'ABC';
+INSERT INTO v1 SET f2 = 'ABC';
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SELECT * from t1;
+f1 f2 f3 f4
+0 ABC NULL NULL
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1;
+INSERT INTO v1 SET f1 = 1;
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+SELECT * from t1;
+f1 f2 f3 f4
+DELETE FROM t1;
+INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO';
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+SELECT * from t1;
+f1 f2 f3 f4
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1;
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC';
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO';
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej';
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 NNN -0.0012 X
+DELETE FROM t1;
+DROP TABLE t1;
+SET sql_mode = 'traditional';
+CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4) NOT NULL,
+f4 CHAR, PRIMARY KEY(f1));
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1;
+INSERT INTO v1 SET f1 = 1;
+ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default value
+SELECT * from t1;
+f1 f2 f3 f4
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f1 = 1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f4 = 'Y' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 Y
+DELETE FROM t1;
+SET sql_mode = '';
+
+Testcases 3.3.2.7 - 3.3.2.9,
+3.3.2.10 - 3.3.2.11 omitted because of missing
+features EXCEPT and INTERSECT
+--------------------------------------------------------------------------------
+INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ;
+INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ;
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ;
+INSERT INTO t1 VALUES (19,41,32) ;
+INSERT INTO t1 VALUES (59,54,71) ;
+INSERT INTO t1 VALUES (21,91,99) ;
+SET @variant1 = 'UNION ';
+SET @variant2 = 'UNION ALL ';
+SET @variant3 = 'UNION DISTINCT ';
+SET @variant4 = 'EXCEPT ';
+SET @variant5 = 'INTERSECT ';
+CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION DISTINCT SELECT f61 FROM t1 WHERE f59=19;
+INSERT INTO v1 VALUES (3000);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1 ;
+CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION ALL SELECT f61 FROM t1 WHERE f59=19;
+INSERT INTO v1 VALUES (3000);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1 ;
+CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION SELECT f61 FROM t1 WHERE f59=19;
+INSERT INTO v1 VALUES (3000);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1 ;
+
+Testcases 3.3.2.12 - 3.3.2.20
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1, t2 ;
+DROP VIEW IF EXISTS test.v1 ;
+Drop view if exists v2 ;
+CREATE TABLE t1 (f59 int, f60 int, f61 int) ;
+INSERT INTO t1 VALUES (19,41,32) ;
+INSERT INTO t1 VALUES (59,54,71) ;
+INSERT INTO t1 VALUES (21,91,99) ;
+CREATE TABLE t2 (f59 int, f60 int, f61 int) ;
+INSERT INTO t2 VALUES (19,41,32) ;
+INSERT INTO t2 VALUES (59,54,71) ;
+INSERT INTO t2 VALUES (21,91,99) ;
+CREATE VIEW v2 AS SELECT f59, f60, f61 FROM t2 LIMIT 5;
+SET @variant1= 'CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1';
+SET @variant2= 'CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1';
+SET @variant3= 'CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1';
+SET @variant4= 'CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61';
+SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0';
+SET @variant6= 'CREATE VIEW v1 AS SELECT f61 FROM v2';
+SET @variant7= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
+SET @variant8= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1';
+CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f61 FROM v2;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: Column 'f61' is not updatable
+DELETE FROM v1;
+DROP VIEW v1;
+Drop TABLE t1, t2 ;
+Drop VIEW v2 ;
+
+Testcases 3.3.A1
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+CREATE TABLE t1 (f1 BIGINT, f2 DATE DEFAULT NULL, f4 CHAR(5),
+report char(10)) ENGINE = memory;
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 SET f1 = -1, f4 = 'ABC', report = 't1 0';
+INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(5) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(5) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5);
+INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
+INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
+ERROR 42S22: Unknown column 'f4x' in 'field list'
+INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4x char(5) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4x report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+SELECT * FROM v1 order by f1, report;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5);
+ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10);
+INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2';
+INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(10) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(10) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 --> t1 2
+2 NULL <-- 10 --> v1 2
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 --> t1 2
+2 NULL <-- 10 --> v1 2
+ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8);
+Warnings:
+Warning 1265 Data truncated for column 'f4' at row <some number>
+Warning 1265 Data truncated for column 'f4' at row <some number>
+INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3';
+Warnings:
+Warning 1265 Data truncated for column 'f4' at row 1
+INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3';
+Warnings:
+Warning 1265 Data truncated for column 'f4' at row 1
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(8) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(8) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20);
+INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4';
+INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
+INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
+f4 = '<------ 20 -------->', report = 't1 5';
+INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
+f4 = '<------ 20 -------->', report = 'v1 5';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ALTER TABLE t1 DROP COLUMN f2;
+INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6';
+INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM t1 order by f1, report;
+f1 f4 report
+-1 ABC t1 0
+-1 ABC v1 0
+0 ABC t1 1
+2 <-- 10 - t1 2
+2 <-- 10 - v1 2
+3 <-- 10 - t1 3
+3 <-- 10 - v1 3
+4 <------ 20 --------> t1 4
+4 <------ 20 --------> v1 4
+<------------- 30 -----------> <------ 20 --------> t1 5
+<------------- 30 -----------> <------ 20 --------> v1 5
+ABC <------ 20 --------> t1 6
+SELECT * FROM v1 order by f1, report;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL;
+INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04',
+f4 = '<------ 20 -------->', report = 't1 7';
+INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04',
+f4 = '<------ 20 -------->', report = 'v1 7';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+f2 date YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f4 report f2
+-1 ABC t1 0 NULL
+-1 ABC v1 0 NULL
+0 ABC t1 1 NULL
+2 <-- 10 - t1 2 NULL
+2 <-- 10 - v1 2 NULL
+3 <-- 10 - t1 3 NULL
+3 <-- 10 - v1 3 NULL
+4 <------ 20 --------> t1 4 NULL
+4 <------ 20 --------> v1 4 NULL
+<------------- 30 -----------> <------ 20 --------> t1 5 NULL
+<------------- 30 -----------> <------ 20 --------> v1 5 NULL
+ABC <------ 20 --------> t1 6 NULL
+ABC <------ 20 --------> t1 7 1500-12-04
+ABC <------ 20 --------> v1 7 1500-12-04
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ABC NULL <------ 20 --------> t1 6
+ABC 1500-12-04 <------ 20 --------> t1 7
+ABC 1500-12-04 <------ 20 --------> v1 7
+ALTER TABLE t1 DROP COLUMN f2;
+ALTER TABLE t1 ADD COLUMN f2 FLOAT;
+INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
+f4 = '<------ 20 -------->', report = 't1 8';
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+f4 = '<------ 20 -------->', report = 'v1 8';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+f2 float YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 float YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f4 report f2
+-1 ABC t1 0 NULL
+-1 ABC v1 0 NULL
+0 ABC t1 1 NULL
+2 <-- 10 - t1 2 NULL
+2 <-- 10 - v1 2 NULL
+3 <-- 10 - t1 3 NULL
+3 <-- 10 - v1 3 NULL
+4 <------ 20 --------> t1 4 NULL
+4 <------ 20 --------> v1 4 NULL
+<------------- 30 -----------> <------ 20 --------> t1 5 NULL
+<------------- 30 -----------> <------ 20 --------> v1 5 NULL
+ABC <------ 20 --------> t1 6 NULL
+ABC <------ 20 --------> t1 7 NULL
+ABC <------ 20 --------> t1 8 -0.00033
+ABC <------ 20 --------> v1 7 NULL
+ABC <------ 20 --------> v1 8 -0.00033
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ABC NULL <------ 20 --------> t1 6
+ABC NULL <------ 20 --------> t1 7
+ABC -0.00033 <------ 20 --------> t1 8
+ABC NULL <------ 20 --------> v1 7
+ABC -0.00033 <------ 20 --------> v1 8
+ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2);
+INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
+f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
+ERROR 42S22: Unknown column 'f3' in 'field list'
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+f4 = '<------ 20 -------->', report = 'v1 9a';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+f2 float YES NULL
+f3 decimal(7,2) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 float YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f4 report f2 f3
+-1 ABC t1 0 NULL NULL
+-1 ABC v1 0 NULL NULL
+0 ABC t1 1 NULL NULL
+2 <-- 10 - t1 2 NULL NULL
+2 <-- 10 - v1 2 NULL NULL
+3 <-- 10 - t1 3 NULL NULL
+3 <-- 10 - v1 3 NULL NULL
+4 <------ 20 --------> t1 4 NULL NULL
+4 <------ 20 --------> v1 4 NULL NULL
+<------------- 30 -----------> <------ 20 --------> t1 5 NULL NULL
+<------------- 30 -----------> <------ 20 --------> v1 5 NULL NULL
+ABC <------ 20 --------> t1 6 NULL NULL
+ABC <------ 20 --------> t1 7 NULL NULL
+ABC <------ 20 --------> t1 8 -0.00033 NULL
+ABC <------ 20 --------> t1 9 -0.00033 -2.20
+ABC <------ 20 --------> v1 7 NULL NULL
+ABC <------ 20 --------> v1 8 -0.00033 NULL
+ABC <------ 20 --------> v1 9a -0.00033 NULL
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ABC NULL <------ 20 --------> t1 6
+ABC NULL <------ 20 --------> t1 7
+ABC -0.00033 <------ 20 --------> t1 8
+ABC -0.00033 <------ 20 --------> t1 9
+ABC NULL <------ 20 --------> v1 7
+ABC -0.00033 <------ 20 --------> v1 8
+ABC -0.00033 <------ 20 --------> v1 9a
+DROP TABLE t1;
+DROP VIEW v1;
+CREATE TABLE t1 (f1 CHAR(10), f2 BIGINT) ENGINE = memory;
+INSERT INTO t1 SET f1 = 'ABC', f2 = 3;
+CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+f2 bigint(20) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+my_sqrt double YES NULL
+SELECT * FROM t1 order by f1, f2;
+f1 f2
+ABC 3
+SELECT * FROM v1 order by 2;
+f1 my_sqrt
+ABC 1.7320508075688772
+ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30);
+INSERT INTO t1 SET f1 = 'ABC', f2 = 'DEF';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+f2 varchar(30) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+my_sqrt double YES NULL
+SELECT * FROM t1 order by f1, f2;
+f1 f2
+ABC 3
+ABC DEF
+SELECT * FROM v1 order by 2;
+f1 my_sqrt
+ABC 0
+ABC 1.7320508075688772
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT SQRT('DEF');
+SQRT('DEF')
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+CREATE VIEW v2 AS SELECT SQRT('DEF');
+SELECT * FROM v2 order by 1;
+SQRT('DEF')
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+DESCRIBE v2;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+my_sqrt double YES NULL
+SELECT * FROM v2 order by 2;
+f1 my_sqrt
+ABC 0
+ABC 1.7320508075688772
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT * FROM t2 order by 2;
+f1 ABC
+my_sqrt 0
+f1 ABC
+my_sqrt 1.7320508075688772
+DROP TABLE t2;
+CREATE TABLE t2 AS SELECT * FROM v1;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT * FROM t2 order by 2;
+f1 ABC
+my_sqrt 0
+f1 ABC
+my_sqrt 1.7320508075688772
+DROP TABLE t2;
+CREATE TABLE t2 AS SELECT * FROM v2;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT * FROM t2 order by 2;
+f1 ABC
+my_sqrt 0
+f1 ABC
+my_sqrt 1.7320508075688772
+DROP TABLE t1;
+DROP TABLE t2;
+DROP VIEW v1;
+DROP VIEW v2;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v1_1;
+DROP VIEW IF EXISTS v1_2;
+DROP VIEW IF EXISTS v1_firstview;
+DROP VIEW IF EXISTS v1_secondview;
+DROP VIEW IF EXISTS v2;
+DROP DATABASE IF EXISTS test2;
+DROP DATABASE IF EXISTS test3;
+DROP DATABASE test1;
+DROP TABLE test.tb2;
diff --git a/mysql-test/suite/funcs_1/r/myisam_bitdata.result b/mysql-test/suite/funcs_1/r/myisam_bitdata.result
new file mode 100644
index 00000000..893758ab
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_bitdata.result
@@ -0,0 +1,4 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+NOT YET IMPLEMENTED: bitdata tests
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_cursors.result b/mysql-test/suite/funcs_1/r/myisam_cursors.result
new file mode 100644
index 00000000..205f2149
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_cursors.result
@@ -0,0 +1,4 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+NOT YET IMPLEMENTED: cursor tests
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result
new file mode 100644
index 00000000..e9b88b93
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result
@@ -0,0 +1,5265 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+SET timestamp=unix_timestamp('2001-02-03 10:20:30');
+DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1_values
+(
+id BIGINT AUTO_INCREMENT,
+select_id BIGINT,
+PRIMARY KEY(id)
+) ENGINE = <engine_to_be_tested>;
+ALTER TABLE t1_values ADD my_char_30 CHAR(30);
+ALTER TABLE t1_values ADD my_varchar_1000 VARCHAR(1000);
+ALTER TABLE t1_values ADD my_binary_30 BINARY(30);
+ALTER TABLE t1_values ADD my_varbinary_1000 VARBINARY(1000);
+ALTER TABLE t1_values ADD my_datetime DATETIME;
+ALTER TABLE t1_values ADD my_date DATE;
+ALTER TABLE t1_values ADD ts_dummy TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
+ALTER TABLE t1_values ADD my_timestamp TIMESTAMP NOT NULL DEFAULT '2001-01-01 10:20:30';
+ALTER TABLE t1_values ADD my_time TIME;
+ALTER TABLE t1_values ADD my_year YEAR;
+ALTER TABLE t1_values ADD my_bigint BIGINT;
+ALTER TABLE t1_values ADD my_double DOUBLE;
+ALTER TABLE t1_values ADD my_decimal DECIMAL(64,30);
+SET sql_mode = 'traditional';
+INSERT INTO t1_values SET id = 0;
+INSERT INTO t1_values SET
+my_char_30 = '',
+my_varchar_1000 = '',
+my_binary_30 = '',
+my_varbinary_1000 = '',
+my_datetime = '0001-01-01 00:00:00',
+my_date = '0001-01-01',
+my_timestamp = '1970-01-01 14:00:01',
+my_time = '-838:59:59',
+my_year = '1901',
+my_bigint = -9223372036854775808,
+my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 ,
+my_double = -1.7976931348623E+308;
+INSERT INTO t1_values SET
+my_char_30 = '<--------30 characters------->',
+my_varchar_1000 = CONCAT('<---------1000 characters',
+RPAD('',965,'-'),'--------->'),
+my_binary_30 = '<--------30 characters------->',
+my_varbinary_1000 = CONCAT('<---------1000 characters',
+RPAD('',965,'-'),'--------->'),
+my_datetime = '9999-12-31 23:59:59',
+my_date = '9999-12-31',
+my_timestamp = '2038-01-01 02:59:59',
+my_time = '838:59:59',
+my_year = 2155,
+my_bigint = 9223372036854775807,
+my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 ,
+my_double = 1.7976931348623E+308;
+INSERT INTO t1_values SET
+my_char_30 = ' ---äÖüß@µ*$-- ',
+my_varchar_1000 = ' ---äÖüß@µ*$-- ',
+my_binary_30 = ' ---äÖüß@µ*$-- ',
+my_varbinary_1000 = ' ---äÖüß@µ*$-- ',
+my_datetime = '2004-02-29 23:59:59',
+my_date = '2004-02-29',
+my_timestamp = '2004-02-29 23:59:59',
+my_time = '13:00:00',
+my_year = 2000,
+my_bigint = 0,
+my_decimal = 0.0,
+my_double = 0;
+INSERT INTO t1_values SET
+my_char_30 = '-1',
+my_varchar_1000 = '-1',
+my_binary_30 = '-1',
+my_varbinary_1000 = '-1',
+my_datetime = '2005-06-28 10:00:00',
+my_date = '2005-06-28',
+my_timestamp = '2005-06-28 10:00:00',
+my_time = '10:00:00',
+my_year = 2005,
+my_bigint = -1,
+my_decimal = -1.000000000000000000000000000000,
+my_double = -0.1E+1;
+PREPARE ins_sel_with_result FROM "INSERT INTO t1_selects SET my_select = @my_select,
+disable_result = 'No'" ;
+PREPARE ins_sel_no_result FROM "INSERT INTO t1_selects SET my_select = @my_select,
+disable_result = 'Yes'" ;
+SET sql_mode = 'traditional';
+SET @my_select = 'SELECT sqrt(my_bigint), my_bigint, id FROM t1_values';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 4;
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = -25;
+##### 1.1.1. CAST --> BINARY
+##### 1.1.2. CAST --> CHAR
+##### 1.1.3. CAST --> DATE
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '2005-06-27';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 20050627;
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = +20.050627E+6;
+##### 1.1.4. CAST --> DATETIME
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '2005-06-27 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 200506271758;
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = +0.0200506271758E+13;
+##### 1.1.5. CAST --> TIME
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '1 17:58';
+INSERT INTO t1_values SET select_id = @select_id,
+my_bigint = 1758;
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = +1.758E+3;
+##### 1.1.6. CAST --> DECIMAL
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varchar_1000 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_binary_30 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_varbinary_1000 = '-3333.3333';
+INSERT INTO t1_values SET select_id = @select_id,
+my_double = -0.33333333E+4;
+##### 1.1.7. CAST --> SIGNED INTEGER
+
+"Attention: CAST --> SIGNED INTEGER
+ Bug#5913 Traditional mode: BIGINT range not correctly delimited
+ Status: To be fixed later"
+--------------------------------------------------------------------------------
+##### 1.1.8. CAST --> UNSIGNED INTEGER
+
+"Attention: CAST --> UNSIGNED INTEGER
+ The file with expected results suffers from Bug 5913"
+--------------------------------------------------------------------------------
+
+some statements disabled because of
+Bug#5913 Traditional mode: BIGINT range not correctly delimited
+--------------------------------------------------------------------------------
+SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT BIT_LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT INSTR(my_char_30, ''char''),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LCASE(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values';
+SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select =
+'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt'')
+ AS my_col,
+ id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''char'', my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_char_30 ),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_varchar_1000 ),
+my_char_30, my_varchar_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_binary_30 ),
+my_char_30, my_binary_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_char_30, my_varbinary_1000 ),
+my_char_30, my_varbinary_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_char_30 ),
+my_varchar_1000, my_char_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_binary_30 ),
+my_varchar_1000, my_binary_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
+my_varchar_1000, my_varbinary_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_binary_30 ),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_char_30 ),
+my_binary_30, my_char_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_varchar_1000 ),
+my_binary_30, my_varchar_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
+my_binary_30, my_varbinary_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_char_30 ),
+my_varbinary_1000, my_char_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
+my_varbinary_1000, my_varchar_1000 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
+my_varbinary_1000, my_binary_30 id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_char_30, 3),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_varchar_1000, 3),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_binary_30, 3),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', my_varbinary_1000, 3),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_bigint),
+my_bigint, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_double),
+my_double, id FROM t1_values';
+SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_decimal),
+my_decimal, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LOWER(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_char_30),
+my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_varchar_1000),
+my_varchar_1000, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_binary_30),
+my_binary_30, id FROM t1_values';
+SET @my_select = 'SELECT LTRIM(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values';
+SET @my_select =
+'SELECT CONCAT(''A'',my_char_30), my_char_30, id FROM t1_values';
+SET @my_select = 'SELECT my_char_30, id FROM t1_values';
+INSERT INTO t1_values SET select_id = @select_id,
+my_char_30 = 'Viana do Castelo';
+SET sql_mode = '';
+
+"# The basic preparations end and the main test starts here"
+--------------------------------------------------------------------------------
+CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values;
+SELECT my_char_30, id FROM t1_values
+WHERE select_id = 193 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 193 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values;
+SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values
+WHERE select_id = 192 OR select_id IS NULL order by id;
+CONCAT('A',my_char_30) my_char_30 id
+NULL NULL 1
+A 2
+A<--------30 characters-------> <--------30 characters-------> 3
+A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+A-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 192 OR select_id IS NULL) order by id;
+CONCAT('A',my_char_30) my_char_30 id
+NULL NULL 1
+A 2
+A<--------30 characters-------> <--------30 characters-------> 3
+A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+A-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LTRIM(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 191 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 191 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LTRIM(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 190 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 190 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LTRIM(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 189 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 189 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LTRIM(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LTRIM(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 188 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 188 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOWER(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 187 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 187 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LOWER(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 186 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 186 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LOWER(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 185 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 185 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOWER(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LOWER(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 184 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 184 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_decimal),
+my_decimal, id FROM t1_values;
+SELECT LOCATE('-', ' - -ABC', my_decimal),
+my_decimal, id FROM t1_values
+WHERE select_id = 183 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 183 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_double),
+my_double, id FROM t1_values;
+SELECT LOCATE('-', ' - -ABC', my_double),
+my_double, id FROM t1_values
+WHERE select_id = 182 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 182 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_bigint),
+my_bigint, id FROM t1_values;
+SELECT LOCATE('-', ' - -ABC', my_bigint),
+my_bigint, id FROM t1_values
+WHERE select_id = 181 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 181 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_varbinary_1000, 3),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOCATE('-', my_varbinary_1000, 3),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 180 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 180 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_binary_30, 3),
+my_binary_30, id FROM t1_values;
+SELECT LOCATE('-', my_binary_30, 3),
+my_binary_30, id FROM t1_values
+WHERE select_id = 179 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 179 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_varchar_1000, 3),
+my_varchar_1000, id FROM t1_values;
+SELECT LOCATE('-', my_varchar_1000, 3),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 178 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 178 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('-', my_char_30, 3),
+my_char_30, id FROM t1_values;
+SELECT LOCATE('-', my_char_30, 3),
+my_char_30, id FROM t1_values
+WHERE select_id = 177 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 177 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
+my_varbinary_1000, my_binary_30 id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
+my_varbinary_1000, my_binary_30 id FROM t1_values
+WHERE select_id = 176 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 176 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
+my_varbinary_1000, my_varchar_1000 id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
+my_varbinary_1000, my_varchar_1000 id FROM t1_values
+WHERE select_id = 175 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 175 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_char_30 ),
+my_varbinary_1000, my_char_30 id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_char_30 ),
+my_varbinary_1000, my_char_30 id FROM t1_values
+WHERE select_id = 174 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 174 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 173 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 173 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
+my_binary_30, my_varbinary_1000 id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
+my_binary_30, my_varbinary_1000 id FROM t1_values
+WHERE select_id = 172 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 172 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varchar_1000 ),
+my_binary_30, my_varchar_1000 id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_varchar_1000 ),
+my_binary_30, my_varchar_1000 id FROM t1_values
+WHERE select_id = 171 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 171 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_char_30 ),
+my_binary_30, my_char_30 id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_char_30 ),
+my_binary_30, my_char_30 id FROM t1_values
+WHERE select_id = 170 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 170 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_binary_30 ),
+my_binary_30, id FROM t1_values;
+SELECT LOCATE(my_binary_30, my_binary_30 ),
+my_binary_30, id FROM t1_values
+WHERE select_id = 169 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 169 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
+my_varchar_1000, my_varbinary_1000 id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
+my_varchar_1000, my_varbinary_1000 id FROM t1_values
+WHERE select_id = 168 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 168 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_binary_30 ),
+my_varchar_1000, my_binary_30 id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_binary_30 ),
+my_varchar_1000, my_binary_30 id FROM t1_values
+WHERE select_id = 167 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 167 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_char_30 ),
+my_varchar_1000, my_char_30 id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_char_30 ),
+my_varchar_1000, my_char_30 id FROM t1_values
+WHERE select_id = 166 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 166 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
+my_varchar_1000, id FROM t1_values;
+SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 165 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 165 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varbinary_1000 ),
+my_char_30, my_varbinary_1000 id FROM t1_values;
+SELECT LOCATE(my_char_30, my_varbinary_1000 ),
+my_char_30, my_varbinary_1000 id FROM t1_values
+WHERE select_id = 164 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 164 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_binary_30 ),
+my_char_30, my_binary_30 id FROM t1_values;
+SELECT LOCATE(my_char_30, my_binary_30 ),
+my_char_30, my_binary_30 id FROM t1_values
+WHERE select_id = 163 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 163 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varchar_1000 ),
+my_char_30, my_varchar_1000 id FROM t1_values;
+SELECT LOCATE(my_char_30, my_varchar_1000 ),
+my_char_30, my_varchar_1000 id FROM t1_values
+WHERE select_id = 162 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 162 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_char_30 ),
+my_char_30, id FROM t1_values;
+SELECT LOCATE(my_char_30, my_char_30 ),
+my_char_30, id FROM t1_values
+WHERE select_id = 161 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 161 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LOCATE('char', my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 160 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 160 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LOCATE('char', my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 159 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 159 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LOCATE('char', my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 158 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 158 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOCATE('char', my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LOCATE('char', my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 157 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 157 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt')
+ AS my_col,
+ id FROM t1_values;
+SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt')
+ AS my_col,
+ id FROM t1_values
+WHERE select_id = 156 OR select_id IS NULL order by id;
+my_col id
+Here is content from load_file
+ 1
+Here is content from load_file
+ 2
+Here is content from load_file
+ 3
+Here is content from load_file
+ 4
+Here is content from load_file
+ 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 156 OR select_id IS NULL) order by id;
+my_col id
+Here is content from load_file
+ 1
+Here is content from load_file
+ 2
+Here is content from load_file
+ 3
+Here is content from load_file
+ 4
+Here is content from load_file
+ 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 155 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 155 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 154 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 154 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 153 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 153 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LENGTH(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT LENGTH(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 152 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select octet_length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 152 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values;
+SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values
+WHERE select_id = 151 OR select_id IS NULL order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id
+NULL NULL 1
+ -1.7976931348623e308 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
+ 0 4
+ -1 5
+Warnings:
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 151 OR select_id IS NULL) order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id
+NULL NULL 1
+ -1.7976931348623e308 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
+ 0 4
+ -1 5
+Warnings:
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values;
+SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values
+WHERE select_id = 150 OR select_id IS NULL order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id
+NULL NULL 1
+ -9999999999999999999999999999999999.999999999999999999999999999999 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3
+ 0.000000000000000000000000000000 4
+ -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 150 OR select_id IS NULL) order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id
+NULL NULL 1
+ -9999999999999999999999999999999999.999999999999999999999999999999 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3
+ 0.000000000000000000000000000000 4
+ -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values;
+SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values
+WHERE select_id = 149 OR select_id IS NULL order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id
+NULL NULL 1
+ -9223372036854775808 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3
+ 0 4
+ -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 149 OR select_id IS NULL) order by id;
+LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id
+NULL NULL 1
+ -9223372036854775808 2
+AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3
+ 0 4
+ -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values;
+SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values
+WHERE select_id = 148 OR select_id IS NULL order by id;
+LEFT(my_varbinary_1000, 2) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 148 OR select_id IS NULL) order by id;
+LEFT(my_varbinary_1000, 2) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values;
+SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values
+WHERE select_id = 147 OR select_id IS NULL order by id;
+LEFT(my_binary_30, 2) my_binary_30 id
+NULL NULL 1
+ 2
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 147 OR select_id IS NULL) order by id;
+LEFT(my_binary_30, 2) my_binary_30 id
+NULL NULL 1
+
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$--
+-1 -1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values;
+SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values
+WHERE select_id = 146 OR select_id IS NULL order by id;
+LEFT(my_varchar_1000, 2) my_varchar_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 146 OR select_id IS NULL) order by id;
+LEFT(my_varchar_1000, 2) my_varchar_1000 id
+NULL NULL 1
+ 2
+<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values;
+SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values
+WHERE select_id = 145 OR select_id IS NULL order by id;
+LEFT(my_char_30, 2) my_char_30 id
+NULL NULL 1
+ 2
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 145 OR select_id IS NULL) order by id;
+LEFT(my_char_30, 2) my_char_30 id
+NULL NULL 1
+ 2
+<- <--------30 characters-------> 3
+ - ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT LCASE(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT LCASE(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 144 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 144 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT INSTR(my_char_30, 'char'),
+my_char_30, id FROM t1_values;
+SELECT INSTR(my_char_30, 'char'),
+my_char_30, id FROM t1_values
+WHERE select_id = 143 OR select_id IS NULL order by id;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 143 OR select_id IS NULL) order by id;
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values;
+SELECT BIT_LENGTH(my_varbinary_1000),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 142 OR select_id IS NULL order by id;
+BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 142 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values;
+SELECT BIT_LENGTH(my_binary_30),
+my_binary_30, id FROM t1_values
+WHERE select_id = 141 OR select_id IS NULL order by id;
+BIT_LENGTH(my_binary_30) my_binary_30 id
+NULL NULL 1
+240 2
+240 <--------30 characters-------> 3
+240 ---äÖüß@µ*$-- 4
+240 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 141 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_binary_30) my_binary_30 id
+NULL NULL 1
+240
+240 <--------30 characters-------> 3
+240 ---äÖüß@µ*$--
+240 -1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values;
+SELECT BIT_LENGTH(my_varchar_1000),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 140 OR select_id IS NULL order by id;
+BIT_LENGTH(my_varchar_1000) my_varchar_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 140 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_varchar_1000) my_varchar_1000 id
+NULL NULL 1
+0 2
+8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+160 ---äÖüß@µ*$-- 4
+16 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT BIT_LENGTH(my_char_30),
+my_char_30, id FROM t1_values;
+SELECT BIT_LENGTH(my_char_30),
+my_char_30, id FROM t1_values
+WHERE select_id = 139 OR select_id IS NULL order by id;
+BIT_LENGTH(my_char_30) my_char_30 id
+NULL NULL 1
+0 2
+240 <--------30 characters-------> 3
+152 ---äÖüß@µ*$-- 4
+16 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 139 OR select_id IS NULL) order by id;
+BIT_LENGTH(my_char_30) my_char_30 id
+NULL NULL 1
+0 2
+240 <--------30 characters-------> 3
+152 ---äÖüß@µ*$-- 4
+16 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_year,'IS_NULL'),
+my_year, id FROM t1_values;
+SELECT IFNULL(my_year,'IS_NULL'),
+my_year, id FROM t1_values
+WHERE select_id = 138 OR select_id IS NULL order by id;
+IFNULL(my_year,'IS_NULL') my_year id
+IS_NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 138 OR select_id IS NULL) order by id;
+IFNULL(my_year,'IS_NULL') my_year id
+IS_NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_time,'IS_NULL'),
+my_time, id FROM t1_values;
+SELECT IFNULL(my_time,'IS_NULL'),
+my_time, id FROM t1_values
+WHERE select_id = 137 OR select_id IS NULL order by id;
+IFNULL(my_time,'IS_NULL') my_time id
+IS_NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 137 OR select_id IS NULL) order by id;
+IFNULL(my_time,'IS_NULL') my_time id
+IS_NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_timestamp,'IS_NULL'),
+my_timestamp, id FROM t1_values;
+SELECT IFNULL(my_timestamp,'IS_NULL'),
+my_timestamp, id FROM t1_values
+WHERE select_id = 136 OR select_id IS NULL order by id;
+IFNULL(my_timestamp,'IS_NULL') my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 136 OR select_id IS NULL) order by id;
+IFNULL(my_timestamp,'IS_NULL') my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_date,'IS_NULL'),
+my_date, id FROM t1_values;
+SELECT IFNULL(my_date,'IS_NULL'),
+my_date, id FROM t1_values
+WHERE select_id = 135 OR select_id IS NULL order by id;
+IFNULL(my_date,'IS_NULL') my_date id
+IS_NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 135 OR select_id IS NULL) order by id;
+IFNULL(my_date,'IS_NULL') my_date id
+IS_NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_datetime,'IS_NULL'),
+my_datetime, id FROM t1_values;
+SELECT IFNULL(my_datetime,'IS_NULL'),
+my_datetime, id FROM t1_values
+WHERE select_id = 134 OR select_id IS NULL order by id;
+IFNULL(my_datetime,'IS_NULL') my_datetime id
+IS_NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 134 OR select_id IS NULL) order by id;
+IFNULL(my_datetime,'IS_NULL') my_datetime id
+IS_NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_double,'IS_NULL'),
+my_double, id FROM t1_values;
+SELECT IFNULL(my_double,'IS_NULL'),
+my_double, id FROM t1_values
+WHERE select_id = 133 OR select_id IS NULL order by id;
+IFNULL(my_double,'IS_NULL') my_double id
+IS_NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 133 OR select_id IS NULL) order by id;
+IFNULL(my_double,'IS_NULL') my_double id
+IS_NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_decimal,'IS_NULL'),
+my_decimal, id FROM t1_values;
+SELECT IFNULL(my_decimal,'IS_NULL'),
+my_decimal, id FROM t1_values
+WHERE select_id = 132 OR select_id IS NULL order by id;
+IFNULL(my_decimal,'IS_NULL') my_decimal id
+IS_NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 132 OR select_id IS NULL) order by id;
+IFNULL(my_decimal,'IS_NULL') my_decimal id
+IS_NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_bigint,'IS_NULL'),
+my_bigint, id FROM t1_values;
+SELECT IFNULL(my_bigint,'IS_NULL'),
+my_bigint, id FROM t1_values
+WHERE select_id = 131 OR select_id IS NULL order by id;
+IFNULL(my_bigint,'IS_NULL') my_bigint id
+IS_NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 131 OR select_id IS NULL) order by id;
+IFNULL(my_bigint,'IS_NULL') my_bigint id
+IS_NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_varbinary_1000,'IS_NULL'),
+my_varbinary_1000, id FROM t1_values;
+SELECT IFNULL(my_varbinary_1000,'IS_NULL'),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 130 OR select_id IS NULL order by id;
+IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 130 OR select_id IS NULL) order by id;
+IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_binary_30,'IS_NULL'),
+my_binary_30, id FROM t1_values;
+SELECT IFNULL(my_binary_30,'IS_NULL'),
+my_binary_30, id FROM t1_values
+WHERE select_id = 129 OR select_id IS NULL order by id;
+IFNULL(my_binary_30,'IS_NULL') my_binary_30 id
+IS_NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 129 OR select_id IS NULL) order by id;
+IFNULL(my_binary_30,'IS_NULL') my_binary_30 id
+IS_NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_varchar_1000,'IS_NULL'),
+my_varchar_1000, id FROM t1_values;
+SELECT IFNULL(my_varchar_1000,'IS_NULL'),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 128 OR select_id IS NULL order by id;
+IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 128 OR select_id IS NULL) order by id;
+IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id
+IS_NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IFNULL(my_char_30,'IS_NULL'),
+my_char_30, id FROM t1_values;
+SELECT IFNULL(my_char_30,'IS_NULL'),
+my_char_30, id FROM t1_values
+WHERE select_id = 127 OR select_id IS NULL order by id;
+IFNULL(my_char_30,'IS_NULL') my_char_30 id
+IS_NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 127 OR select_id IS NULL) order by id;
+IFNULL(my_char_30,'IS_NULL') my_char_30 id
+IS_NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL'), my_year, id FROM t1_values;
+SELECT IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL'), my_year, id FROM t1_values
+WHERE select_id = 126 OR select_id IS NULL order by id;
+IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL') my_year id
+IS NULL NULL 1
+IS NOT NULL 1901 2
+IS NOT NULL 2155 3
+IS NOT NULL 2000 4
+IS NOT NULL 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year` is null,'IS NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 126 OR select_id IS NULL) order by id;
+IF(my_year IS NULL, 'IS NULL',
+'IS NOT NULL') my_year id
+IS NULL NULL 1
+IS NOT NULL 1901 2
+IS NOT NULL 2155 3
+IS NOT NULL 2000 4
+IS NOT NULL 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL'), my_time, id FROM t1_values;
+SELECT IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL'), my_time, id FROM t1_values
+WHERE select_id = 125 OR select_id IS NULL order by id;
+IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL') my_time id
+IS NULL NULL 1
+IS NOT NULL -838:59:59 2
+IS NOT NULL 838:59:59 3
+IS NOT NULL 13:00:00 4
+IS NOT NULL 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time` is null,'IS NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 125 OR select_id IS NULL) order by id;
+IF(my_time IS NULL, 'IS NULL',
+'IS NOT NULL') my_time id
+IS NULL NULL 1
+IS NOT NULL -838:59:59 2
+IS NOT NULL 838:59:59 3
+IS NOT NULL 13:00:00 4
+IS NOT NULL 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL'), my_timestamp, id FROM t1_values;
+SELECT IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL'), my_timestamp, id FROM t1_values
+WHERE select_id = 124 OR select_id IS NULL order by id;
+IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL') my_timestamp id
+IS NOT NULL 2001-01-01 10:20:30 1
+IS NOT NULL 1970-01-01 14:00:01 2
+IS NOT NULL 2038-01-01 02:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp` is null,'IS NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 124 OR select_id IS NULL) order by id;
+IF(my_timestamp IS NULL, 'IS NULL',
+'IS NOT NULL') my_timestamp id
+IS NOT NULL 2001-01-01 10:20:30 1
+IS NOT NULL 1970-01-01 14:00:01 2
+IS NOT NULL 2038-01-01 02:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL'), my_date, id FROM t1_values;
+SELECT IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL'), my_date, id FROM t1_values
+WHERE select_id = 123 OR select_id IS NULL order by id;
+IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL') my_date id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 2
+IS NOT NULL 9999-12-31 3
+IS NOT NULL 2004-02-29 4
+IS NOT NULL 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date` is null,'IS NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 123 OR select_id IS NULL) order by id;
+IF(my_date IS NULL, 'IS NULL',
+'IS NOT NULL') my_date id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 2
+IS NOT NULL 9999-12-31 3
+IS NOT NULL 2004-02-29 4
+IS NOT NULL 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL'), my_datetime, id FROM t1_values;
+SELECT IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL'), my_datetime, id FROM t1_values
+WHERE select_id = 122 OR select_id IS NULL order by id;
+IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL') my_datetime id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 00:00:00 2
+IS NOT NULL 9999-12-31 23:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime` is null,'IS NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 122 OR select_id IS NULL) order by id;
+IF(my_datetime IS NULL, 'IS NULL',
+'IS NOT NULL') my_datetime id
+IS NULL NULL 1
+IS NOT NULL 0001-01-01 00:00:00 2
+IS NOT NULL 9999-12-31 23:59:59 3
+IS NOT NULL 2004-02-29 23:59:59 4
+IS NOT NULL 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL'), my_double, id FROM t1_values;
+SELECT IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL'), my_double, id FROM t1_values
+WHERE select_id = 121 OR select_id IS NULL order by id;
+IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL') my_double id
+IS NULL NULL 1
+IS NOT NULL -1.7976931348623e308 2
+IS NOT NULL 1.7976931348623e308 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double` is null,'IS NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 121 OR select_id IS NULL) order by id;
+IF(my_double IS NULL, 'IS NULL',
+'IS NOT NULL') my_double id
+IS NULL NULL 1
+IS NOT NULL -1.7976931348623e308 2
+IS NOT NULL 1.7976931348623e308 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL'), my_decimal, id FROM t1_values;
+SELECT IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL'), my_decimal, id FROM t1_values
+WHERE select_id = 120 OR select_id IS NULL order by id;
+IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL') my_decimal id
+IS NULL NULL 1
+IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT NULL 0.000000000000000000000000000000 4
+IS NOT NULL -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal` is null,'IS NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 120 OR select_id IS NULL) order by id;
+IF(my_decimal IS NULL, 'IS NULL',
+'IS NOT NULL') my_decimal id
+IS NULL NULL 1
+IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT NULL 0.000000000000000000000000000000 4
+IS NOT NULL -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL'), my_bigint, id FROM t1_values;
+SELECT IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL'), my_bigint, id FROM t1_values
+WHERE select_id = 119 OR select_id IS NULL order by id;
+IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL') my_bigint id
+IS NULL NULL 1
+IS NOT NULL -9223372036854775808 2
+IS NOT NULL 9223372036854775807 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint` is null,'IS NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 119 OR select_id IS NULL) order by id;
+IF(my_bigint IS NULL, 'IS NULL',
+'IS NOT NULL') my_bigint id
+IS NULL NULL 1
+IS NOT NULL -9223372036854775808 2
+IS NOT NULL 9223372036854775807 3
+IS NOT NULL 0 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varbinary_1000, id FROM t1_values;
+SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varbinary_1000, id FROM t1_values
+WHERE select_id = 118 OR select_id IS NULL order by id;
+IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varbinary_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000` is null,'IS NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 118 OR select_id IS NULL) order by id;
+IF(my_varbinary_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varbinary_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_binary_30, id FROM t1_values;
+SELECT IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_binary_30, id FROM t1_values
+WHERE select_id = 117 OR select_id IS NULL order by id;
+IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_binary_30 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30` is null,'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 117 OR select_id IS NULL) order by id;
+IF(my_binary_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_binary_30 id
+IS NULL NULL 1
+IS NOT NULL
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$--
+IS NOT NULL -1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varchar_1000, id FROM t1_values;
+SELECT IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_varchar_1000, id FROM t1_values
+WHERE select_id = 116 OR select_id IS NULL order by id;
+IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varchar_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000` is null,'IS NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 116 OR select_id IS NULL) order by id;
+IF(my_varchar_1000 IS NULL, 'IS NULL',
+'IS NOT NULL') my_varchar_1000 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_char_30, id FROM t1_values;
+SELECT IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL'), my_char_30, id FROM t1_values
+WHERE select_id = 115 OR select_id IS NULL order by id;
+IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_char_30 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30` is null,'IS NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 115 OR select_id IS NULL) order by id;
+IF(my_char_30 IS NULL, 'IS NULL',
+'IS NOT NULL') my_char_30 id
+IS NULL NULL 1
+IS NOT NULL 2
+IS NOT NULL <--------30 characters-------> 3
+IS NOT NULL ---äÖüß@µ*$-- 4
+IS NOT NULL -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'),
+my_year, id FROM t1_values;
+SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'),
+my_year, id FROM t1_values
+WHERE select_id = 114 OR select_id IS NULL order by id;
+IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id
+IS NOT TRUE NULL 1
+IS TRUE 1901 2
+IS TRUE 2155 3
+IS TRUE 2000 4
+IS TRUE 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,'IS TRUE','IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 114 OR select_id IS NULL) order by id;
+IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id
+IS NOT TRUE NULL 1
+IS TRUE 1901 2
+IS TRUE 2155 3
+IS TRUE 2000 4
+IS TRUE 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'),
+my_time, id FROM t1_values;
+SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'),
+my_time, id FROM t1_values
+WHERE select_id = 113 OR select_id IS NULL order by id;
+IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id
+IS NOT TRUE NULL 1
+IS TRUE -838:59:59 2
+IS TRUE 838:59:59 3
+IS TRUE 13:00:00 4
+IS TRUE 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,'IS TRUE','IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 113 OR select_id IS NULL) order by id;
+IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id
+IS NOT TRUE NULL 1
+IS TRUE -838:59:59 2
+IS TRUE 838:59:59 3
+IS TRUE 13:00:00 4
+IS TRUE 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'),
+my_timestamp, id FROM t1_values;
+SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'),
+my_timestamp, id FROM t1_values
+WHERE select_id = 112 OR select_id IS NULL order by id;
+IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id
+IS TRUE 2001-01-01 10:20:30 1
+IS TRUE 1970-01-01 14:00:01 2
+IS TRUE 2038-01-01 02:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,'IS TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 112 OR select_id IS NULL) order by id;
+IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id
+IS TRUE 2001-01-01 10:20:30 1
+IS TRUE 1970-01-01 14:00:01 2
+IS TRUE 2038-01-01 02:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'),
+my_date, id FROM t1_values;
+SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'),
+my_date, id FROM t1_values
+WHERE select_id = 111 OR select_id IS NULL order by id;
+IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 2
+IS TRUE 9999-12-31 3
+IS TRUE 2004-02-29 4
+IS TRUE 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,'IS TRUE','IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 111 OR select_id IS NULL) order by id;
+IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 2
+IS TRUE 9999-12-31 3
+IS TRUE 2004-02-29 4
+IS TRUE 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'),
+my_datetime, id FROM t1_values;
+SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'),
+my_datetime, id FROM t1_values
+WHERE select_id = 110 OR select_id IS NULL order by id;
+IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 00:00:00 2
+IS TRUE 9999-12-31 23:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,'IS TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 110 OR select_id IS NULL) order by id;
+IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id
+IS NOT TRUE NULL 1
+IS TRUE 0001-01-01 00:00:00 2
+IS TRUE 9999-12-31 23:59:59 3
+IS TRUE 2004-02-29 23:59:59 4
+IS TRUE 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'),
+my_double, id FROM t1_values;
+SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'),
+my_double, id FROM t1_values
+WHERE select_id = 109 OR select_id IS NULL order by id;
+IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id
+IS NOT TRUE NULL 1
+IS TRUE -1.7976931348623e308 2
+IS TRUE 1.7976931348623e308 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,'IS TRUE','IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 109 OR select_id IS NULL) order by id;
+IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id
+IS NOT TRUE NULL 1
+IS TRUE -1.7976931348623e308 2
+IS TRUE 1.7976931348623e308 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'),
+my_decimal, id FROM t1_values;
+SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'),
+my_decimal, id FROM t1_values
+WHERE select_id = 108 OR select_id IS NULL order by id;
+IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id
+IS NOT TRUE NULL 1
+IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT TRUE 0.000000000000000000000000000000 4
+IS TRUE -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,'IS TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 108 OR select_id IS NULL) order by id;
+IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id
+IS NOT TRUE NULL 1
+IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2
+IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3
+IS NOT TRUE 0.000000000000000000000000000000 4
+IS TRUE -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'),
+my_bigint, id FROM t1_values;
+SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'),
+my_bigint, id FROM t1_values
+WHERE select_id = 107 OR select_id IS NULL order by id;
+IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id
+IS NOT TRUE NULL 1
+IS TRUE -9223372036854775808 2
+IS TRUE 9223372036854775807 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,'IS TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 107 OR select_id IS NULL) order by id;
+IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id
+IS NOT TRUE NULL 1
+IS TRUE -9223372036854775808 2
+IS TRUE 9223372036854775807 3
+IS NOT TRUE 0 4
+IS TRUE -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varbinary_1000, id FROM t1_values;
+SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 106 OR select_id IS NULL order by id;
+IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 106 OR select_id IS NULL) order by id;
+IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'),
+my_binary_30, id FROM t1_values;
+SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'),
+my_binary_30, id FROM t1_values
+WHERE select_id = 105 OR select_id IS NULL order by id;
+IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 105 OR select_id IS NULL) order by id;
+IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$--
+IS TRUE -1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varchar_1000, id FROM t1_values;
+SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 104 OR select_id IS NULL order by id;
+IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 104 OR select_id IS NULL) order by id;
+IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'),
+my_char_30, id FROM t1_values;
+SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'),
+my_char_30, id FROM t1_values
+WHERE select_id = 103 OR select_id IS NULL order by id;
+IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ' '
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 103 OR select_id IS NULL) order by id;
+IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id
+IS NOT TRUE NULL 1
+IS NOT TRUE 2
+IS NOT TRUE <--------30 characters-------> 3
+IS NOT TRUE ---äÖüß@µ*$-- 4
+IS TRUE -1 5
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ' '
+Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r),
+my_varbinary_1000, id FROM t1_values;
+SELECT CONVERT(my_varbinary_1000 USING koi8r),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 102 OR select_id IS NULL order by id;
+CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---???????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 102 OR select_id IS NULL) order by id;
+CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---???????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r),
+my_binary_30, id FROM t1_values;
+SELECT CONVERT(my_binary_30 USING koi8r),
+my_binary_30, id FROM t1_values
+WHERE select_id = 101 OR select_id IS NULL order by id;
+CONVERT(my_binary_30 USING koi8r) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---???????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 101 OR select_id IS NULL) order by id;
+CONVERT(my_binary_30 USING koi8r) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---???????@??*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r),
+my_varchar_1000, id FROM t1_values;
+SELECT CONVERT(my_varchar_1000 USING koi8r),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 100 OR select_id IS NULL order by id;
+CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 100 OR select_id IS NULL) order by id;
+CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r),
+my_char_30, id FROM t1_values;
+SELECT CONVERT(my_char_30 USING koi8r),
+my_char_30, id FROM t1_values
+WHERE select_id = 99 OR select_id IS NULL order by id;
+CONVERT(my_char_30 USING koi8r) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 99 OR select_id IS NULL) order by id;
+CONVERT(my_char_30 USING koi8r) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---????????@??*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1977 Cannot convert 'latin1' character 0xC3 to 'koi8r'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8),
+my_varbinary_1000, id FROM t1_values;
+SELECT CONVERT(my_varbinary_1000 USING utf8),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 98 OR select_id IS NULL order by id;
+CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---@*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8mb3) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 98 OR select_id IS NULL) order by id;
+CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---@*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8),
+my_binary_30, id FROM t1_values;
+SELECT CONVERT(my_binary_30 USING utf8),
+my_binary_30, id FROM t1_values
+WHERE select_id = 97 OR select_id IS NULL order by id;
+CONVERT(my_binary_30 USING utf8) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---@*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8mb3) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 97 OR select_id IS NULL) order by id;
+CONVERT(my_binary_30 USING utf8) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---@*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8),
+my_varchar_1000, id FROM t1_values;
+SELECT CONVERT(my_varchar_1000 USING utf8),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 96 OR select_id IS NULL order by id;
+CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8mb3) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 96 OR select_id IS NULL) order by id;
+CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8),
+my_char_30, id FROM t1_values;
+SELECT CONVERT(my_char_30 USING utf8),
+my_char_30, id FROM t1_values
+WHERE select_id = 95 OR select_id IS NULL order by id;
+CONVERT(my_char_30 USING utf8) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8mb3) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 95 OR select_id IS NULL) order by id;
+CONVERT(my_char_30 USING utf8) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS UNSIGNED INTEGER),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS UNSIGNED INTEGER),
+my_year, id FROM t1_values
+WHERE select_id = 94 OR select_id IS NULL order by id;
+CAST(my_year AS UNSIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 94 OR select_id IS NULL) order by id;
+CAST(my_year AS UNSIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS UNSIGNED INTEGER),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS UNSIGNED INTEGER),
+my_time, id FROM t1_values
+WHERE select_id = 93 OR select_id IS NULL order by id;
+CAST(my_time AS UNSIGNED INTEGER) my_time id
+NULL NULL 1
+0 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+Warnings:
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 93 OR select_id IS NULL) order by id;
+CAST(my_time AS UNSIGNED INTEGER) my_time id
+NULL NULL 1
+0 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+Warnings:
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS UNSIGNED INTEGER),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS UNSIGNED INTEGER),
+my_timestamp, id FROM t1_values
+WHERE select_id = 92 OR select_id IS NULL order by id;
+CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 92 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS UNSIGNED INTEGER),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS UNSIGNED INTEGER),
+my_date, id FROM t1_values
+WHERE select_id = 91 OR select_id IS NULL order by id;
+CAST(my_date AS UNSIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 91 OR select_id IS NULL) order by id;
+CAST(my_date AS UNSIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS UNSIGNED INTEGER),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS UNSIGNED INTEGER),
+my_datetime, id FROM t1_values
+WHERE select_id = 90 OR select_id IS NULL order by id;
+CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 90 OR select_id IS NULL) order by id;
+CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS UNSIGNED INTEGER),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS UNSIGNED INTEGER),
+my_double, id FROM t1_values
+WHERE select_id = 89 OR select_id IS NULL order by id;
+CAST(my_double AS UNSIGNED INTEGER) my_double id
+NULL NULL 1
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
+0 0 4
+0 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 89 OR select_id IS NULL) order by id;
+CAST(my_double AS UNSIGNED INTEGER) my_double id
+NULL NULL 1
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
+0 0 4
+0 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS UNSIGNED INTEGER),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS UNSIGNED INTEGER),
+my_decimal, id FROM t1_values
+WHERE select_id = 88 OR select_id IS NULL order by id;
+CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id
+NULL NULL 1
+0 -9999999999999999999999999999999999.999999999999999999999999999999 2
+18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+0 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '-1.000000000000000000000000000000' to UNSIGNED INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 88 OR select_id IS NULL) order by id;
+CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id
+NULL NULL 1
+0 -9999999999999999999999999999999999.999999999999999999999999999999 2
+18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+0 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '-1.000000000000000000000000000000' to UNSIGNED INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS UNSIGNED INTEGER),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS UNSIGNED INTEGER),
+my_bigint, id FROM t1_values
+WHERE select_id = 87 OR select_id IS NULL order by id;
+CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id
+NULL NULL 1
+9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+18446744073709551615 -1 5
+Warnings:
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 87 OR select_id IS NULL) order by id;
+CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id
+NULL NULL 1
+9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+18446744073709551615 -1 5
+Warnings:
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 86 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 86 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS UNSIGNED INTEGER),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS UNSIGNED INTEGER),
+my_binary_30, id FROM t1_values
+WHERE select_id = 85 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 85 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$--
+18446744073709551615 -1
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 84 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 84 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS UNSIGNED INTEGER),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS UNSIGNED INTEGER),
+my_char_30, id FROM t1_values
+WHERE select_id = 83 OR select_id IS NULL order by id;
+CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 83 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+18446744073709551615 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS SIGNED INTEGER),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS SIGNED INTEGER),
+my_year, id FROM t1_values
+WHERE select_id = 82 OR select_id IS NULL order by id;
+CAST(my_year AS SIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 82 OR select_id IS NULL) order by id;
+CAST(my_year AS SIGNED INTEGER) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS SIGNED INTEGER),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS SIGNED INTEGER),
+my_time, id FROM t1_values
+WHERE select_id = 81 OR select_id IS NULL order by id;
+CAST(my_time AS SIGNED INTEGER) my_time id
+NULL NULL 1
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 81 OR select_id IS NULL) order by id;
+CAST(my_time AS SIGNED INTEGER) my_time id
+NULL NULL 1
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS SIGNED INTEGER),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS SIGNED INTEGER),
+my_timestamp, id FROM t1_values
+WHERE select_id = 80 OR select_id IS NULL order by id;
+CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 80 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
+20010101102030 2001-01-01 10:20:30 1
+19700101140001 1970-01-01 14:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS SIGNED INTEGER),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS SIGNED INTEGER),
+my_date, id FROM t1_values
+WHERE select_id = 79 OR select_id IS NULL order by id;
+CAST(my_date AS SIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 79 OR select_id IS NULL) order by id;
+CAST(my_date AS SIGNED INTEGER) my_date id
+NULL NULL 1
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS SIGNED INTEGER),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS SIGNED INTEGER),
+my_datetime, id FROM t1_values
+WHERE select_id = 78 OR select_id IS NULL order by id;
+CAST(my_datetime AS SIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 78 OR select_id IS NULL) order by id;
+CAST(my_datetime AS SIGNED INTEGER) my_datetime id
+NULL NULL 1
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS SIGNED INTEGER),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS SIGNED INTEGER),
+my_double, id FROM t1_values
+WHERE select_id = 77 OR select_id IS NULL order by id;
+CAST(my_double AS SIGNED INTEGER) my_double id
+NULL NULL 1
+-9223372036854775808 -1.7976931348623e308 2
+9223372036854775807 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 77 OR select_id IS NULL) order by id;
+CAST(my_double AS SIGNED INTEGER) my_double id
+NULL NULL 1
+-9223372036854775808 -1.7976931348623e308 2
+9223372036854775807 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+Warnings:
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS SIGNED INTEGER),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS SIGNED INTEGER),
+my_decimal, id FROM t1_values
+WHERE select_id = 76 OR select_id IS NULL order by id;
+CAST(my_decimal AS SIGNED INTEGER) my_decimal id
+NULL NULL 1
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+-1 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 76 OR select_id IS NULL) order by id;
+CAST(my_decimal AS SIGNED INTEGER) my_decimal id
+NULL NULL 1
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
+0 0.000000000000000000000000000000 4
+-1 -1.000000000000000000000000000000 5
+Warnings:
+Warning 1916 Got overflow when converting '-9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+Warning 1916 Got overflow when converting '9999999999999999999999999999999999.999999999999999999999999999999' to INT. Value truncated
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS SIGNED INTEGER),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS SIGNED INTEGER),
+my_bigint, id FROM t1_values
+WHERE select_id = 75 OR select_id IS NULL order by id;
+CAST(my_bigint AS SIGNED INTEGER) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 75 OR select_id IS NULL) order by id;
+CAST(my_bigint AS SIGNED INTEGER) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 74 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 74 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS SIGNED INTEGER),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS SIGNED INTEGER),
+my_binary_30, id FROM t1_values
+WHERE select_id = 73 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 73 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id
+NULL NULL 1
+0
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$--
+-1 -1
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS SIGNED INTEGER),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS SIGNED INTEGER),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 72 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 72 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id
+NULL NULL 1
+0 2
+0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS SIGNED INTEGER),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS SIGNED INTEGER),
+my_char_30, id FROM t1_values
+WHERE select_id = 71 OR select_id IS NULL order by id;
+CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 71 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id
+NULL NULL 1
+0 2
+0 <--------30 characters-------> 3
+0 ---äÖüß@µ*$-- 4
+-1 -1 5
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS DECIMAL(37,2)),
+my_year, id FROM t1_values
+WHERE select_id = 70 OR select_id IS NULL order by id;
+CAST(my_year AS DECIMAL(37,2)) my_year id
+NULL NULL 1
+1901.00 1901 2
+2155.00 2155 3
+2000.00 2000 4
+2005.00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 70 OR select_id IS NULL) order by id;
+CAST(my_year AS DECIMAL(37,2)) my_year id
+NULL NULL 1
+1901.00 1901 2
+2155.00 2155 3
+2000.00 2000 4
+2005.00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS DECIMAL(37,2)),
+my_time, id FROM t1_values
+WHERE select_id = 69 OR select_id IS NULL order by id;
+CAST(my_time AS DECIMAL(37,2)) my_time id
+NULL NULL 1
+-8385959.00 -838:59:59 2
+8385959.00 838:59:59 3
+130000.00 13:00:00 4
+100000.00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 69 OR select_id IS NULL) order by id;
+CAST(my_time AS DECIMAL(37,2)) my_time id
+NULL NULL 1
+-8385959.00 -838:59:59 2
+8385959.00 838:59:59 3
+130000.00 13:00:00 4
+100000.00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS DECIMAL(37,2)),
+my_timestamp, id FROM t1_values
+WHERE select_id = 68 OR select_id IS NULL order by id;
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
+20010101102030.00 2001-01-01 10:20:30 1
+19700101140001.00 1970-01-01 14:00:01 2
+20380101025959.00 2038-01-01 02:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 68 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
+20010101102030.00 2001-01-01 10:20:30 1
+19700101140001.00 1970-01-01 14:00:01 2
+20380101025959.00 2038-01-01 02:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS DECIMAL(37,2)),
+my_date, id FROM t1_values
+WHERE select_id = 67 OR select_id IS NULL order by id;
+CAST(my_date AS DECIMAL(37,2)) my_date id
+NULL NULL 1
+10101.00 0001-01-01 2
+99991231.00 9999-12-31 3
+20040229.00 2004-02-29 4
+20050628.00 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 67 OR select_id IS NULL) order by id;
+CAST(my_date AS DECIMAL(37,2)) my_date id
+NULL NULL 1
+10101.00 0001-01-01 2
+99991231.00 9999-12-31 3
+20040229.00 2004-02-29 4
+20050628.00 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS DECIMAL(37,2)),
+my_datetime, id FROM t1_values
+WHERE select_id = 66 OR select_id IS NULL order by id;
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
+NULL NULL 1
+10101000000.00 0001-01-01 00:00:00 2
+99991231235959.00 9999-12-31 23:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 66 OR select_id IS NULL) order by id;
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
+NULL NULL 1
+10101000000.00 0001-01-01 00:00:00 2
+99991231235959.00 9999-12-31 23:59:59 3
+20040229235959.00 2004-02-29 23:59:59 4
+20050628100000.00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS DECIMAL(37,2)),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS DECIMAL(37,2)),
+my_double, id FROM t1_values
+WHERE select_id = 65 OR select_id IS NULL order by id;
+CAST(my_double AS DECIMAL(37,2)) my_double id
+NULL NULL 1
+-99999999999999999999999999999999999.99 -1.7976931348623e308 2
+99999999999999999999999999999999999.99 1.7976931348623e308 3
+0.00 0 4
+-1.00 -1 5
+-3333.33 -3333.3333 30
+Warnings:
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 2
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 3
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 65 OR select_id IS NULL) order by id;
+CAST(my_double AS DECIMAL(37,2)) my_double id
+NULL NULL 1
+-99999999999999999999999999999999999.99 -1.7976931348623e308 2
+99999999999999999999999999999999999.99 1.7976931348623e308 3
+0.00 0 4
+-1.00 -1 5
+-3333.33 -3333.3333 30
+Warnings:
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS DECIMAL(37,2)),
+my_decimal, id FROM t1_values
+WHERE select_id = 64 OR select_id IS NULL order by id;
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
+NULL NULL 1
+-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
+10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.00 0.000000000000000000000000000000 4
+-1.00 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 64 OR select_id IS NULL) order by id;
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
+NULL NULL 1
+-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
+10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.00 0.000000000000000000000000000000 4
+-1.00 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS DECIMAL(37,2)),
+my_bigint, id FROM t1_values
+WHERE select_id = 63 OR select_id IS NULL order by id;
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
+NULL NULL 1
+-9223372036854775808.00 -9223372036854775808 2
+9223372036854775807.00 9223372036854775807 3
+0.00 0 4
+-1.00 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 63 OR select_id IS NULL) order by id;
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
+NULL NULL 1
+-9223372036854775808.00 -9223372036854775808 2
+9223372036854775807.00 9223372036854775807 3
+0.00 0 4
+-1.00 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 62 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 29
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 62 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 29
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
+my_binary_30, id FROM t1_values
+WHERE select_id = 61 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
+NULL NULL 1
+0.00 2
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 28
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 61 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
+NULL NULL 1
+0.00
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$--
+-1.00 -1
+-3333.33 -3333.3333
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 60 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 27
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 60 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
+NULL NULL 1
+0.00 2
+0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 27
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS DECIMAL(37,2)),
+my_char_30, id FROM t1_values
+WHERE select_id = 59 OR select_id IS NULL order by id;
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
+NULL NULL 1
+0.00 2
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 26
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ' '
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 59 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
+NULL NULL 1
+0.00 2
+0.00 <--------30 characters-------> 3
+0.00 ---äÖüß@µ*$-- 4
+-1.00 -1 5
+-3333.33 -3333.3333 26
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ' '
+Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
+Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS TIME),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS TIME),
+my_year, id FROM t1_values
+WHERE select_id = 58 OR select_id IS NULL order by id;
+CAST(my_year AS TIME) my_year id
+NULL NULL 1
+00:00:00 1901 2
+00:00:00 2155 3
+00:00:00 2000 4
+00:00:00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 58 OR select_id IS NULL) order by id;
+CAST(my_year AS TIME) my_year id
+NULL NULL 1
+00:00:00 1901 2
+00:00:00 2155 3
+00:00:00 2000 4
+00:00:00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS TIME),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS TIME),
+my_time, id FROM t1_values
+WHERE select_id = 57 OR select_id IS NULL order by id;
+CAST(my_time AS TIME) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 57 OR select_id IS NULL) order by id;
+CAST(my_time AS TIME) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS TIME),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS TIME),
+my_timestamp, id FROM t1_values
+WHERE select_id = 56 OR select_id IS NULL order by id;
+CAST(my_timestamp AS TIME) my_timestamp id
+10:20:30 2001-01-01 10:20:30 1
+14:00:01 1970-01-01 14:00:01 2
+02:59:59 2038-01-01 02:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 56 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS TIME) my_timestamp id
+10:20:30 2001-01-01 10:20:30 1
+14:00:01 1970-01-01 14:00:01 2
+02:59:59 2038-01-01 02:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS TIME),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS TIME),
+my_date, id FROM t1_values
+WHERE select_id = 55 OR select_id IS NULL order by id;
+CAST(my_date AS TIME) my_date id
+NULL NULL 1
+00:00:00 0001-01-01 2
+00:00:00 9999-12-31 3
+00:00:00 2004-02-29 4
+00:00:00 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 55 OR select_id IS NULL) order by id;
+CAST(my_date AS TIME) my_date id
+NULL NULL 1
+00:00:00 0001-01-01 2
+00:00:00 9999-12-31 3
+00:00:00 2004-02-29 4
+00:00:00 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS TIME),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS TIME),
+my_datetime, id FROM t1_values
+WHERE select_id = 54 OR select_id IS NULL order by id;
+CAST(my_datetime AS TIME) my_datetime id
+NULL NULL 1
+00:00:00 0001-01-01 00:00:00 2
+23:59:59 9999-12-31 23:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 54 OR select_id IS NULL) order by id;
+CAST(my_datetime AS TIME) my_datetime id
+NULL NULL 1
+00:00:00 0001-01-01 00:00:00 2
+23:59:59 9999-12-31 23:59:59 3
+23:59:59 2004-02-29 23:59:59 4
+10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS TIME),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS TIME),
+my_double, id FROM t1_values
+WHERE select_id = 53 OR select_id IS NULL order by id;
+CAST(my_double AS TIME) my_double id
+NULL NULL 1
+-838:59:59 -1.7976931348623e308 2
+838:59:59 1.7976931348623e308 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 25
+Warnings:
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 53 OR select_id IS NULL) order by id;
+CAST(my_double AS TIME) my_double id
+NULL NULL 1
+-838:59:59 -1.7976931348623e308 2
+838:59:59 1.7976931348623e308 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 25
+Warnings:
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS TIME),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS TIME),
+my_bigint, id FROM t1_values
+WHERE select_id = 52 OR select_id IS NULL order by id;
+CAST(my_bigint AS TIME) my_bigint id
+NULL NULL 1
+-838:59:59 -9223372036854775808 2
+838:59:59 9223372036854775807 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 24
+Warnings:
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 52 OR select_id IS NULL) order by id;
+CAST(my_bigint AS TIME) my_bigint id
+NULL NULL 1
+-838:59:59 -9223372036854775808 2
+838:59:59 9223372036854775807 3
+00:00:00 0 4
+-00:00:01 -1 5
+00:17:58 1758 24
+Warnings:
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS TIME),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS TIME),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 51 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 23
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 51 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 23
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS TIME),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS TIME),
+my_binary_30, id FROM t1_values
+WHERE select_id = 50 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS TIME) my_binary_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 22
+Warnings:
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 50 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS TIME) my_binary_30 id
+NULL NULL 1
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
+-00:00:01 -1
+41:58:00 1 17:58
+Warnings:
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS TIME),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS TIME),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 49 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 21
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 49 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 21
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS TIME),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS TIME),
+my_char_30, id FROM t1_values
+WHERE select_id = 48 OR select_id IS NULL order by id;
+CAST(my_char_30 AS TIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 20
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 48 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS TIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+-00:00:01 -1 5
+41:58:00 1 17:58 20
+Warnings:
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS DATETIME),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS DATETIME),
+my_year, id FROM t1_values
+WHERE select_id = 47 OR select_id IS NULL order by id;
+CAST(my_year AS DATETIME) my_year id
+NULL NULL 1
+1901-00-00 00:00:00 1901 2
+2155-00-00 00:00:00 2155 3
+2000-00-00 00:00:00 2000 4
+2005-00-00 00:00:00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 47 OR select_id IS NULL) order by id;
+CAST(my_year AS DATETIME) my_year id
+NULL NULL 1
+1901-00-00 00:00:00 1901 2
+2155-00-00 00:00:00 2155 3
+2000-00-00 00:00:00 2000 4
+2005-00-00 00:00:00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS DATETIME),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS DATETIME),
+my_time, id FROM t1_values
+WHERE select_id = 46 OR select_id IS NULL order by id;
+CAST(my_time AS DATETIME) my_time id
+NULL NULL 1
+2000-12-30 01:00:01 -838:59:59 2
+2001-03-09 22:59:59 838:59:59 3
+2001-02-03 13:00:00 13:00:00 4
+2001-02-03 10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 46 OR select_id IS NULL) order by id;
+CAST(my_time AS DATETIME) my_time id
+NULL NULL 1
+2000-12-30 01:00:01 -838:59:59 2
+2001-03-09 22:59:59 838:59:59 3
+2001-02-03 13:00:00 13:00:00 4
+2001-02-03 10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATETIME),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS DATETIME),
+my_timestamp, id FROM t1_values
+WHERE select_id = 45 OR select_id IS NULL order by id;
+CAST(my_timestamp AS DATETIME) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 45 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS DATETIME) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS DATETIME),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS DATETIME),
+my_date, id FROM t1_values
+WHERE select_id = 44 OR select_id IS NULL order by id;
+CAST(my_date AS DATETIME) my_date id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 2
+9999-12-31 00:00:00 9999-12-31 3
+2004-02-29 00:00:00 2004-02-29 4
+2005-06-28 00:00:00 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 44 OR select_id IS NULL) order by id;
+CAST(my_date AS DATETIME) my_date id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 2
+9999-12-31 00:00:00 9999-12-31 3
+2004-02-29 00:00:00 2004-02-29 4
+2005-06-28 00:00:00 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATETIME),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS DATETIME),
+my_datetime, id FROM t1_values
+WHERE select_id = 43 OR select_id IS NULL order by id;
+CAST(my_datetime AS DATETIME) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 43 OR select_id IS NULL) order by id;
+CAST(my_datetime AS DATETIME) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS DATETIME),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS DATETIME),
+my_double, id FROM t1_values
+WHERE select_id = 42 OR select_id IS NULL order by id;
+CAST(my_double AS DATETIME) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 19
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 6
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 42 OR select_id IS NULL) order by id;
+CAST(my_double AS DATETIME) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 19
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATETIME),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS DATETIME),
+my_bigint, id FROM t1_values
+WHERE select_id = 41 OR select_id IS NULL order by id;
+CAST(my_bigint AS DATETIME) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 18
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 6
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 41 OR select_id IS NULL) order by id;
+CAST(my_bigint AS DATETIME) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 00:00:00 0 4
+NULL -1 5
+NULL 200506271758 18
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATETIME),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS DATETIME),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 40 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 17
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 40 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 17
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATETIME),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS DATETIME),
+my_binary_30, id FROM t1_values
+WHERE select_id = 39 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS DATETIME) my_binary_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 16
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 39 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS DATETIME) my_binary_30 id
+NULL NULL 1
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
+NULL -1
+2005-06-27 17:58:00 2005-06-27 17:58
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATETIME),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS DATETIME),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 38 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 15
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 38 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 15
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATETIME),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS DATETIME),
+my_char_30, id FROM t1_values
+WHERE select_id = 37 OR select_id IS NULL order by id;
+CAST(my_char_30 AS DATETIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 14
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 37 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS DATETIME) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 17:58:00 2005-06-27 17:58 14
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS DATE),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS DATE),
+my_year, id FROM t1_values
+WHERE select_id = 36 OR select_id IS NULL order by id;
+CAST(my_year AS DATE) my_year id
+NULL NULL 1
+1901-00-00 1901 2
+2155-00-00 2155 3
+2000-00-00 2000 4
+2005-00-00 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 36 OR select_id IS NULL) order by id;
+CAST(my_year AS DATE) my_year id
+NULL NULL 1
+1901-00-00 1901 2
+2155-00-00 2155 3
+2000-00-00 2000 4
+2005-00-00 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS DATE),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS DATE),
+my_time, id FROM t1_values
+WHERE select_id = 35 OR select_id IS NULL order by id;
+CAST(my_time AS DATE) my_time id
+NULL NULL 1
+2000-12-30 -838:59:59 2
+2001-03-09 838:59:59 3
+2001-02-03 13:00:00 4
+2001-02-03 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 35 OR select_id IS NULL) order by id;
+CAST(my_time AS DATE) my_time id
+NULL NULL 1
+2000-12-30 -838:59:59 2
+2001-03-09 838:59:59 3
+2001-02-03 13:00:00 4
+2001-02-03 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATE),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS DATE),
+my_timestamp, id FROM t1_values
+WHERE select_id = 34 OR select_id IS NULL order by id;
+CAST(my_timestamp AS DATE) my_timestamp id
+2001-01-01 2001-01-01 10:20:30 1
+1970-01-01 1970-01-01 14:00:01 2
+2038-01-01 2038-01-01 02:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 34 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS DATE) my_timestamp id
+2001-01-01 2001-01-01 10:20:30 1
+1970-01-01 1970-01-01 14:00:01 2
+2038-01-01 2038-01-01 02:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS DATE),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS DATE),
+my_date, id FROM t1_values
+WHERE select_id = 33 OR select_id IS NULL order by id;
+CAST(my_date AS DATE) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 33 OR select_id IS NULL) order by id;
+CAST(my_date AS DATE) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATE),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS DATE),
+my_datetime, id FROM t1_values
+WHERE select_id = 32 OR select_id IS NULL order by id;
+CAST(my_datetime AS DATE) my_datetime id
+NULL NULL 1
+0001-01-01 0001-01-01 00:00:00 2
+9999-12-31 9999-12-31 23:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 32 OR select_id IS NULL) order by id;
+CAST(my_datetime AS DATE) my_datetime id
+NULL NULL 1
+0001-01-01 0001-01-01 00:00:00 2
+9999-12-31 9999-12-31 23:59:59 3
+2004-02-29 2004-02-29 23:59:59 4
+2005-06-28 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS DATE),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS DATE),
+my_double, id FROM t1_values
+WHERE select_id = 31 OR select_id IS NULL order by id;
+CAST(my_double AS DATE) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 13
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 31 OR select_id IS NULL) order by id;
+CAST(my_double AS DATE) my_double id
+NULL NULL 1
+NULL -1.7976931348623e308 2
+NULL 1.7976931348623e308 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 13
+Warnings:
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATE),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS DATE),
+my_bigint, id FROM t1_values
+WHERE select_id = 30 OR select_id IS NULL order by id;
+CAST(my_bigint AS DATE) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 12
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 30 OR select_id IS NULL) order by id;
+CAST(my_bigint AS DATE) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+NULL 9223372036854775807 3
+0000-00-00 0 4
+NULL -1 5
+2005-06-27 20050627 12
+Warnings:
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATE),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS DATE),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 29 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 11
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 29 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 11
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATE),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS DATE),
+my_binary_30, id FROM t1_values
+WHERE select_id = 28 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS DATE) my_binary_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 10
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect date value: '2005-06-27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 28 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS DATE) my_binary_30 id
+NULL NULL 1
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
+NULL -1
+2005-06-27 2005-06-27
+Warnings:
+Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Truncated incorrect date value: '2005-06-27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATE),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS DATE),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 27 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS DATE) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 9
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 27 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS DATE) my_varchar_1000 id
+NULL NULL 1
+NULL 2
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 9
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATE),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS DATE),
+my_char_30, id FROM t1_values
+WHERE select_id = 26 OR select_id IS NULL order by id;
+CAST(my_char_30 AS DATE) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 8
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 26 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS DATE) my_char_30 id
+NULL NULL 1
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
+NULL -1 5
+2005-06-27 2005-06-27 8
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: '<--------30 characters------->'
+Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect datetime value: '-1'
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS CHAR),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS CHAR),
+my_year, id FROM t1_values
+WHERE select_id = 25 OR select_id IS NULL order by id;
+CAST(my_year AS CHAR) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 25 OR select_id IS NULL) order by id;
+CAST(my_year AS CHAR) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS CHAR),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS CHAR),
+my_time, id FROM t1_values
+WHERE select_id = 24 OR select_id IS NULL order by id;
+CAST(my_time AS CHAR) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 24 OR select_id IS NULL) order by id;
+CAST(my_time AS CHAR) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS CHAR),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS CHAR),
+my_timestamp, id FROM t1_values
+WHERE select_id = 23 OR select_id IS NULL order by id;
+CAST(my_timestamp AS CHAR) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 23 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS CHAR) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS CHAR),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS CHAR),
+my_date, id FROM t1_values
+WHERE select_id = 22 OR select_id IS NULL order by id;
+CAST(my_date AS CHAR) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 22 OR select_id IS NULL) order by id;
+CAST(my_date AS CHAR) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS CHAR),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS CHAR),
+my_datetime, id FROM t1_values
+WHERE select_id = 21 OR select_id IS NULL order by id;
+CAST(my_datetime AS CHAR) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 21 OR select_id IS NULL) order by id;
+CAST(my_datetime AS CHAR) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS CHAR),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS CHAR),
+my_double, id FROM t1_values
+WHERE select_id = 20 OR select_id IS NULL order by id;
+CAST(my_double AS CHAR) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 20 OR select_id IS NULL) order by id;
+CAST(my_double AS CHAR) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS CHAR),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS CHAR),
+my_decimal, id FROM t1_values
+WHERE select_id = 19 OR select_id IS NULL order by id;
+CAST(my_decimal AS CHAR) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 19 OR select_id IS NULL) order by id;
+CAST(my_decimal AS CHAR) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS CHAR),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS CHAR),
+my_bigint, id FROM t1_values
+WHERE select_id = 18 OR select_id IS NULL order by id;
+CAST(my_bigint AS CHAR) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 18 OR select_id IS NULL) order by id;
+CAST(my_bigint AS CHAR) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS CHAR),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS CHAR),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 17 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 17 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS CHAR),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS CHAR),
+my_binary_30, id FROM t1_values
+WHERE select_id = 16 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS CHAR) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 16 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS CHAR) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS CHAR),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS CHAR),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 15 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 15 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS CHAR),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS CHAR),
+my_char_30, id FROM t1_values
+WHERE select_id = 14 OR select_id IS NULL order by id;
+CAST(my_char_30 AS CHAR) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 14 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS CHAR) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_year AS BINARY),
+my_year, id FROM t1_values;
+SELECT CAST(my_year AS BINARY),
+my_year, id FROM t1_values
+WHERE select_id = 13 OR select_id IS NULL order by id;
+CAST(my_year AS BINARY) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 13 OR select_id IS NULL) order by id;
+CAST(my_year AS BINARY) my_year id
+NULL NULL 1
+1901 1901 2
+2155 2155 3
+2000 2000 4
+2005 2005 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_time AS BINARY),
+my_time, id FROM t1_values;
+SELECT CAST(my_time AS BINARY),
+my_time, id FROM t1_values
+WHERE select_id = 12 OR select_id IS NULL order by id;
+CAST(my_time AS BINARY) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 12 OR select_id IS NULL) order by id;
+CAST(my_time AS BINARY) my_time id
+NULL NULL 1
+-838:59:59 -838:59:59 2
+838:59:59 838:59:59 3
+13:00:00 13:00:00 4
+10:00:00 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS BINARY),
+my_timestamp, id FROM t1_values;
+SELECT CAST(my_timestamp AS BINARY),
+my_timestamp, id FROM t1_values
+WHERE select_id = 11 OR select_id IS NULL order by id;
+CAST(my_timestamp AS BINARY) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 11 OR select_id IS NULL) order by id;
+CAST(my_timestamp AS BINARY) my_timestamp id
+2001-01-01 10:20:30 2001-01-01 10:20:30 1
+1970-01-01 14:00:01 1970-01-01 14:00:01 2
+2038-01-01 02:59:59 2038-01-01 02:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_date AS BINARY),
+my_date, id FROM t1_values;
+SELECT CAST(my_date AS BINARY),
+my_date, id FROM t1_values
+WHERE select_id = 10 OR select_id IS NULL order by id;
+CAST(my_date AS BINARY) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 10 OR select_id IS NULL) order by id;
+CAST(my_date AS BINARY) my_date id
+NULL NULL 1
+0001-01-01 0001-01-01 2
+9999-12-31 9999-12-31 3
+2004-02-29 2004-02-29 4
+2005-06-28 2005-06-28 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS BINARY),
+my_datetime, id FROM t1_values;
+SELECT CAST(my_datetime AS BINARY),
+my_datetime, id FROM t1_values
+WHERE select_id = 9 OR select_id IS NULL order by id;
+CAST(my_datetime AS BINARY) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 9 OR select_id IS NULL) order by id;
+CAST(my_datetime AS BINARY) my_datetime id
+NULL NULL 1
+0001-01-01 00:00:00 0001-01-01 00:00:00 2
+9999-12-31 23:59:59 9999-12-31 23:59:59 3
+2004-02-29 23:59:59 2004-02-29 23:59:59 4
+2005-06-28 10:00:00 2005-06-28 10:00:00 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_double AS BINARY),
+my_double, id FROM t1_values;
+SELECT CAST(my_double AS BINARY),
+my_double, id FROM t1_values
+WHERE select_id = 8 OR select_id IS NULL order by id;
+CAST(my_double AS BINARY) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 8 OR select_id IS NULL) order by id;
+CAST(my_double AS BINARY) my_double id
+NULL NULL 1
+-1.7976931348623e308 -1.7976931348623e308 2
+1.7976931348623e308 1.7976931348623e308 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS BINARY),
+my_decimal, id FROM t1_values;
+SELECT CAST(my_decimal AS BINARY),
+my_decimal, id FROM t1_values
+WHERE select_id = 7 OR select_id IS NULL order by id;
+CAST(my_decimal AS BINARY) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 7 OR select_id IS NULL) order by id;
+CAST(my_decimal AS BINARY) my_decimal id
+NULL NULL 1
+-9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3
+0.000000000000000000000000000000 0.000000000000000000000000000000 4
+-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS BINARY),
+my_bigint, id FROM t1_values;
+SELECT CAST(my_bigint AS BINARY),
+my_bigint, id FROM t1_values
+WHERE select_id = 6 OR select_id IS NULL order by id;
+CAST(my_bigint AS BINARY) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 6 OR select_id IS NULL) order by id;
+CAST(my_bigint AS BINARY) my_bigint id
+NULL NULL 1
+-9223372036854775808 -9223372036854775808 2
+9223372036854775807 9223372036854775807 3
+0 0 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS BINARY),
+my_varbinary_1000, id FROM t1_values;
+SELECT CAST(my_varbinary_1000 AS BINARY),
+my_varbinary_1000, id FROM t1_values
+WHERE select_id = 5 OR select_id IS NULL order by id;
+CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 5 OR select_id IS NULL) order by id;
+CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS BINARY),
+my_binary_30, id FROM t1_values;
+SELECT CAST(my_binary_30 AS BINARY),
+my_binary_30, id FROM t1_values
+WHERE select_id = 4 OR select_id IS NULL order by id;
+CAST(my_binary_30 AS BINARY) my_binary_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 4 OR select_id IS NULL) order by id;
+CAST(my_binary_30 AS BINARY) my_binary_30 id
+NULL NULL 1
+
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$--
+-1
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS BINARY),
+my_varchar_1000, id FROM t1_values;
+SELECT CAST(my_varchar_1000 AS BINARY),
+my_varchar_1000, id FROM t1_values
+WHERE select_id = 3 OR select_id IS NULL order by id;
+CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 3 OR select_id IS NULL) order by id;
+CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id
+NULL NULL 1
+ 2
+<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS BINARY),
+my_char_30, id FROM t1_values;
+SELECT CAST(my_char_30 AS BINARY),
+my_char_30, id FROM t1_values
+WHERE select_id = 2 OR select_id IS NULL order by id;
+CAST(my_char_30 AS BINARY) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 2 OR select_id IS NULL) order by id;
+CAST(my_char_30 AS BINARY) my_char_30 id
+NULL NULL 1
+ 2
+<--------30 characters-------> <--------30 characters-------> 3
+ ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
+-1 -1 5
+DROP VIEW v1;
+
+
+CREATE VIEW v1 AS SELECT sqrt(my_bigint), my_bigint, id FROM t1_values;
+SELECT sqrt(my_bigint), my_bigint, id FROM t1_values
+WHERE select_id = 1 OR select_id IS NULL order by id;
+sqrt(my_bigint) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+3037000499.97605 9223372036854775807 3
+0 0 4
+NULL -1 5
+2 4 6
+NULL -25 7
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
+SELECT v1.* FROM v1
+WHERE v1.id IN (SELECT id FROM t1_values
+WHERE select_id = 1 OR select_id IS NULL) order by id;
+sqrt(my_bigint) my_bigint id
+NULL NULL 1
+NULL -9223372036854775808 2
+3037000499.97605 9223372036854775807 3
+0 0 4
+NULL -1 5
+2 4 6
+NULL -25 7
+DROP VIEW v1;
+
+
+DROP TABLE t1_selects, t1_modes, t1_values;
+SET timestamp=DEFAULT;
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result
new file mode 100644
index 00000000..6e9615c2
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result
@@ -0,0 +1,1403 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.2 - Syntax checks for the stored procedure-specific
+programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE:
+--------------------------------------------------------------------------------
+
+Testcase 3.1.2.8:
+-----------------
+
+Ensure that the scope of each BEGIN/END compound statement within a stored
+procedure definition is properly applied
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp1( )
+begin_label: BEGIN
+declare x char DEFAULT 'x';
+declare y char DEFAULT 'y';
+set x = '1';
+set y = '2';
+label1: BEGIN
+declare x char DEFAULT 'X';
+declare y char DEFAULT 'Y';
+SELECT f1, f2 into x, y from t2 limit 1;
+SELECT '1.1', x, y;
+label2: BEGIN
+declare x char default 'a';
+declare y char default 'b';
+label3: BEGIN
+declare x char default 'c';
+declare y char default 'd';
+label4: BEGIN
+declare x char default 'e';
+declare y char default 'f';
+label5: BEGIN
+declare x char default 'g';
+declare y char default 'h';
+SELECT 5, x, y;
+END label5;
+SELECT 4, x, y;
+END label4;
+SELECT 3, x, y;
+END label3;
+SELECT 2, x, y;
+END label2;
+END label1;
+set @v1 = x;
+set @v2 = y;
+SELECT '1.2', @v1, @v2;
+END begin_label//
+CALL sp1();
+1.1 x y
+1.1 a a
+5 x y
+5 g h
+4 x y
+4 e f
+3 x y
+3 c d
+2 x y
+2 a b
+1.2 @v1 @v2
+1.2 1 2
+Warnings:
+Warning 1265 Data truncated for column 'x' at row 1
+Warning 1265 Data truncated for column 'y' at row 1
+DROP PROCEDURE IF EXISTS sp1;
+
+Testcase 3.1.2.26:
+------------------
+
+Ensure that the initial value of every variable declared for a stored procedure
+is either NULL or its DEFAULT value, as appropriate.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+set @v1=0;
+set @v2=0;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x1 char default 'x';
+declare y1 char;
+declare x2 tinytext default 'tinytext';
+declare y2 tinytext;
+declare x3 datetime default '2005-10-03 12:13:14';
+declare y3 datetime;
+declare x4 float default 1.2;
+declare y4 float;
+declare x5 blob default 'b';
+declare y5 blob;
+declare x6 smallint default 127;
+declare y6 smallint;
+SELECT x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6;
+END//
+CALL sp1();
+x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6
+x tinytext 2005-10-03 12:13:14 1.2 b 127 NULL NULL NULL NULL NULL NULL
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.30:
+------------------
+
+Ensure that, when a stored procedure is called/executed, every variable always
+uses the correct value: either the value with which it is initialized or the
+value to which it is subsequently SET or otherwise assigned, as appropriate.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( IN invar INT, OUT outvar INT )
+BEGIN
+declare x integer;
+declare y integer default 1;
+set @x = x;
+set @y = y;
+set @z = 234;
+SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1;
+SELECT @x, @y, @z, invar;
+BEGIN
+set @x = 2;
+SELECT @x, @y, @z;
+SET outvar = @x * invar + @z * @f;
+SET invar = outvar;
+BEGIN
+set @y = null, @z = 'abcd';
+SELECT @x, @y, @z;
+END;
+END;
+END//
+SET @invar = 100;
+SET @outvar = @invar;
+SET @f = 10;
+SELECT @x, @y, @z, @invar, @outvar;
+@x @y @z @invar @outvar
+NULL NULL NULL 100 100
+CALL sp1( @invar, @outvar );
+@x @y @z invar
+a` a` 234 100
+@x @y @z
+2 a` 234
+@x @y @z
+2 NULL abcd
+SELECT @x, @y, @z, @invar, @outvar;
+@x @y @z @invar @outvar
+2 NULL abcd 100 2540
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.31:
+------------------
+
+Ensure that the SELECT ... INTO statement properly assigns values to the
+variables in its variable list.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+set @x=x;
+set @y=y;
+SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1;
+SELECT @x, @y;
+END//
+CALL sp1();
+@x @y
+-5000 1000-01-01
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.32:
+------------------
+
+Ensure that a SELECT ... INTO statement that retrieves multiple rows is
+rejected, with an appropriate error message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+set @x=x;
+set @y=y;
+SELECT f4, f3 into @x, @y from t2;
+END//
+CALL sp1();
+ERROR 42000: Result consisted of more than one row
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.33:
+------------------
+
+Ensure that a SELECT ... INTO statement that retrieves too many columns for the
+number of variables in its variable list is rejected, with an appropriate error
+message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+set @x=x;
+set @y=y;
+SELECT f4, f3, f2, f1 into @x, @y from t2;
+END//
+CALL sp1();
+ERROR 21000: The used SELECT statements have a different number of columns
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.34:
+------------------
+
+Ensure that a SELECT ... INTO statement that retrieves too few columns for the
+number of variables in its variable list is rejected, with an appropriate error
+message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer; declare z integer;
+set @x=x;
+set @y=y;
+set @z=z;
+SELECT f4 into @x, @y, @z from t2;
+END//
+CALL sp1();
+ERROR 21000: The used SELECT statements have a different number of columns
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.38:
+------------------
+
+Ensure that the scope of every condition declared is properly applied.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+create table res_t1(w char unique, x char);
+insert into res_t1 values('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+SELECT '-1-', x1, x2, x3, x4, x5, x6;
+BEGIN
+declare condname condition for sqlstate '23000';
+declare continue handler for condname set x5 = 1;
+set x6 = 0;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+SELECT '-2-', x1, x2, x3, x4, x5, x6;
+END;
+begin1_label: BEGIN
+BEGIN
+declare condname condition for sqlstate '20000';
+declare continue handler for condname set x1 = 1;
+set x2 = 0;
+case x2
+when 1 then set x2=10;
+when 2 then set x2=11;
+END case;
+set x2 = 1;
+SELECT '-3-', x1, x2, x3, x4, x5, x6;
+begin2_label: BEGIN
+BEGIN
+declare condname condition for sqlstate '23000';
+declare exit handler for condname set x3 = 1;
+set x4= 1;
+SELECT '-4a', x1, x2, x3, x4, x5, x6;
+insert into res_t1 values ('a', 'b');
+set x4= 2;
+SELECT '-4b', x1, x2, x3, x4, x5, x6;
+END;
+SELECT '-5-', x1, x2, x3, x4, x5, x6;
+END begin2_label;
+SELECT '-6-', x1, x2, x3, x4, x5, x6;
+END;
+SELECT '-7-', x1, x2, x3, x4, x5, x6;
+END begin1_label;
+SELECT 'END', x1, x2, x3, x4, x5, x6;
+END//
+CALL h1();
+-1- x1 x2 x3 x4 x5 x6
+-1- 0 0 0 0 0 0
+-2- x1 x2 x3 x4 x5 x6
+-2- 0 0 0 0 1 1
+-3- x1 x2 x3 x4 x5 x6
+-3- 1 1 0 0 1 1
+-4a x1 x2 x3 x4 x5 x6
+-4a 1 1 0 1 1 1
+-5- x1 x2 x3 x4 x5 x6
+-5- 1 1 1 1 1 1
+-6- x1 x2 x3 x4 x5 x6
+-6- 1 1 1 1 1 1
+-7- x1 x2 x3 x4 x5 x6
+-7- 1 1 1 1 1 1
+END x1 x2 x3 x4 x5 x6
+END 1 1 1 1 1 1
+DROP TABLE IF EXISTS tnull;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE TABLE tnull(f1 int);
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '42S02';
+declare continue handler for cond1 set @var2 = 1;
+BEGIN
+declare cond1 condition for sqlstate '23000';
+declare continue handler for cond1 set @var2 = 1;
+END;
+insert into tnull values(1);
+END//
+CALL sp1();
+DROP PROCEDURE h1;
+drop table res_t1;
+DROP PROCEDURE sp1;
+DROP TABLE tnull;
+
+Testcase 3.1.2.43:
+------------------
+
+Ensure that the DECLARE ... HANDLER FOR statement can not declare any handler
+for a condition declared outside of the scope of the handler.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS h2;
+drop table IF EXISTS res_t1;
+create table res_t1(w char unique, x char);
+insert into res_t1 values ('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare cond_1 condition for sqlstate '23000';
+declare continue handler for cond_1 set x5 = 1;
+BEGIN
+declare cond_2 condition for sqlstate '20000';
+declare continue handler for cond_1 set x1 = 1;
+BEGIN
+declare continue handler for cond_2 set x3 = 1;
+set x2 = 1;
+END;
+set x6 = 0;
+END;
+BEGIN
+declare continue handler for cond_1 set x1 = 1;
+BEGIN
+declare continue handler for cond_2 set x3 = 1;
+set x2 = 1;
+END;
+set x6 = 0;
+END;
+END;
+SELECT x1, x2, x3, x4, x5, x6;
+END//
+ERROR 42000: Undefined CONDITION: cond_2
+CREATE PROCEDURE h2 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare condname condition for sqlstate '23000';
+declare continue handler for condname set x5 = 1;
+BEGIN
+declare condname condition for sqlstate '20000';
+declare continue handler for condname set x1 = 1;
+BEGIN
+declare condname condition for sqlstate '42000';
+declare continue handler for condname set x3 = 1;
+set x6 = 0;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+set x4= 0;
+CALL sp1();
+set x4= 1;
+set x2 = 0;
+case x2
+when 1 then set x2=10;
+when 2 then set x2=11;
+END case;
+set x2 = 1;
+END;
+set x2 = 0;
+case x2
+when 1 then set x2=10;
+when 2 then set x2=11;
+END case;
+set x2 = 1;
+set x6 = 0;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+END;
+END;
+SELECT x1, x2, x3, x4, x5, x6;
+END//
+CALL h2();
+x1 x2 x3 x4 x5 x6
+1 1 1 1 1 1
+SELECT * FROM res_t1;
+w x
+a b
+DROP PROCEDURE h2;
+drop table res_t1;
+
+Testcase 3.1.2.44:
+------------------
+
+Ensure that the DECLARE ... HANDLER FOR statement cannot declare a handler for
+any invalid, or undeclared, condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare condname1 condition for sqlstate '23000';
+BEGIN
+declare condname2 condition for sqlstate '20000';
+declare continue handler for condname1 set x3 = 1;
+declare continue handler for condname2 set x1 = 1;
+END;
+END;
+BEGIN
+declare condname3 condition for sqlstate '42000';
+declare continue handler for condname1 set x3 = 1;
+declare continue handler for condname2 set x5 = 1;
+declare continue handler for condname3 set x1 = 1;
+END;
+END//
+ERROR 42000: Undefined CONDITION: condname1
+CREATE PROCEDURE h1 ()
+BEGIN
+DECLARE x1 INT DEFAULT 0;
+BEGIN
+DECLARE condname1 CONDITION CHECK SQLSTATE '23000';
+END;
+DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
+END//
+ERROR 42000: 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 'CHECK SQLSTATE '23000';
+END;
+DECLARE CONTINUE HANDLER FOR condname1 SET x1 = ...' at line 5
+CREATE PROCEDURE h1 ()
+BEGIN
+DECLARE x1 INT DEFAULT 0;
+BEGIN
+DECLARE condname1 CONDITION FOR SQLSTATE 'qwert';
+END;
+DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
+END//
+ERROR 42000: Bad SQLSTATE: 'qwert'
+
+Testcase 3.1.2.45 + 3.1.2.50:
+-----------------------------
+
+45. Ensure that the scope of every handler declared is properly applied.
+50. Ensure that a CONTINUE handler allows the execution of the stored procedure
+. to continue once the handler statement has completed its own execution (that
+. is, once the handler action statement has been executed).
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p1undo;
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+drop table IF EXISTS res_t1;
+==> 'UNDO' is still not supported.
+create procedure p1undo ()
+begin
+declare undo handler for sqlexception select '1';
+select * from tqq;
+SELECT 'end of 1';
+end;//
+ERROR 42000: 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 'undo handler for sqlexception select '1';
+select * from tqq;
+SELECT 'end of 1...' at line 3
+create procedure p1 ()
+begin
+declare exit handler for sqlexception select 'exit handler 1';
+begin
+declare exit handler for sqlexception select 'exit handler 2';
+begin
+declare continue handler for sqlexception select 'continue handler 3';
+drop table if exists tqq;
+select * from tqq;
+SELECT 'end of BEGIN/END 3';
+end;
+drop table if exists tqq;
+select * from tqq;
+SELECT 'end of BEGIN/END 2';
+end;
+select * from tqq;
+SELECT 'end of BEGIN/END 1';
+end;//
+call p1()//
+continue handler 3
+continue handler 3
+end of BEGIN/END 3
+end of BEGIN/END 3
+exit handler 2
+exit handler 2
+exit handler 1
+exit handler 1
+create table res_t1(w char unique, x char);
+insert into res_t1 values ('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1, x2, x3, x4, x5, x6 int default 0;
+BEGIN
+declare continue handler for sqlstate '23000' set x5 = 1;
+insert into res_t1 values ('a', 'b');
+set x6 = 1;
+END;
+begin1_label: BEGIN
+BEGIN
+declare continue handler for sqlstate '23000' set x1 = 1;
+insert into res_t1 values ('a', 'b');
+set x2 = 1;
+begin2_label: BEGIN
+BEGIN
+declare exit handler for sqlstate '23000' set x3 = 1;
+set x4= 1;
+insert into res_t1 values ('a', 'b');
+set x4= 0;
+END;
+END begin2_label;
+END;
+END begin1_label;
+SELECT x1, x2, x3, x4, x5, x6;
+END//
+CALL h1();
+x1 x2 x3 x4 x5 x6
+1 1 1 1 1 1
+This will fail, SQLSTATE 00000 is not allowed
+CREATE PROCEDURE sp1()
+begin1_label:BEGIN
+declare exit handler for sqlstate '00000' set @var1 = 5;
+set @var2 = 6;
+begin2_label:BEGIN
+declare continue handler for sqlstate '00000' set @var3 = 7;
+set @var4 = 8;
+SELECT @var3, @var4;
+END begin2_label;
+SELECT @var1, @var2;
+END begin1_label//
+ERROR 42000: Bad SQLSTATE: '00000'
+Verify SP wasn't created
+CALL sp1();
+ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
+DROP PROCEDURE p1;
+DROP PROCEDURE h1;
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE res_t1;
+
+Testcase 3.1.2.50:
+------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @y=0;
+END//
+CREATE PROCEDURE sp2 ()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 1;
+set @x=1;
+SELECT @x2;
+CALL sp1(1);
+set @x=2;
+SELECT @x2, @x;
+END//
+CALL sp2();
+@x2
+NULL
+@x2 @x
+1 2
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.2.2.51:
+------------------
+
+Ensure that an EXIT handler causes the execution of the stored procedure to
+terminate, within its scope, once the handler action statement has been
+executed.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @x=0;
+END//
+CREATE PROCEDURE sp2 ()
+BEGIN
+declare exit handler for sqlstate '42000' set @x2 = 1;
+set @x2=0;
+set @x=1;
+SELECT '-1-', @x2, @x;
+CALL sp1(1);
+SELECT '-2-', @x2, @x;
+set @x=2;
+END//
+CALL sp1(1);
+ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
+CALL sp2();
+-1- @x2 @x
+-1- 0 1
+SELECT '-3-', @x2, @x;
+-3- @x2 @x
+-3- 1 1
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.1.2.52:
+------------------
+
+Ensure that an EXIT handler does not cause the execution of the stored procedure
+to terminate outside of its scope.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @x=0;
+END//
+CREATE PROCEDURE sp2()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 2;
+set @x2 = 1;
+set @x =20;
+SELECT '-1-', @x2, @x;
+BEGIN
+declare exit handler for sqlstate '42000' set @x2 = 11;
+SELECT '-2-', @x2, @x;
+CALL sp1(1);
+SELECT '-3a', @x2, @x;
+set @x=21;
+SELECT '-3b', @x2, @x;
+END;
+set @x=22;
+SELECT '-4-', @x2, @x;
+END//
+CALL sp2();
+-1- @x2 @x
+-1- 1 20
+-2- @x2 @x
+-2- 1 20
+-4- @x2 @x
+-4- 11 22
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.1.2.54:
+------------------
+
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+“01“ is always exactly equivalent in action to a handler with an SQLWARNING
+condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+DROP TABLE IF EXISTS temp;
+CREATE TABLE temp( f1 CHAR, f2 CHAR);
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp0()
+BEGIN
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '01000' set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp2()
+BEGIN
+declare continue handler for sqlwarning set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp3()
+BEGIN
+declare exit handler for sqlstate '01000' set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp4()
+BEGIN
+declare exit handler for sqlwarning set @done = 1;
+set @done=0;
+set @x=0;
+insert into temp values('xxx', 'yy');
+set @x=1;
+END//
+INSERT INTO temp VALUES('0', NULL);
+CALL sp0();
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
+Warning 1265 Data truncated for column 'f2' at row 1
+SELECT @done, @x;
+@done @x
+0 1
+INSERT INTO temp VALUES('1', NULL);
+CALL sp1();
+SELECT @done, @x;
+@done @x
+1 1
+INSERT INTO temp VALUES('2', NULL);
+CALL sp2();
+SELECT @done, @x;
+@done @x
+1 1
+INSERT INTO temp VALUES('3', NULL);
+CALL sp3();
+SELECT @done, @x;
+@done @x
+1 0
+INSERT INTO temp VALUES('4', NULL);
+CALL sp4();
+SELECT @done, @x;
+@done @x
+1 0
+SELECT * FROM temp;
+f1 f2
+0 NULL
+x y
+1 NULL
+x y
+2 NULL
+x y
+3 NULL
+x y
+4 NULL
+x y
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+DROP TABLE temp;
+
+Testcase 3.1.2.56:
+------------------
+
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+“02“ is always exactly equivalent in action to a handler with a NOT FOUND
+condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp0()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp1()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare continue handler for sqlstate '02000' set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp2()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare continue handler for not found set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp3()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare exit handler for sqlstate '02000' set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CREATE PROCEDURE sp4()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+declare exit handler for not found set @done = 1;
+SET @done = 0;
+SET @x = 0;
+OPEN cur1;
+FETCH cur1 INTO f1_value;
+SET @x = 1;
+FETCH cur1 INTO f1_value;
+SET @x = 2;
+CLOSE cur1;
+END//
+CALL sp0();
+ERROR 02000: No data - zero rows fetched, selected, or processed
+SELECT @done, @x;
+@done @x
+0 1
+CALL sp1();
+SELECT @done, @x;
+@done @x
+1 2
+CALL sp2();
+SELECT @done, @x;
+@done @x
+1 2
+CALL sp3();
+SELECT @done, @x;
+@done @x
+1 1
+CALL sp4();
+SELECT @done, @x;
+@done @x
+1 1
+DROP PROCEDURE sp0;
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+
+Testcase 3.1.2.58:
+------------------
+
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+anything other that “01“ or “02“ is always exactly equivalent in action to a
+handler with an SQLEXCEPTION condition.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp0()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp1()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE continue HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE';
+DECLARE continue HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE';
+DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp2()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE continue HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE';
+DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp3()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE EXIT HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE';
+DECLARE EXIT HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE';
+DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+END//
+CREATE PROCEDURE sp4()
+BEGIN
+DECLARE f1_value CHAR(20);
+DECLARE cv INT DEFAULT 0;
+DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+DECLARE EXIT HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE';
+DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+SET @x = 1;
+CASE cv
+WHEN 2 THEN SET @x = 2;
+WHEN 3 THEN SET @x = 3;
+END case;
+SET @x = 4;
+SELECT f1, f2 FROM t2
+UNION
+SELECT f1, f2,3 FROM t2;
+SET @x = 5;
+FETCH cur1 INTO f1_value;
+SET @x = 6;
+CLOSE cur1;
+END//
+CALL sp0();
+ERROR 20000: Case not found for CASE statement
+SELECT '-0-', @x;
+-0- @x
+-0- 1
+CALL sp1();
+SQLSTATE
+20000
+SQLSTATE
+21000
+SQLSTATE
+24000
+SELECT '-1-', @x;
+-1- @x
+-1- 6
+CALL sp2();
+SQLSTATE
+SQLEXCEPTION
+SQLSTATE
+SQLEXCEPTION
+SQLSTATE
+24000
+SELECT '-2-', @x;
+-2- @x
+-2- 6
+CALL sp3();
+SQLSTATE
+20000
+SELECT '-3-', @x;
+-3- @x
+-3- 1
+CALL sp4();
+SQLSTATE
+SQLEXCEPTION
+SELECT '-4-', @x;
+-4- @x
+-4- 1
+DROP PROCEDURE sp0;
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+
+Testcase 3.1.2.65:
+------------------
+
+Ensure that FETCH <cursor name> returns the first row of the cursor_s result set
+the first time FETCH is executed, that it returns each subsequent row of the
+cursor_s result set each of the subsequent times FETCH is executed, and that it
+returns a NOT FOUND warning if it is executed after the last row of the cursor_s
+result set has already been fetched.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS temp;
+CREATE TABLE temp(
+cnt INT,
+f1 CHAR(20),
+f2 CHAR(20),
+f3 INT,
+f4 CHAR(20),
+f5 INT);
+INSERT INTO temp VALUES(0, 'onip', 'abc', 8760, 'xyz', 10);
+CREATE PROCEDURE sp1( )
+BEGIN
+declare proceed int default 1;
+declare count integer default 1;
+declare f1_value char(20);
+declare f2_value char(20);
+declare f5_value char(20);
+declare f4_value integer;
+declare f6_value integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2
+where f4 >=-5000 order by f4 limit 3;
+open cur1;
+while proceed do
+SELECT count AS 'loop';
+fetch cur1 into f1_value, f2_value, f4_value, f5_value, f6_value;
+insert into temp values (count, f1_value, f2_value, f4_value, f5_value, f6_value);
+set count = count + 1;
+END while;
+END//
+CALL sp1();
+loop
+1
+loop
+2
+loop
+3
+loop
+4
+ERROR 02000: No data - zero rows fetched, selected, or processed
+SELECT * FROM temp;
+cnt f1 f2 f3 f4 f5
+0 onip abc 8760 xyz 10
+1 a` a` -5000 a` -5000
+2 aaa aaa -4999 aaa -4999
+3 abaa abaa -4998 abaa -4998
+DROP TABLE temp;
+DROP PROCEDURE sp1;
+
+Testcase 3.1.2.68:
+------------------
+
+Ensure that FETCH <cursor name> fails with an appropriate error message if the
+number of columns to be fetched does not match the number of variables specified
+by the FETCH statement.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+--> not enough columns in FETCH statement
+CREATE PROCEDURE sp1( )
+BEGIN
+declare newf1 char(20);
+declare cur1 cursor for SELECT f1, f2 from t2 limit 10;
+declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS '';
+BEGIN
+open cur1;
+fetch cur1 into newf1;
+SELECT newf1;
+close cur1;
+END;
+END//
+--> too many columns in FETCH statement
+CREATE PROCEDURE sp2( )
+BEGIN
+declare newf1 char(20);
+declare newf2 char(20);
+declare cur1 cursor for SELECT f1 from t2 limit 10;
+declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS '';
+BEGIN
+open cur1;
+fetch cur1 into newf1, newf2;
+SELECT newf1, newf2;
+close cur1;
+END;
+END//
+--> not enough columns in FETCH statement
+CALL sp1();
+ERROR HY000: Incorrect number of FETCH variables
+--> too many columns in FETCH statement
+CALL sp2();
+ERROR HY000: Incorrect number of FETCH variables
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+Testcase 3.1.2.75:
+------------------
+
+Ensure that, for nested compound statements, a cursor that was declared and
+opened during an outer level of the statement is not closed when an inner level
+of a compound statement ends.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS temp1;
+DROP PROCEDURE IF EXISTS sp1;
+create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) );
+SELECT f1, f2, f4, f5 from t2 order by f4;
+f1 f2 f4 f5
+a` a` -5000 a`
+aaa aaa -4999 aaa
+abaa abaa -4998 abaa
+acaaa acaaa -4997 acaaa
+adaaaa adaaaa -4996 adaaaa
+aeaaaaa aeaaaaa -4995 aeaaaaa
+afaaaaaa afaaaaaa -4994 afaaaaaa
+agaaaaaaa agaaaaaaa -4993 agaaaaaaa
+a^aaaaaaaa a^aaaaaaaa -4992 a^aaaaaaaa
+a_aaaaaaaaa a_aaaaaaaaa -4991 a_aaaaaaaaa
+CREATE PROCEDURE sp1( )
+BEGIN
+declare count integer;
+declare from0 char(20);
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf5 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
+declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
+open cur1;
+open cur2;
+BEGIN
+declare continue handler for sqlstate '02000' set count = 1;
+fetch cur1 into newf1, newf2, newf4, newf5;
+SELECT '-1-', count, newf1, newf2, newf4, newf5;
+insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
+set count = 4;
+BEGIN
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf5;
+SELECT '-2-', count, newf1, newf2, newf4, newf5;
+set count = count - 1;
+END while;
+SELECT '-3-', count, newf1, newf2, newf4, newf4;
+END;
+BEGIN
+fetch cur1 into newf1, newf2, newf4, newf5;
+SELECT '-4-', newf1, newf2, newf4, newf5;
+insert into temp1 values ('cur1_in', newf1, newf2, newf4, newf5);
+END;
+fetch cur2 into newf1, newf2, newf4, newf5;
+SELECT '-5-', newf1, newf2, newf4, newf5;
+insert into temp1 values ('cur2', newf1, newf2, newf4, newf5);
+close cur1;
+END;
+fetch cur2 into newf1, newf2, newf4, newf5;
+SELECT '-6-', newf1, newf2, newf4, newf5;
+close cur2;
+END//
+CALL sp1();
+-1- count newf1 newf2 newf4 newf5
+-1- NULL a` a` -5000 a`
+-2- count newf1 newf2 newf4 newf5
+-2- 4 aaa aaa -4999 aaa
+-2- count newf1 newf2 newf4 newf5
+-2- 3 abaa abaa -4998 abaa
+-2- count newf1 newf2 newf4 newf5
+-2- 2 acaaa acaaa -4997 acaaa
+-2- count newf1 newf2 newf4 newf5
+-2- 1 adaaaa adaaaa -4996 adaaaa
+-3- count newf1 newf2 newf4 newf4
+-3- 0 adaaaa adaaaa -4996 -4996
+-4- newf1 newf2 newf4 newf5
+-4- adaaaa adaaaa -4996 adaaaa
+-5- newf1 newf2 newf4 newf5
+-5- a` a` -5000 a`
+-6- newf1 newf2 newf4 newf5
+-6- aaa aaa -4999 aaa
+SELECT * from temp1;
+f0 f1 f2 f3 f4
+cur1_out a` a` -5000 a`
+cur1_in adaaaa adaaaa -4996 adaaaa
+cur2 a` a` -5000 a`
+DROP PROCEDURE sp1;
+drop table temp1;
+
+Testcase 3.1.2.76:
+------------------
+
+Ensure that all cursors operate asensitively, so that there is no concurrency
+conflict between cursors operating on the same, or similar, sets of results
+during execution of one or more stored procedures.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+drop table IF EXISTS temp1;
+drop table IF EXISTS temp2;
+create table temp1( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer );
+create table temp2( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer );
+CREATE PROCEDURE sp_inner( )
+BEGIN
+declare proceed int default 1;
+declare i_count integer default 20;
+declare i_newf1 char(20);
+declare i_newf2 char(20);
+declare i_newf3 date;
+declare i_newf4 integer;
+declare i_newf11 char(20);
+declare i_newf12 char(20);
+declare i_newf13 date;
+declare i_newf14 integer;
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2
+where f4>=-5000 order by f4 limit 4;
+declare cur2 cursor for SELECT f1, f2, f3, f4 from t2
+where f4>=-5000 order by f4 limit 3;
+declare continue handler for sqlstate '02000' set proceed=0;
+open cur1;
+open cur2;
+set i_count = 10;
+while proceed do
+fetch cur1 into i_newf1, i_newf2, i_newf3, i_newf4;
+IF proceed THEN
+insert into temp1 values ('sp_inner', i_count, i_newf1, i_newf2, i_newf3, i_newf4);
+fetch cur2 into i_newf11, i_newf12, i_newf13, i_newf14;
+IF proceed THEN
+insert into temp2 values ('sp_inner', i_count, i_newf11, i_newf12, i_newf13, i_newf14);
+END IF;
+END IF;
+set i_count = i_count - 1;
+END while;
+close cur1;
+close cur2;
+END//
+CREATE PROCEDURE sp_outer( )
+BEGIN
+DECLARE proceed INT DEFAULT 1;
+DECLARE o_count INTEGER DEFAULT 20;
+DECLARE o_newf1 CHAR(20);
+DECLARE o_newf2 CHAR(20);
+DECLARE o_newf3 DATE;
+DECLARE o_newf4 INTEGER;
+DECLARE o_newf11 CHAR(20);
+DECLARE o_newf12 CHAR(20);
+DECLARE o_newf13 DATE;
+DECLARE o_newf14 INTEGER;
+DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
+WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
+DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
+WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0;
+OPEN cur1;
+OPEN cur2;
+SET o_count = 1;
+WHILE proceed DO
+FETCH cur1 INTO o_newf1, o_newf2, o_newf3, o_newf4;
+IF proceed THEN
+INSERT INTO temp1 VALUES ('_sp_out_', o_count, o_newf1, o_newf2, o_newf3, o_newf4);
+CALL sp_inner();
+FETCH cur2 INTO o_newf11, o_newf12, o_newf13, o_newf14;
+IF proceed THEN
+INSERT INTO temp2 VALUES ('_sp_out_', o_count, o_newf11, o_newf12, o_newf13, o_newf14);
+END IF;
+END IF;
+SET o_count = o_count + 1;
+END WHILE;
+CLOSE cur1;
+CLOSE cur2;
+END//
+CALL sp_outer();
+SELECT * FROM temp1;
+f0 cnt f1 f2 f3 f4
+_sp_out_ 1 a` a` 1000-01-01 -5000
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 2 aaa aaa 1000-01-02 -4999
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 3 abaa abaa 1000-01-03 -4998
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 4 acaaa acaaa 1000-01-04 -4997
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+sp_inner 7 acaaa acaaa 1000-01-04 -4997
+SELECT * FROM temp2;
+f0 cnt f1 f2 f3 f4
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 1 a` a` 1000-01-01 -5000
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 2 aaa aaa 1000-01-02 -4999
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 3 abaa abaa 1000-01-03 -4998
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 4 acaaa acaaa 1000-01-04 -4997
+sp_inner 10 a` a` 1000-01-01 -5000
+sp_inner 9 aaa aaa 1000-01-02 -4999
+sp_inner 8 abaa abaa 1000-01-03 -4998
+_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996
+DROP PROCEDURE sp_outer;
+DROP PROCEDURE sp_inner;
+DROP TABLE temp1;
+DROP TABLE temp2;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result
new file mode 100644
index 00000000..6390cc24
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result
@@ -0,0 +1,497 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.3 - Syntax checks for the stored procedure-specific flow
+control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
+--------------------------------------------------------------------------------
+
+Testcase 3.1.3.7:
+-----------------
+
+Ensure that the IF statement acts correctly for all variants, including cases
+where statements are nested.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp9;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+CREATE PROCEDURE sp9( action char(20), subaction char(20) )
+BEGIN
+if action = 'action' then
+if subaction = 'subaction' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction' , 1);
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 2);
+END if;
+else
+if subaction = 'subaction'
+ then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction' , 3);
+elseif subaction = 'subaction1'
+ then
+BEGIN
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values ('none', 'subaction1', 4);
+END;
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 5);
+END if;
+END if;
+END//
+CALL sp9( 'action', 'subaction' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=1;
+f1 f2 f3
+action subaction 1
+CALL sp9( 'temp', 'subaction' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=3;
+f1 f2 f3
+none subaction 3
+CALL sp9( 'temp', 'subaction1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=4;
+f1 f2 f3
+none subaction1 4
+CALL sp9( 'action', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=2;
+f1 f2 f3
+action none 2
+CALL sp9( 'temp', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=5;
+f1 f2 f3
+none none 5
+DROP PROCEDURE sp9;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.8.:
+------------------
+
+Ensure that the CASE statement acts correctly for all variants, including cases
+where statements are nested.
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp10;
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+CREATE PROCEDURE sp10( action char(20), subaction char(20) )
+BEGIN
+case action
+when 'action' then
+case
+when subaction = 'subaction_1' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 1);
+when subaction = 'subaction_2' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 2);
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 3);
+END case;
+else
+case
+when subaction = 'subaction_1' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_1' , 4);
+when subaction = 'subaction_2' then
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_2' , 5);
+else
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 6);
+END case;
+END case;
+END//
+CALL sp10( 'action', 'subaction_1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+action subaction_2 1
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'action', 'subaction_2' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+action subaction_2 2
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'temp', 'subaction_1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+none subaction_1 4
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'temp', 'subaction_2' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+none subaction_2 5
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'action', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+action none 3
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CALL sp10( 'temp', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+none none 6
+DROP PROCEDURE sp10;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.9 + 3.1.3.15:
+----------------------------
+
+09. Ensure that the LOOP statement acts correctly for all variants, including
+. cases where statements are nested.
+15. Ensure that the LEAVE statement acts correctly for all variants, including
+. cases where statements are nested.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp11;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+CREATE PROCEDURE sp11( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+label1: loop
+if count2 > 3 then leave label1;
+END if;
+set count1 = 1;
+label2: loop
+if count1 > 4 then leave label2;
+END if;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+set count1 = count1 + 1;
+iterate label2;
+END loop label2;
+set count2 = count2 + 1;
+iterate label1;
+END loop label1;
+END//
+CALL sp11();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+xyz pqr 1
+xyz pqr 2
+xyz pqr 3
+xyz pqr 4
+xyz pqr 1
+xyz pqr 2
+xyz pqr 3
+xyz pqr 4
+xyz pqr 1
+xyz pqr 2
+xyz pqr 3
+xyz pqr 4
+DROP PROCEDURE sp11;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.16:
+------------------
+
+Ensure that the ITERATE statement acts correctly for all variants, including
+cases where statements are nested.
+(tests for this testcase are also included in other testcases)
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp31316;
+CREATE PROCEDURE sp31316( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+label1: loop
+if count2 > 3 then leave label1;
+END if;
+set count1 = 1;
+label2: loop
+if count1 > 4 then leave label2;
+END if;
+insert into temp values( count1, count2);
+set count1 = count1 + 1;
+iterate label3;
+END loop label2;
+set count2 = count2 + 1;
+iterate label1;
+END loop label1;
+END//
+ERROR 42000: ITERATE with no matching label: label3
+
+Testcase 3.1.3.18:
+------------------
+
+Ensure that the REPEAT statement acts correctly for all variants, including
+cases where statements are nested.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp17;
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+CREATE PROCEDURE sp17( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+repeat
+set count1 = count1 + 1;
+set count2 = 1;
+label1: repeat
+set count2 = count2 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+until count2 > 3
+END repeat label1;
+until count1 > 3
+END repeat;
+END//
+CALL sp17();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+xyz pqr 2
+xyz pqr 2
+xyz pqr 2
+xyz pqr 3
+xyz pqr 3
+xyz pqr 3
+xyz pqr 4
+xyz pqr 4
+xyz pqr 4
+DROP PROCEDURE sp17;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 3.1.3.24:
+------------------
+
+Ensure that the WHILE statement acts correctly for all variants, including cases
+where statements are nested.
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t21;
+DROP PROCEDURE IF EXISTS sp21;
+create table res_t21(name text(10), surname blob(20), age_averylongfieldname_averylongname_1234569 smallint);
+insert into res_t21 values('ashwin', 'mokadam', 25);
+CREATE PROCEDURE sp21( )
+BEGIN
+declare count1 integer default 0;
+declare count2 integer default 0;
+while count1 < 3 do
+BEGIN
+declare ithisissamevariablename int default 100;
+SELECT ithisissamevariablename;
+BEGIN
+declare ithisissamevariablename int default 200;
+SELECT ithisissamevariablename;
+END;
+set count2 = 0;
+label1: while count2 < 3 do
+BEGIN
+declare count1 integer default 7;
+set count2 = count2 + 1;
+insert into res_t21 values( 'xyz' , 'pqr', count2);
+label2: while count1 < 10 do
+set count1 = count1 + 1;
+insert into res_t21 values( 'xyz' , 'pqr', count1);
+END while label2;
+END;
+END while label1;
+set count1 = count1 + 1;
+END;
+END while;
+END//
+CALL sp21();
+ithisissamevariablename
+100
+ithisissamevariablename
+200
+ithisissamevariablename
+100
+ithisissamevariablename
+200
+ithisissamevariablename
+100
+ithisissamevariablename
+200
+SELECT * from res_t21;
+name surname age_averylongfieldname_averylongname_1234569
+ashwin mokadam 25
+xyz pqr 1
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 2
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 3
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 1
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 2
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 3
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 1
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 2
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+xyz pqr 3
+xyz pqr 8
+xyz pqr 9
+xyz pqr 10
+DROP PROCEDURE sp21;
+drop table res_t21;
+
+Testcase 3.1.3.30:
+------------------
+
+Ensure that multiple cases of all possible combinations of the control flow
+statements, nested within multiple compound statements within a stored
+procedure, always act correctly and return the expected result.
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS res_tbl;
+DROP PROCEDURE IF EXISTS sp31330;
+create table res_tbl (f1 int, f2 text, f3 blob, f4 date,
+f5 set('one', 'two', 'three', 'four', 'five') default 'one');
+CREATE PROCEDURE sp31330 (path int)
+BEGIN
+declare count int default 1;
+declare var1 text;
+declare var2 blob;
+declare var3 date;
+declare var4 set('one', 'two', 'three', 'four', 'five') DEFAULT 'five';
+case
+when path=1 then
+set var3 = '2000-11-09';
+set var1 = 'flowing through case 1';
+label1: loop
+if count > 5 then
+if var4=1000 then
+set var2 = 'exiting out of case 1 - invalid SET';
+END if;
+if var4='two' then
+set var2 = 'exiting out of case 1';
+END if;
+insert into res_tbl values (1, var1, var2, var3, (count-2));
+leave label1;
+elseif count = 5 then
+set count= count + 2;
+set var4='two';
+iterate label1;
+else
+set count= count + 1;
+END if;
+set var4='one';
+END loop label1;
+when path=2 then
+set var3 = '1989-11-09';
+set var1 = 'flowing through case 2';
+set @count3=0;
+label2: repeat
+set count=count + 1;
+set @count2=1;
+while @count2 <= 5 do
+set @count2 = @count2 + 1;
+END while;
+SELECT @count2;
+set @count3=@count3 + @count2;
+until count > 5
+END repeat label2;
+set var2 = 'exiting out of case 2';
+set var4 = count-3;
+SELECT @count3;
+insert into res_tbl values (2, var1, var2, var3, var4);
+ELSE BEGIN
+set @error_opt='undefined path specified';
+SELECT @error_opt;
+END;
+END case;
+END//
+CALL sp31330();
+ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp31330; expected 1, got 0
+CALL sp31330(1);
+SELECT * from res_tbl;
+f1 f2 f3 f4 f5
+1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
+CALL sp31330(2);
+@count2
+6
+@count2
+6
+@count2
+6
+@count2
+6
+@count2
+6
+@count3
+30
+SELECT * from res_tbl;
+f1 f2 f3 f4 f5
+1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
+2 flowing through case 2 exiting out of case 2 1989-11-09 one,two
+CALL sp31330(4);
+@error_opt
+undefined path specified
+DROP PROCEDURE sp31330;
+drop table res_tbl;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
new file mode 100644
index 00000000..694cfc01
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
@@ -0,0 +1,436 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+set GLOBAL sql_mode="";
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.6 - Privilege Checks:
+--------------------------------------------------------------------------------
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+
+Testcase 3.1.6.1:
+-----------------
+Ensure that no user may create a stored procedure without the GRANT CREATE
+ROUTINE privilege.
+--------------------------------------------------------------------------------
+create user 'user_1'@'localhost';
+grant all on db_storedproc_1.* to 'user_1'@'localhost';
+revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+DROP PROCEDURE IF EXISTS sp1;
+connect user1a, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+USE db_storedproc_1;
+CREATE PROCEDURE sp1(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
+disconnect user1a;
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
+connect user1b, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+USE db_storedproc_1;
+CREATE PROCEDURE sp1(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+disconnect user1b;
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+DROP USER 'user_1'@'localhost';
+DROP PROCEDURE sp1;
+
+Testcase 3.1.6.2:
+-----------------
+Ensure that root always has the GRANT CREATE ROUTINE privilege.
+(checked by other testscases)
+--------------------------------------------------------------------------------
+grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+DROP PROCEDURE IF EXISTS db_storedproc_1.sp3;
+DROP FUNCTION IF EXISTS db_storedproc_1.fn1;
+connect user2, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+CREATE PROCEDURE sp3(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+CREATE FUNCTION fn1(v1 int) returns int
+BEGIN
+return v1;
+END//
+disconnect user2;
+connection default;
+USE db_storedproc_1;
+
+root@localhost db_storedproc_1
+drop user 'user_1'@'localhost';
+DROP PROCEDURE sp3;
+DROP FUNCTION fn1;
+
+Testcase 3.1.6.4:
+-----------------
+Ensure that the default security provision of a stored procedure is SQL SECURITY
+DEFINER.
+--------------------------------------------------------------------------------
+CREATE USER 'user_1'@'localhost';
+grant update on db_storedproc_1.t6 to 'user_1'@'localhost';
+grant execute on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+USE db_storedproc_1;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4(v1 char(20))
+BEGIN
+SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+connect user3, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+USE db_storedproc_1;
+CALL sp4('a');
+f1 f2 f3 f4 f5 f6
+SELECT SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE,
+ROUTINE_BODY, ROUTINE_DEFINITION, IS_DETERMINISTIC,
+SQL_DATA_ACCESS, SECURITY_TYPE, SQL_MODE, ROUTINE_COMMENT
+FROM information_schema.routines
+WHERE routine_schema LIKE 'db_sto%';
+SPECIFIC_NAME sp4
+ROUTINE_SCHEMA db_storedproc_1
+ROUTINE_NAME sp4
+ROUTINE_TYPE PROCEDURE
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION NULL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SECURITY_TYPE DEFINER
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT
+disconnect user3;
+connection default;
+
+root@localhost db_storedproc_1
+DROP PROCEDURE sp4;
+DROP USER 'user_1'@'localhost';
+
+Testcase 3.1.6.5:
+-----------------
+Ensure that a stored procedure defined with SQL SECURITY DEFINER can be
+called/executed by any user, using only the privileges (including database
+access privileges) associated with the user who created the stored procedure.
+--------------------------------------------------------------------------------
+USE db_storedproc_1;
+CREATE TABLE t3165 ( c1 char(20), c2 char(20), c3 date);
+INSERT INTO t3165 VALUES ('inserted', 'outside of SP', NULL);
+create user 'user_1'@'localhost';
+create user 'user_2'@'localhost';
+grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
+grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
+grant execute on db_storedproc_1.* to 'user_2'@'localhost';
+flush privileges;
+connect user5_1, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+CREATE PROCEDURE sp5_s_i () sql security definer
+BEGIN
+SELECT * from db_storedproc_1.t3165;
+insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_s_i', 1000);
+END//
+CREATE PROCEDURE sp5_sel () sql security definer
+BEGIN
+SELECT * from db_storedproc_1.t3165;
+END//
+CREATE PROCEDURE sp5_ins () sql security definer
+BEGIN
+insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
+END//
+disconnect user5_1;
+connect user5_2, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+grant insert on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+CALL sp5_ins();
+CALL sp5_sel();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+inserted from sp5_s_i 2000-10-00
+inserted from sp5_ins 2000-10-00
+connection default;
+
+root@localhost db_storedproc_1
+REVOKE INSERT on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+inserted from sp5_s_i 2000-10-00
+inserted from sp5_ins 2000-10-00
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_sel();
+c1 c2 c3
+inserted outside of SP NULL
+inserted from sp5_ins 2000-10-00
+inserted from sp5_s_i 2000-10-00
+inserted from sp5_ins 2000-10-00
+connection default;
+
+root@localhost db_storedproc_1
+REVOKE SELECT on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+connection user5_2;
+
+user_2@localhost db_storedproc_1
+CALL sp5_s_i();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_ins();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+CALL sp5_sel();
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
+disconnect user5_2;
+connection default;
+
+root@localhost db_storedproc_1
+DROP PROCEDURE sp5_s_i;
+DROP PROCEDURE sp5_sel;
+DROP PROCEDURE sp5_ins;
+DROP TABLE t3165;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+Testcase 3.1.6.6:
+-----------------
+Ensure that a stored procedure defined with SQL SECURITY INVOKER can be
+called/executed by any user, using only the privileges (including database
+access privileges) associated with the user executing the stored procedure.
+--------------------------------------------------------------------------------
+USE db_storedproc_1;
+CREATE TABLE t3166 ( c1 char(30) );
+INSERT INTO db_storedproc_1.t3166 VALUES ('inserted outside SP');
+create user 'user_1'@'localhost';
+create user 'user_2'@'localhost';
+GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
+GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
+GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user6_1, localhost, user_1, , db_storedproc_1;
+
+user_1@localhost db_storedproc_1
+CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
+BEGIN
+SELECT * from db_storedproc_1.t3166;
+insert into db_storedproc_1.t3166 values ('inserted from sp3166_s_i');
+END//
+CREATE PROCEDURE sp3166_sel () SQL SECURITY INVOKER
+BEGIN
+SELECT * from db_storedproc_1.t3166;
+END//
+CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
+BEGIN
+insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
+END//
+disconnect user6_1;
+connect user6_2, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+c1
+inserted outside SP
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+CALL sp3166_ins();
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+CALL sp3166_sel();
+c1
+inserted outside SP
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp3166_sel();
+c1
+inserted outside SP
+GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+disconnect user6_2;
+connect user6_3, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+c1
+inserted outside SP
+CALL sp3166_ins();
+CALL sp3166_sel();
+c1
+inserted outside SP
+inserted from sp3166_s_i
+inserted from sp3166_ins
+disconnect user6_3;
+connection default;
+
+root@localhost db_storedproc_1
+CALL sp3166_sel();
+c1
+inserted outside SP
+inserted from sp3166_s_i
+inserted from sp3166_ins
+REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user6_4, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+CALL sp3166_ins();
+CALL sp3166_sel();
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
+disconnect user6_4;
+connection default;
+CALL sp3166_s_i();
+c1
+inserted outside SP
+inserted from sp3166_s_i
+inserted from sp3166_ins
+inserted from sp3166_ins
+
+root@localhost db_storedproc_1
+REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user6_5, localhost, user_2, , db_storedproc_1;
+
+user_2@localhost db_storedproc_1
+CALL sp3166_s_i();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_s_i'
+CALL sp3166_ins();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_ins'
+CALL sp3166_sel();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_sel'
+disconnect user6_5;
+connection default;
+
+root@localhost db_storedproc_1
+DROP PROCEDURE sp3166_s_i;
+DROP PROCEDURE sp3166_sel;
+DROP PROCEDURE sp3166_ins;
+DROP TABLE t3166;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+set GLOBAL sql_mode=default;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result
new file mode 100644
index 00000000..751986b8
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result
@@ -0,0 +1,179 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.7 - SQL mode checks:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 3.1.7.1:
+-----------------
+Ensure that the sql_mode setting in effect at the time a stored procedure is
+created is the same setting under which the stored procedure runs when it is
+called/executed.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS temp_tbl;
+DROP TABLE IF EXISTS result;
+CREATE TABLE temp_tbl (f1 tinyint);
+CREATE TABLE result (f1 text(200), f2 char(20));
+set @@sql_mode='traditional';
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+CREATE PROCEDURE sp1()
+BEGIN
+declare a tinyint;
+declare count_ int default 1;
+declare continue handler for sqlstate '22003' set count_=1000;
+SHOW VARIABLES LIKE 'sql_mode';
+SELECT @@sql_mode into @cur_val_sql_mode;
+insert into temp_tbl values (1000);
+if count_ = 1000 THEN
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
+ELSE
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
+END if;
+END//
+SHOW CREATE PROCEDURE sp1;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
+BEGIN
+declare a tinyint;
+declare count_ int default 1;
+declare continue handler for sqlstate '22003' set count_=1000;
+SHOW VARIABLES LIKE 'sql_mode';
+SELECT @@sql_mode into @cur_val_sql_mode;
+insert into temp_tbl values (1000);
+if count_ = 1000 THEN
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
+ELSE
+INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
+END if;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+set @@sql_mode='';
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode
+CALL sp1();
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+SELECT * from result;
+f1 f2
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION value restored
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode
+SELECT @@sql_mode;
+@@sql_mode
+
+SET @@sql_mode='TRADITIONAL';
+DROP PROCEDURE sp1;
+DROP TABLE temp_tbl;
+DROP TABLE result;
+
+Testcase 3.1.7.2:
+-----------------
+Ensure that if the sql_mode setting is changed when a stored procedure is run,
+that the original setting is restored as soon as the stored procedure execution
+is complete.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp2;
+... show initial value
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+CREATE PROCEDURE sp2()
+BEGIN
+SET @@sql_mode='MAXDB';
+SHOW VARIABLES LIKE 'sql_mode';
+END//
+SHOW CREATE PROCEDURE sp2;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
+BEGIN
+SET @@sql_mode='MAXDB';
+SHOW VARIABLES LIKE 'sql_mode';
+END latin1 latin1_swedish_ci latin1_swedish_ci
+... show value prior calling procedure
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+... call procedure that changes sql_mode
+CALL sp2();
+Variable_name Value
+sql_mode PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
+... check whether old value is re-set
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DROP PROCEDURE sp2;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result
new file mode 100644
index 00000000..1b8a571e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result
@@ -0,0 +1,848 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.8 - SHOW statement checks:
+--------------------------------------------------------------------------------
+
+Testcase 3.1.8.9:
+-----------------
+
+Ensure that all stored procedure changes made with ALTER PROCEDURE or ALTER
+FUNCTION are properly recorded and displayed when a SHOW CREATE PROCEDURE or
+SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE
+FUNCTION STATUS statement (respectively) is executed.
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn_1;
+DROP FUNCTION IF EXISTS fn_2;
+DROP PROCEDURE IF EXISTS sp_1;
+DROP PROCEDURE IF EXISTS sp_2;
+CREATE PROCEDURE sp_1 (i1 int)
+BEGIN
+set @x=i1;
+END//
+CREATE PROCEDURE sp_2 (i1 int) SQL SECURITY INVOKER COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+END//
+CREATE FUNCTION fn_1 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns year
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END//
+CREATE FUNCTION fn_2 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+RETURNS YEAR
+SQL SECURITY INVOKER
+COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END//
+
+... now check what is stored:
+-----------------------------
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+SPECIFIC_NAME fn_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_1
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME fn_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_2
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT created with INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_1
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_2
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT created with INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SHOW CREATE FUNCTION fn_1;
+Function fn_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE FUNCTION fn_2;
+Function fn_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ SQL SECURITY INVOKER
+ COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_1;
+Procedure sp_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_2;
+Procedure sp_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
+ SQL SECURITY INVOKER
+ COMMENT 'created with INVOKER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW FUNCTION STATUS LIKE 'fn_%';
+Db db_storedproc
+Name fn_1
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name fn_2
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment created with INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+Db db_storedproc
+Name sp_1
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name sp_2
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment created with INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+
+... now change some stuff:
+--------------------------
+ALTER PROCEDURE sp_1 SQL SECURITY INVOKER;
+ALTER PROCEDURE sp_1 COMMENT 'new comment, SP changed to INVOKER';
+ALTER PROCEDURE sp_2 SQL SECURITY DEFINER;
+ALTER PROCEDURE sp_2 DROP COMMENT;
+ERROR 42000: 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 'DROP COMMENT' at line 1
+ALTER PROCEDURE sp_2 COMMENT 'SP changed to DEFINER';
+ALTER PROCEDURE sp_2 READS SQL DATA;
+ALTER FUNCTION fn_1 SQL SECURITY INVOKER;
+ALTER FUNCTION fn_1 COMMENT 'new comment, FN changed to INVOKER';
+ALTER FUNCTION fn_1 NO SQL;
+ALTER FUNCTION fn_2 SQL SECURITY DEFINER;
+ALTER FUNCTION fn_2 COMMENT 'FN changed to DEFINER';
+ALTER FUNCTION fn_2 MODIFIES SQL DATA;
+
+... now check what is stored:
+-----------------------------
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+SPECIFIC_NAME fn_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_1
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS NO SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT new comment, FN changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME fn_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_2
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS MODIFIES SQL DATA
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT FN changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_1
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT new comment, SP changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_2
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS READS SQL DATA
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT SP changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SHOW CREATE FUNCTION fn_1;
+Function fn_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ NO SQL
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, FN changed to INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE FUNCTION fn_2;
+Function fn_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ MODIFIES SQL DATA
+ COMMENT 'FN changed to DEFINER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_1;
+Procedure sp_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, SP changed to INVOKER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_2;
+Procedure sp_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
+ READS SQL DATA
+ COMMENT 'SP changed to DEFINER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW FUNCTION STATUS LIKE 'fn_%';
+Db db_storedproc
+Name fn_1
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, FN changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name fn_2
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment FN changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+Db db_storedproc
+Name sp_1
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, SP changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name sp_2
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment SP changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+
+... change back to default and check result:
+--------------------------------------------
+ALTER FUNCTION fn_2 CONTAINS SQL;
+
+... now check what is stored:
+-----------------------------
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+SPECIFIC_NAME fn_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_1
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS NO SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT new comment, FN changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME fn_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME fn_2
+ROUTINE_TYPE FUNCTION
+DATA_TYPE year
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER year(4)
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT FN changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_1
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_1
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS CONTAINS SQL
+SQL_PATH NULL
+SECURITY_TYPE INVOKER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT new comment, SP changed to INVOKER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SPECIFIC_NAME sp_2
+ROUTINE_CATALOG def
+ROUTINE_SCHEMA db_storedproc
+ROUTINE_NAME sp_2
+ROUTINE_TYPE PROCEDURE
+DATA_TYPE
+CHARACTER_MAXIMUM_LENGTH NULL
+CHARACTER_OCTET_LENGTH NULL
+NUMERIC_PRECISION NULL
+NUMERIC_SCALE NULL
+DATETIME_PRECISION NULL
+CHARACTER_SET_NAME NULL
+COLLATION_NAME NULL
+DTD_IDENTIFIER NULL
+ROUTINE_BODY SQL
+ROUTINE_DEFINITION BEGIN
+set @x=i1;
+END
+EXTERNAL_NAME NULL
+EXTERNAL_LANGUAGE NULL
+PARAMETER_STYLE SQL
+IS_DETERMINISTIC NO
+SQL_DATA_ACCESS READS SQL DATA
+SQL_PATH NULL
+SECURITY_TYPE DEFINER
+CREATED <modified>
+LAST_ALTERED <created>
+SQL_MODE NO_ENGINE_SUBSTITUTION
+ROUTINE_COMMENT SP changed to DEFINER
+DEFINER root@localhost
+CHARACTER_SET_CLIENT latin1
+COLLATION_CONNECTION latin1_swedish_ci
+DATABASE_COLLATION latin1_swedish_ci
+SHOW CREATE FUNCTION fn_1;
+Function fn_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ NO SQL
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, FN changed to INVOKER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE FUNCTION fn_2;
+Function fn_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
+ COMMENT 'FN changed to DEFINER'
+BEGIN
+set @x=i1;
+set @y=@x;
+return i4;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_1;
+Procedure sp_1
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
+ SQL SECURITY INVOKER
+ COMMENT 'new comment, SP changed to INVOKER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW CREATE PROCEDURE sp_2;
+Procedure sp_2
+sql_mode NO_ENGINE_SUBSTITUTION
+Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
+ READS SQL DATA
+ COMMENT 'SP changed to DEFINER'
+BEGIN
+set @x=i1;
+END
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW FUNCTION STATUS LIKE 'fn_%';
+Db db_storedproc
+Name fn_1
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, FN changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name fn_2
+Type FUNCTION
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment FN changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+Db db_storedproc
+Name sp_1
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type INVOKER
+Comment new comment, SP changed to INVOKER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+Db db_storedproc
+Name sp_2
+Type PROCEDURE
+Definer root@localhost
+Modified <modified>
+Created <created>
+Security_type DEFINER
+Comment SP changed to DEFINER
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
+
+... cleanup
+-----------
+DROP FUNCTION fn_1;
+DROP FUNCTION fn_2;
+DROP PROCEDURE sp_1;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
new file mode 100644
index 00000000..ef5aa4c8
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
@@ -0,0 +1,410 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.10 - CALL checks:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 3.1.10.2 + 3.1.10.5:
+-----------------------------
+
+2. Ensure that a procedure cannot be called if the appropriate privileges do not
+exist.
+5. Ensure that a function cannot be executed if the appropriate privileges do
+not exist.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp31102;
+DROP FUNCTION IF EXISTS fn31105;
+create user 'user_1'@'localhost';
+create user 'user_2'@'localhost';
+GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
+GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+connect user2_1, localhost, user_1, , db_storedproc;
+
+user_1@localhost db_storedproc
+CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
+BEGIN
+SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1;
+END//
+CREATE FUNCTION fn31105(n INT) RETURNS INT
+BEGIN
+DECLARE res INT;
+SET res = n * n;
+RETURN res;
+END//
+disconnect user2_1;
+connect user2_2, localhost, user_2, , db_storedproc;
+
+user_2@localhost db_storedproc
+CALL sp31102();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
+SELECT fn31105( 9 );
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+CALL sp31102();
+f1 f2 f3 f4 f5 f6
+a` a` 1000-01-01 -5000 a` -5000
+SELECT fn31105( 9 );
+fn31105( 9 )
+81
+GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+disconnect user2_2;
+connect user2_3, localhost, user_2, , db_storedproc;
+
+user_2@localhost db_storedproc
+CALL sp31102();
+f1 f2 f3 f4 f5 f6
+a` a` 1000-01-01 -5000 a` -5000
+SELECT fn31105( 9 );
+fn31105( 9 )
+81
+disconnect user2_3;
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+CALL sp31102();
+f1 f2 f3 f4 f5 f6
+a` a` 1000-01-01 -5000 a` -5000
+SELECT fn31105( 9 );
+fn31105( 9 )
+81
+connect user2_4, localhost, user_2, , db_storedproc;
+
+user_2@localhost db_storedproc
+CALL sp31102();
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
+SELECT fn31105( 9 );
+ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
+disconnect user2_4;
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+DROP PROCEDURE sp31102;
+DROP FUNCTION fn31105;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+Testcase 3.1.10.3:
+------------------
+
+Ensure that a function can never be called.
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(a int) returns int
+BEGIN
+set @b = 0.9 * a;
+return @b;
+END//
+CALL fn1();
+ERROR 42000: PROCEDURE db_storedproc.fn1 does not exist
+DROP FUNCTION fn1;
+
+Testcase 3.1.10.6:
+------------------
+
+Ensure that a procedure can never be executed.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP FUNCTION IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+SELECT * from t10;
+END//
+SELECT sp1();
+ERROR 42000: FUNCTION db_storedproc.sp1 does not exist
+DROP PROCEDURE sp1;
+
+Testcase 3.1.10.7:
+------------------
+
+Ensure that the ROW_COUNT() SQL function always returns the correct number of
+rows affected by the execution of a stored procedure.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp_ins_1;
+DROP PROCEDURE IF EXISTS sp_ins_3;
+DROP PROCEDURE IF EXISTS sp_upd;
+DROP PROCEDURE IF EXISTS sp_ins_upd;
+DROP PROCEDURE IF EXISTS sp_del;
+DROP PROCEDURE IF EXISTS sp_with_rowcount;
+CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT);
+INSERT INTO temp SELECT * FROM t10;
+CREATE PROCEDURE sp_ins_1()
+BEGIN
+INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000);
+END//
+CREATE PROCEDURE sp_ins_3()
+BEGIN
+INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('abc', 'xyz', '1989-11-09', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000);
+END//
+CREATE PROCEDURE sp_upd()
+BEGIN
+UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc';
+END//
+CREATE PROCEDURE sp_ins_upd()
+BEGIN
+BEGIN
+INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000);
+INSERT INTO temp VALUES ('qwe', 'abc', '2005-11-07', 100, 'uvw', 1000);
+END;
+SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1;
+UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc';
+END//
+CREATE PROCEDURE sp_del()
+BEGIN
+DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2';
+END//
+CREATE PROCEDURE sp_with_rowcount()
+BEGIN
+BEGIN
+INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000),
+('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000),
+('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000),
+('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000);
+END;
+SELECT row_count() AS 'row_count() after insert';
+SELECT row_count() AS 'row_count() after select row_count()';
+SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
+UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc';
+SELECT row_count() AS 'row_count() after update';
+SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
+DELETE FROM temp WHERE temp.f1 = 'updated_2';
+SELECT row_count() AS 'row_count() after delete';
+END//
+CALL sp_ins_1();
+SELECT row_count();
+row_count()
+1
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+abc abc 2005-10-03 100 uvw 1000
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+CALL sp_ins_3();
+SELECT row_count();
+row_count()
+3
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+abc abc 2005-10-03 100 uvw 1000
+abc xyz 1949-05-23 100 uvw 1000
+abc xyz 1989-11-09 100 uvw 1000
+abc xyz 2005-10-24 100 uvw 1000
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+CALL sp_upd();
+SELECT row_count();
+row_count()
+4
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+updated abc 2005-10-03 100 uvw 1000
+updated xyz 1949-05-23 100 uvw 1000
+updated xyz 1989-11-09 100 uvw 1000
+updated xyz 2005-10-24 100 uvw 1000
+CALL sp_ins_upd();
+COUNT( f1 ) f1
+1 aaa
+1 abaa
+1 acaaa
+1 adaaaa
+1 aeaaaaa
+1 afaaaaaa
+1 agaaaaaaa
+1 a^aaaaaaaa
+1 a_aaaaaaaaa
+1 a`
+4 qwe
+4 updated
+SELECT row_count();
+row_count()
+7
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+qwe xyz 1998-03-26 100 uvw 1000
+updated abc 2005-10-03 100 uvw 1000
+updated xyz 1949-05-23 100 uvw 1000
+updated xyz 1989-11-09 100 uvw 1000
+updated xyz 2005-10-24 100 uvw 1000
+updated_2 abc 1989-11-09 100 uvw 1000
+updated_2 abc 2000-11-09 100 uvw 1000
+updated_2 abc 2005-11-07 100 uvw 1000
+CALL sp_del();
+SELECT row_count();
+row_count()
+4
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
+a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
+a` a` 1000-01-01 -5000 a` -5000
+aaa aaa 1000-01-02 -4999 aaa -4999
+abaa abaa 1000-01-03 -4998 abaa -4998
+acaaa acaaa 1000-01-04 -4997 acaaa -4997
+adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
+aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
+afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
+agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
+updated abc 2005-10-03 100 uvw 1000
+updated xyz 1949-05-23 100 uvw 1000
+updated xyz 1989-11-09 100 uvw 1000
+updated xyz 2005-10-24 100 uvw 1000
+DELETE FROM temp;
+CALL sp_with_rowcount();
+row_count() after insert
+4
+row_count() after select row_count()
+-1
+f1 f2 f3
+qwe abc 1989-11-09
+qwe abc 2000-11-09
+qwe xyz 1998-03-26
+qwe xyz 2005-11-07
+row_count() after update
+2
+f1 f2 f3
+qwe xyz 1998-03-26
+qwe xyz 2005-11-07
+updated_2 abc 1989-11-09
+updated_2 abc 2000-11-09
+row_count() after delete
+2
+SELECT row_count();
+row_count()
+8
+SELECT * FROM temp;
+f1 f2 f3 f4 f5 f6
+qwe xyz 1998-03-26 100 uvw 1000
+qwe xyz 2005-11-07 100 uvw 1000
+DROP PROCEDURE sp_ins_1;
+DROP PROCEDURE sp_ins_3;
+DROP PROCEDURE sp_upd;
+DROP PROCEDURE sp_ins_upd;
+DROP PROCEDURE sp_del;
+DROP PROCEDURE sp_with_rowcount;
+DROP TABLE temp;
+
+Testcase 3.1.10.8:
+------------------
+
+Ensure that the mysql_affected_rows() C API function always returns the correct
+number of rows affected by the execution of a stored procedure.
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
new file mode 100644
index 00000000..975c0145
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
@@ -0,0 +1,367 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase: 3.5.1.1:
+------------------
+use test;
+Create trigger trg1_1 BEFORE INSERT
+on tb3 for each row set @test_before = 2, new.f142 = @test_before;
+Create trigger trg1_2 AFTER INSERT
+on tb3 for each row set @test_after = 6;
+Create trigger trg1_4 BEFORE UPDATE
+on tb3 for each row set @test_before = 27,
+new.f142 = @test_before,
+new.f122 = 'Before Update Trigger';
+Create trigger trg1_3 AFTER UPDATE
+on tb3 for each row set @test_after = '15';
+Create trigger trg1_5 BEFORE DELETE on tb3 for each row
+select count(*) into @test_before from tb3 as tr_tb3
+where f121 = 'Test 3.5.1.1';
+Create trigger trg1_6 AFTER DELETE on tb3 for each row
+select count(*) into @test_after from tb3 as tr_tb3
+where f121 = 'Test 3.5.1.1';
+set @test_before = 1;
+set @test_after = 5;
+select @test_before, @test_after;
+@test_before @test_after
+1 5
+Insert into tb3 (f121, f122, f142, f144, f134)
+values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 First Row 2 0000000005 1
+select @test_before, @test_after;
+@test_before @test_after
+2 6
+set @test_before = 18;
+set @test_after = 8;
+select @test_before, @test_after;
+@test_before @test_after
+18 8
+Update tb3 set tb3.f122 = 'Update',
+tb3.f142 = @test_before,
+tb3.f144 = @test_after
+where tb3.f121 = 'Test 3.5.1.1';
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 Before Update Trigger 27 0000000008 1
+select @test_before, @test_after;
+@test_before @test_after
+27 15
+Insert into tb3 (f121, f122, f142, f144, f134)
+values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
+set @test_before = 0;
+set @test_after = 0;
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 Before Update Trigger 27 0000000008 1
+Test 3.5.1.1 Second Row 2 0000000006 2
+select @test_before, @test_after;
+@test_before @test_after
+0 0
+Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2;
+select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+f121 f122 f142 f144 f134
+Test 3.5.1.1 Before Update Trigger 27 0000000008 1
+select @test_before, @test_after;
+@test_before @test_after
+2 1
+drop trigger trg1_1;
+drop trigger trg1_2;
+drop trigger trg1_3;
+drop trigger trg1_4;
+drop trigger trg1_5;
+drop trigger trg1_6;
+delete from tb3 where f121='Test 3.5.1.1';
+
+Testcase: 3.5.1.2:
+------------------
+Create trigger trg_1 after insert
+on tb3 for each statement set @x= 1;
+ERROR 42000: 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 'statement set @x= 1' at line 2
+drop trigger trg_1;
+
+Testcase 3.5.1.3:
+-----------------
+CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't';
+ERROR 42000: 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 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
+CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's';
+ERROR 42000: 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 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1
+CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row;
+ERROR 42000: 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 'set @ret1 = 'test' for each row' at line 1
+CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row;
+ERROR 42000: 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 'DELETE AFTER on tb3 set @ret1 = 'test' for each row' at line 1
+CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test';
+ERROR 42000: 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 'for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'' at line 1
+drop trigger trg3_1;
+drop trigger trg3_2;
+drop trigger trg3_3;
+drop trigger trg3_4;
+drop trigger trg3_5;
+
+Testcase: 3.5.1.5:
+------------------
+CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e';
+ERROR 42000: 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 'on tb3 for each row set new.f120 = 'e'' at line 1
+CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f';
+ERROR 42000: 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 'INSERT on tb3 for each set row new.f120 = 'f'' at line 1
+CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g';
+ERROR 42000: 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 'tb3 for each row set new.f120 = 'g'' at line 1
+CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g';
+ERROR 42000: 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 'set new.f120 = 'g'' at line 1
+CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g';
+ERROR 42000: 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 'trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'' at line 1
+CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g';
+ERROR 42000: 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 'for each row set new.f120 = 'g'' at line 1
+drop trigger trg4_1;
+drop trigger trg4_2;
+drop trigger trg4_3;
+drop trigger trg4_4;
+drop trigger trg4_5;
+drop trigger trg4_6;
+
+Testcase 3.5.1.6: - Need to fix
+-------------------------------
+
+Testcase 3.5.1.7: - need to fix
+-------------------------------
+drop table if exists t1;
+Warnings:
+Note 1051 Unknown table 'test.t1'
+create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
+CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
+for each row set new.f3 = '14';
+CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
+BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
+ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long
+CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
+BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
+insert into t1 (f2) values ('insert 3.5.1.7');
+select * from t1;
+f1 f2 f3
+NULL insert 3.5.1.7 14
+update t1 set f2='update 3.5.1.7';
+select * from t1;
+f1 f2 f3
+NULL update 3.5.1.7 42
+select trigger_name from information_schema.triggers where trigger_schema <> 'sys' order by trigger_name;
+trigger_name
+gs_insert
+trg5_1
+trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
+ts_insert
+drop trigger trg5_1;
+drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ;
+ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long
+drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX;
+drop table t1;
+
+Testcase 3.5.1.8:
+-----------------
+CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '* before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 'trigger before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '100 before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
+ERROR 42000: 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 '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
+CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
+for each row set new.f120 ='X';
+ERROR HY000: Trigger in wrong schema
+drop database if exists trig_db;
+create database trig_db;
+use trig_db;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+use test;
+CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
+for each row set @ret_trg6_2 = 5;
+ERROR 42S02: Table 'trig_db.tb3' doesn't exist
+use trig_db;
+CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
+for each row set @ret_trg6_3 = 18;
+ERROR HY000: Trigger in wrong schema
+use test;
+drop database trig_db;
+drop trigger trg6_1;
+drop trigger trg6_3;
+
+Testcase 3.5.1.9:(cannot be inplemented at this point)
+------------------------------------------------------
+
+Testcase 3.5.1.10:
+------------------
+CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X';
+CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y';
+ERROR HY000: Trigger 'test.trg7_1' already exists
+drop trigger trg7_1;
+
+Testcase 3.5.1.?:
+-----------------
+drop table if exists t1;
+drop table if exists t2;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t1
+for each row set new.f1 ='trig t1';
+create trigger trig before update on t2
+for each row set new.f1 ='trig t2';
+ERROR HY000: Trigger 'test.trig' already exists
+insert into t1 value ('insert to t1',1);
+select * from t1;
+f1 f2
+trig t1 1
+update t1 set f1='update to t1';
+select * from t1;
+f1 f2
+update to t1 1
+insert into t2 value ('insert to t2',2);
+update t2 set f1='update to t1';
+select * from t2;
+f1 f2
+update to t1 2
+drop table t1;
+drop table t2;
+drop trigger trig;
+
+Testcase 3.5.1.11:
+------------------
+drop database if exists trig_db1;
+drop database if exists trig_db2;
+drop database if exists trig_db3;
+create database trig_db1;
+create database trig_db2;
+create database trig_db3;
+use trig_db1;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t1
+for each row set new.f1 ='trig1', @test_var1='trig1';
+use trig_db2;
+create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t2
+for each row set new.f1 ='trig2', @test_var2='trig2';
+use trig_db3;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig before insert on t1
+for each row set new.f1 ='trig3', @test_var3='trig3';
+set @test_var1= '', @test_var2= '', @test_var3= '';
+use trig_db1;
+insert into t1 (f1,f2) values ('insert to db1 t1',1);
+insert into trig_db1.t1 (f1,f2) values ('insert to db1 t1 from db1',2);
+insert into trig_db2.t2 (f1,f2) values ('insert to db2 t2 from db1',3);
+insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4);
+select @test_var1, @test_var2, @test_var3;
+@test_var1 @test_var2 @test_var3
+trig1 trig2 trig3
+select * from t1 order by f2;
+f1 f2
+trig1 1
+trig1 2
+select * from trig_db2.t2;
+f1 f2
+trig2 3
+select * from trig_db3.t1;
+f1 f2
+trig3 4
+select * from t1 order by f2;
+f1 f2
+trig1 1
+trig1 2
+use test;
+drop database trig_db1;
+drop database trig_db2;
+drop database trig_db3;
+
+Testcase 3.5.2.1/2/3:
+---------------------
+drop database if exists trig_db1;
+drop database if exists trig_db2;
+create database trig_db1;
+create database trig_db2;
+use trig_db1;
+create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create table trig_db2.t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
+create trigger trig1_b before insert on t1
+for each row set @test_var1='trig1_b';
+create trigger trig_db1.trig1_a after insert on t1
+for each row set @test_var2='trig1_a';
+create trigger trig_db2.trig2 before insert on trig_db2.t1
+for each row set @test_var3='trig2';
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where trigger_schema like 'trig_db%'
+ order by trigger_name;
+trigger_schema trigger_name event_object_table
+trig_db1 trig1_a t1
+trig_db1 trig1_b t1
+trig_db2 trig2 t1
+set @test_var1= '', @test_var2= '', @test_var3= '';
+insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
+insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
+select @test_var1, @test_var2, @test_var3;
+@test_var1 @test_var2 @test_var3
+trig1_b trig1_a trig2
+drop database trig_db1;
+drop database trig_db2;
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
new file mode 100644
index 00000000..c1c1c6f8
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
@@ -0,0 +1,768 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase 3.5.3:
+---------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= <engine_to_be_used>;
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+
+Testcase 3.5.3.2/6:
+-------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant ALL on *.* to test_noprivs@localhost;
+revoke TRIGGER on *.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+
+Testcase 3.5.3.2:
+-----------------
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.2_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.2-no');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.2_2-yes';
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.2-yes');
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
+insert into t1 (f1) values ('insert 3.5.3.2-yes');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+trig 3.5.3.2_2-yes
+
+Testcase 3.5.3.6:
+-----------------
+connection no_privs;
+use priv_db;
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.6-yes');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+connection yes_privs;
+use priv_db;
+drop trigger trg1_2;
+connection default;
+use priv_db;
+insert into t1 (f1) values ('insert 3.5.3.6-no');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+connection default;
+drop trigger trg1_2;
+disconnect no_privs;
+disconnect yes_privs;
+
+Testcase 3.5.3.7a:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant ALL on *.* to test_noprivs@localhost;
+revoke UPDATE on *.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connect no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs_424a;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+show grants;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+create trigger trg4a_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1a';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1a');
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+drop trigger trg4a_1;
+connection yes_privs_424a;
+use priv_db;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants;
+Grants for test_yesprivs@localhost
+GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create trigger trg4a_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2a';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2b');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+drop trigger trg4a_2;
+disconnect no_privs_424a;
+disconnect yes_privs_424a;
+
+Testcase 3.5.3.7b:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs;
+grant ALL on priv_db.* to test_noprivs@localhost;
+revoke UPDATE on priv_db.* from test_noprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant UPDATE on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost`
+connect no_privs_424b,localhost,test_noprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_424b;
+show grants;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg4b_1 before UPDATE on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1b';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1b');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+drop trigger trg4b_1;
+connection yes_privs_424b;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg4b_2 before UPDATE on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2b';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2b');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+insert 3.5.3.7-2b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+drop trigger trg4b_2;
+disconnect no_privs_424b;
+disconnect yes_privs_424b;
+
+Testcase 3.5.3.7c
+-----------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant ALL on priv_db.t1 to test_noprivs@localhost;
+revoke UPDATE on priv_db.t1 from test_noprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_424c;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg4c_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1c';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1c');
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+drop trigger trg4c_1;
+connection yes_privs_424c;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg4c_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2c';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2c');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+trig 3.5.3.7-2c
+drop trigger trg4c_2;
+disconnect no_privs_424c;
+disconnect yes_privs_424c;
+
+Testcase 3.5.3.7d:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_noprivs;
+Grants for test_noprivs@%
+GRANT TRIGGER ON *.* TO `test_noprivs`@`%`
+connect no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_424d;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg4d_1 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-1d';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-1d');
+ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+trig 3.5.3.7-2c
+drop trigger trg4d_1;
+connection yes_privs_424d;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg4d_2 before INSERT on t1 for each row
+set new.f1 = 'trig 3.5.3.7-2d';
+connection default;
+insert into t1 (f1) values ('insert 3.5.3.7-2d');
+select f1 from t1 order by f1;
+f1
+insert 3.5.3.2-no
+insert 3.5.3.6-no
+insert 3.5.3.7-1b
+trig 3.5.3.2_2-yes
+trig 3.5.3.2_2-yes
+trig 3.5.3.7-2a
+trig 3.5.3.7-2b
+trig 3.5.3.7-2c
+trig 3.5.3.7-2d
+drop trigger trg4d_2;
+disconnect no_privs_424d;
+disconnect yes_privs_424d;
+
+Testcase 3.5.3.8a:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant ALL on *.* to test_noprivs@localhost;
+revoke SELECT on *.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connect no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425a;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+show grants;
+Grants for test_noprivs@localhost
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create trigger trg5a_1 before INSERT on t1 for each row
+set @test_var = new.f1;
+connection default;
+set @test_var = 'before trig 3.5.3.8-1a';
+select @test_var;
+@test_var
+before trig 3.5.3.8-1a
+insert into t1 (f1) values ('insert 3.5.3.8-1a');
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1a
+drop trigger trg5a_1;
+connection yes_privs_425a;
+use priv_db;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants;
+Grants for test_yesprivs@localhost
+GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create trigger trg5a_2 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-2a';
+select @test_var;
+@test_var
+before trig 3.5.3.8-2a
+insert into t1 (f1) values ('insert 3.5.3.8-2a');
+select @test_var;
+@test_var
+insert 3.5.3.8-2a
+drop trigger trg5a_2;
+disconnect no_privs_425a;
+disconnect yes_privs_425a;
+
+Testcase: 3.5.3.8b
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant ALL on priv_db.* to test_noprivs@localhost;
+revoke SELECT on priv_db.* from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost`
+connect no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425b;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg5b_1 before UPDATE on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-1b';
+insert into t1 (f1) values ('insert 3.5.3.8-1b');
+select @test_var;
+@test_var
+before trig 3.5.3.8-1b
+update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1b
+drop trigger trg5b_1;
+connection yes_privs_425b;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg5b_2 before UPDATE on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-2b';
+insert into t1 (f1) values ('insert 3.5.3.8-2b');
+select @test_var;
+@test_var
+before trig 3.5.3.8-2b
+update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
+select @test_var;
+@test_var
+update 3.5.3.8-2b
+drop trigger trg5b_2;
+disconnect no_privs_425b;
+disconnect yes_privs_425b;
+
+Testcase 3.5.3.8c:
+------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant ALL on priv_db.t1 to test_noprivs@localhost;
+revoke SELECT on priv_db.t1 from test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425c;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg5c_1 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var= 'before trig 3.5.3.8-1c';
+insert into t1 (f1) values ('insert 3.5.3.8-1c');
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1c
+drop trigger trg5c_1;
+connection yes_privs_425c;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg5c_2 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var='before trig 3.5.3.8-2c';
+insert into t1 (f1) values ('insert 3.5.3.8-2c');
+select @test_var;
+@test_var
+insert 3.5.3.8-2c
+drop trigger trg5c_2;
+disconnect no_privs_425c;
+disconnect yes_privs_425c;
+
+Testcase: 3.5.3.8d:
+-------------------
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant TRIGGER on *.* to test_noprivs@localhost;
+grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+connection no_privs_425d;
+show grants;
+Grants for test_noprivs@localhost
+GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+use priv_db;
+create trigger trg5d_1 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var='before trig 3.5.3.8-1d';
+insert into t1 (f1) values ('insert 3.5.3.8-1d');
+ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
+select @test_var;
+@test_var
+before trig 3.5.3.8-1d
+drop trigger trg5d_1;
+connection yes_privs_425d;
+show grants;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+use priv_db;
+create trigger trg5d_2 before INSERT on t1 for each row
+set @test_var= new.f1;
+connection default;
+set @test_var='before trig 3.5.3.8-2d';
+insert into t1 (f1) values ('insert 3.5.3.8-2d');
+select @test_var;
+@test_var
+insert 3.5.3.8-2d
+drop trigger trg5d_2;
+
+Testcase: 3.5.3.x:
+------------------
+use priv_db;
+drop table if exists t1;
+drop table if exists t2;
+create table t1 (f1 int) engine= <engine_to_be_used>;
+create table t2 (f2 int) engine= <engine_to_be_used>;
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on *.* to test_yesprivs@localhost;
+grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
+grant SELECT on priv_db.t2 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connect yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_353x;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1 before insert on t1 for each row
+insert into t2 values (new.f1);
+connection default;
+use priv_db;
+insert into t1 (f1) values (4);
+ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
+grant INSERT on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (4);
+select f1 from t1 order by f1;
+f1
+4
+select f2 from t2 order by f2;
+f2
+4
+connection yes_353x;
+use priv_db;
+drop trigger trg1;
+create trigger trg2 before insert on t1 for each row
+update t2 set f2=new.f1-1;
+connection default;
+use priv_db;
+insert into t1 (f1) values (2);
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
+grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (2);
+select f1 from t1 order by f1;
+f1
+2
+4
+select f2 from t2 order by f2;
+f2
+1
+connection yes_353x;
+use priv_db;
+drop trigger trg2;
+create trigger trg3 before insert on t1 for each row
+select f2 into @aaa from t2 where f2=new.f1;
+connection default;
+use priv_db;
+insert into t1 (f1) values (1);
+ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
+grant SELECT on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (1);
+select f1 from t1 order by f1;
+f1
+1
+2
+4
+select f2 from t2 order by f2;
+f2
+1
+select @aaa;
+@aaa
+1
+connection yes_353x;
+use priv_db;
+drop trigger trg3;
+create trigger trg4 before insert on t1 for each row
+delete from t2;
+connection default;
+use priv_db;
+insert into t1 (f1) values (1);
+ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
+grant DELETE on priv_db.t2 to test_yesprivs@localhost;
+insert into t1 (f1) values (1);
+select f1 from t1 order by f1;
+f1
+1
+1
+2
+4
+select f2 from t2 order by f2;
+f2
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+drop user test_noprivs;
+use test;
+drop table tb3;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
new file mode 100644
index 00000000..b16beda5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
@@ -0,0 +1,1710 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+
+Testcase for db level:
+----------------------
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+create database priv_db;
+create database no_priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= myisam;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant select on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost`
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant select,insert on priv_db.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT ON `priv_db`.* TO `test_noprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+
+no trigger privilege on db level for create:
+--------------------------------------------
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connect no_privs,localhost,test_noprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+
+trigger privilege on db level for create:
+-----------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select f1 from t1 order by f1;
+f1
+insert-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant UPDATE on priv_db.* to test_yesprivs@localhost;
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost`
+
+no trigger privilege on db level for drop:
+------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+
+no trigger privilege at activation time:
+----------------------------------------
+insert into t1 (f1) values ('insert-yes');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+
+trigger privilege at activation time:
+-------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+trigger privilege on db level for drop:
+---------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+
+takes effect after use priv_db:
+-------------------------------
+use priv_db;
+drop trigger trg1_2;
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+switch to db without having trigger priv for it:
+------------------------------------------------
+use no_priv_db;
+create table t1 (f1 char(20)) engine= myisam;
+grant SELECT,UPDATE on no_priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `no_priv_db`.* TO `test_yesprivs`@`localhost`
+
+use db with trigger privilege on db level and without...:
+---------------------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+create trigger trg1_3 before INSERT on t1 for each row
+set new.f1 = 'trig 1_3-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+use priv_db;
+create trigger trg1_3 before INSERT on t1 for each row
+set new.f1 = 'trig 1_3-yes';
+use no_priv_db;
+create trigger trg1_4 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_4-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+use priv_db;
+create trigger trg1_4 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_4-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use no_priv_db;
+ERROR 42000: Access denied for user 'test_noprivs'@'localhost' to database 'no_priv_db'
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_3-yes
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_3-yes
+trig 1_3-yes
+disconnect no_privs;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+drop trigger trg1_3;
+ERROR HY000: Trigger does not exist
+use priv_db;
+drop trigger trg1_3;
+use no_priv_db;
+drop trigger trg1_4;
+ERROR HY000: Trigger does not exist
+use priv_db;
+drop trigger trg1_4;
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop table priv_db.t1;
+drop table no_priv_db.t1;
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+######### Testcase for table level: ########
+---------------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= myisam;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connect no_privs,localhost,test_noprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs;
+
+no trigger privilege on table level for create:
+-----------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+grant select, update, insert on priv_db.t1 to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+show tables;
+Tables_in_priv_db
+t1
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert1-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+show tables;
+Tables_in_priv_db
+t1
+insert into t1 (f1) values ('insert2-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+
+trigger privilege on table level for create:
+--------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert3-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+insert into t1 (f1) values ('insert4-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+trig 1_2-yes
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+
+no trigger privilege on table level for drop:
+---------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_2;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+
+no trigger privilege at activation time:
+----------------------------------------
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert5-no');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+
+trigger privilege at activation time:
+-------------------------------------
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert6-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+trigger privilege on table level for drop:
+------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+drop trigger trg1_2;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert7-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+insert7-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+insert into t1 (f1) values ('insert8-yes');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+insert7-yes
+insert8-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+
+switch to table without having trigger priv for it:
+---------------------------------------------------
+create table t2 (f1 char(20)) engine= myisam;
+grant SELECT, INSERT, UPDATE on priv_db.t2 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+grant SELECT, INSERT, UPDATE on priv_db.t2 to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_noprivs`@`localhost`
+
+use table with trigger privilege and without...:
+------------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+create trigger trg1_3 before INSERT on t1 for each row
+set new.f1 = 'trig 1_3-yes';
+create trigger trg2_2 before UPDATE on t2 for each row
+set new.f1 = 'trig 2_2-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+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 # STRICT_TRANS_TABLES,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,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
+test_noprivs@localhost
+insert into t2 (f1) values ('insert9-yes');
+select f1 from t2 order by f1;
+f1
+insert9-yes
+insert into t1 (f1) values ('insert10-no');
+select f1 from t1 order by f1;
+f1
+insert1-yes
+insert2-yes
+insert7-yes
+insert8-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_3-yes
+disconnect no_privs;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg2_1;
+ERROR HY000: Trigger does not exist
+drop trigger trg1_3;
+drop trigger trg2_2;
+ERROR HY000: Trigger does not exist
+drop trigger trg1_4;
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+#### Testcase for mix of user(global) and db level: ####
+--------------------------------------------------------
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+create database priv_db;
+create database no_priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= myisam;
+use no_priv_db;
+create table t1 (f1 char(20)) engine= myisam;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant ALL on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant SELECT,INSERT on *.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT SELECT, INSERT ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+
+trigger privilege on user level for create:
+-------------------------------------------
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+use no_priv_db;
+create trigger priv_db.trg1_5 before UPDATE on priv_db.t1
+for each row
+set new.f1 = 'trig 1_5-yes';
+insert into priv_db.t1 (f1) values ('insert-no');
+select f1 from priv_db.t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+drop trigger priv_db.trg1_5;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+revoke TRIGGER on *.* from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+disconnect yes_privs;
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+select * from information_schema.triggers;
+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
+drop trigger trg1_1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+show grants;
+Grants for root@localhost
+GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
+GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+drop trigger trg1_1;
+use priv_db;
+
+no trigger privilege on db level for create:
+--------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+
+trigger privilege on db level for create:
+-----------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
+for each row
+set new.f1 = 'trig 1_9-yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+use no_priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
+for each row
+set new.f1 = 'trig 1_9-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+use no_priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+drop trigger priv_db.trg1_9;
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+drop trigger priv_db.trg1_9;
+revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+use priv_db;
+insert into t1 (f1) values ('insert-yes');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+grant TRIGGER on *.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+use no_priv_db;
+insert into t1 (f1) values ('insert-yes');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+disconnect yes_privs;
+connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+select current_user;
+current_user
+test_yesprivs@localhost
+use no_priv_db;
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+disconnect yes_privs;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+use no_priv_db;
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+insert-yes
+insert-yes
+trig 1_2-yes
+disconnect no_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+drop database if exists h1;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+####### Testcase for mix of db and table level: #######
+-------------------------------------------------------
+drop database if exists priv1_db;
+drop database if exists priv2_db;
+create database priv1_db;
+create database priv2_db;
+use priv1_db;
+create table t1 (f1 char(20)) engine= myisam;
+create table t2 (f1 char(20)) engine= myisam;
+use priv2_db;
+create table t1 (f1 char(20)) engine= myisam;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant ALL on priv1_db.* to test_yesprivs@localhost;
+grant SELECT,UPDATE on priv2_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant SELECT,INSERT,UPDATE on priv1_db.* to test_noprivs@localhost;
+grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO `test_noprivs`@`localhost`
+GRANT SELECT, INSERT ON `priv2_db`.* TO `test_noprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,priv1_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect no_privs,localhost,test_noprivs,PWD,priv1_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+
+trigger privilege on one db1 db level, not on db2
+-------------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv1_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+use priv2_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig1_1-yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv2_db`.`t1`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+insert into t1 (f1) values ('insert1_no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+insert into t2 (f1) values ('insert1_no');
+select f1 from t2 order by f1;
+f1
+trig 2_1-yes
+insert into priv2_db.t1 (f1) values ('insert21-yes');
+select f1 from priv2_db.t1 order by f1;
+f1
+insert21-yes
+use priv2_db;
+insert into t1 (f1) values ('insert1_yes');
+select f1 from t1 order by f1;
+f1
+insert1_yes
+insert21-yes
+insert into priv1_db.t1 (f1) values ('insert11-no');
+select f1 from priv1_db.t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+insert into priv1_db.t2 (f1) values ('insert22-no');
+select f1 from priv1_db.t2 order by f1;
+f1
+trig 2_1-yes
+trig 2_1-yes
+
+revoke trigger privilege on table level (not existing)
+------------------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv1_db;
+revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost;
+ERROR 42000: There is no such grant defined for user 'test_yesprivs' on host 'localhost' on table 't1'
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_1;
+ERROR HY000: Trigger does not exist
+drop trigger trg2_1;
+ERROR HY000: Trigger does not exist
+use priv1_db;
+drop trigger trg1_1;
+drop trigger trg2_1;
+connection default;
+select current_user;
+current_user
+root@localhost
+use priv1_db;
+revoke TRIGGER on priv1_db.* from test_yesprivs@localhost;
+
+no trigger privilege on table level for create:
+-----------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv1_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE HISTORY ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost`
+
+trigger privilege on table level for create:
+--------------------------------------------
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+create trigger trg1_2 before INSERT on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-no';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv1_db;
+insert into t1 (f1) values ('insert2-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+insert into t2 (f1) values ('insert2-yes');
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+trig 2_1-yes
+insert into priv2_db.t1 (f1) values ('insert22-yes');
+select f1 from priv2_db.t1 order by f1;
+f1
+insert1_yes
+insert21-yes
+insert22-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv1_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost`
+GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
+use priv1_db;
+create trigger trg2_1 before INSERT on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv1_db;
+insert into t1 (f1) values ('insert3-no');
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+insert into t2 (f1) values ('insert3-no');
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+trig 2_1-yes
+trig 2_1-yes
+use priv2_db;
+insert into priv1_db.t1 (f1) values ('insert12-no');
+select f1 from priv1_db.t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_2-yes
+trig 1_2-yes
+trig 1_2-yes
+insert into priv1_db.t2 (f1) values ('insert23-no');
+select f1 from priv1_db.t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+trig 2_1-yes
+trig 2_1-yes
+trig 2_1-yes
+disconnect no_privs;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_2;
+drop trigger trg2_1;
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv1_db;
+drop database if exists priv2_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
+
+#### Testcase for trigger privilege on execution time ########
+--------------------------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= myisam;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+create User test_useprivs@localhost;
+set password for test_useprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+show triggers;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+grant select, insert, update ,trigger
+on priv_db.t1 to test_yesprivs@localhost
+with grant option;
+grant select
+on priv_db.t1 to test_useprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+create trigger trg1_1 before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+grant insert on t1 to test_useprivs@localhost;
+prepare ins1 from 'insert into t1 (f1) values (''insert1-no'')';
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
+connect use_privs,localhost,test_useprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+prepare ins1 from 'insert into t1 (f1) values (''insert3-no'')';
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert4-no'')';
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert6-no'')';
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+prepare ins1 from 'insert into t1 (f1) values (''insert7-no'')';
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+deallocate prepare ins1;
+connection use_privs;
+select current_user;
+current_user
+test_useprivs@localhost
+execute ins1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+deallocate prepare ins1;
+connection default;
+select current_user;
+current_user
+root@localhost
+grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+drop trigger trg1_1;
+connection default;
+select current_user;
+current_user
+root@localhost
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_useprivs@localhost;
+
+######### Testcase for definer: ########
+-----------------------------------------------
+drop database if exists priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= myisam;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+create definer=not_ex_user@localhost trigger trg1_0
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_0-yes';
+Warnings:
+Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
+drop trigger trg1_0;
+create definer=test_yesprivs@localhost trigger trg1_0
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_0-yes';
+grant select, insert, update
+on priv_db.t1 to test_yesprivs@localhost;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert-no');
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f1 from t1 order by f1;
+f1
+drop trigger trg1_0;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+connection default;
+select current_user;
+current_user
+root@localhost
+grant select, insert, update ,trigger
+on priv_db.t1 to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_0-yes
+drop trigger trg1_0;
+create definer=not_ex_user@localhost trigger trg1_0
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_0-yes';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
+create definer=current_user trigger trg1_1
+before INSERT on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+insert into t1 (f1) values ('insert-no');
+select f1 from t1 order by f1;
+f1
+trig 1_0-yes
+trig 1_1-yes
+create definer=test_yesprivs@localhost trigger trg1_2
+before UPDATE on t1 for each row
+set new.f1 = 'trig 1_2-yes';
+update t1 set f1 = 'update-yes' where f1 like '%trig%';
+select f1 from t1 order by f1;
+f1
+trig 1_2-yes
+trig 1_2-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+grant trigger on priv_db.* to test_yesprivs@localhost
+with grant option;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+show grants;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` WITH GRANT OPTION
+GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+create definer=not_ex_user@localhost trigger trg1_3
+after UPDATE on t1 for each row
+set @var1 = 'trig 1_3-yes';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
+connection default;
+select current_user;
+current_user
+root@localhost
+disconnect yes_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+
+####### Testcase for column privileges of triggers: #######
+-----------------------------------------------------------
+drop database if exists priv_db;
+drop database if exists no_priv_db;
+create database priv_db;
+use priv_db;
+create table t1 (f1 char(20)) engine= myisam;
+create table t2 (f1 char(20)) engine= myisam;
+create User test_yesprivs@localhost;
+set password for test_yesprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+create User test_noprivs@localhost;
+set password for test_noprivs@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost;
+show grants for test_noprivs@localhost;
+Grants for test_noprivs@localhost
+GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, UPDATE ON `priv_db`.* TO `test_noprivs`@`localhost`
+connect yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection yes_privs;
+connect no_privs,localhost,test_noprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection no_privs;
+
+update only on column:
+----------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t1
+to test_yesprivs@localhost;
+grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t2
+to test_yesprivs@localhost;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert1-yes');
+insert into t2 (f1) values ('insert1-yes');
+create trigger trg1_1 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_1-yes';
+create trigger trg2_1 before UPDATE on t2 for each row
+set new.f1 = 'trig 2_1-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+select f1 from t1 order by f1;
+f1
+insert1-yes
+update t1 set f1 = 'update1_no'
+ where f1 like '%insert%';
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+select f1 from t2 order by f1;
+f1
+insert1-yes
+update t2 set f1 = 'update1_no'
+ where f1 like '%insert%';
+select f1 from t2 order by f1;
+f1
+trig 2_1-yes
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke UPDATE on priv_db.*
+from test_yesprivs@localhost;
+revoke UPDATE(f1) on priv_db.t2
+from test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 (f1) values ('insert2-yes');
+insert into t2 (f1) values ('insert2-yes');
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f1 = 'update2_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update2_no'
+ where f1 like '%insert%';
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2'
+update t1 set f1 = 'update3_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update3_no'
+ where f1 like '%insert%';
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2'
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+
+check if access only on one of three columns
+--------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+alter table priv_db.t1 add f2 char(20), add f3 int;
+revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+grant TRIGGER,SELECT on priv_db.t1 to test_yesprivs@localhost;
+grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+insert into t1 values ('insert2-yes','insert2-yes',1);
+insert into t1 values ('insert3-yes','insert3-yes',2);
+select * from t1 order by f1;
+f1 f2 f3
+insert2-yes insert2-yes 1
+insert3-yes insert3-yes 2
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f1 = 'update4-no',
+f2 = 'update4-yes',
+f3 = f3*10
+where f2 like '%yes';
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update4-yes 10
+trig 1_1-yes update4-yes 20
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+create trigger trg1_2 after UPDATE on t1 for each row
+set @f2 = 'trig 1_2-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+update t1 set f1 = 'update5-yes',
+f2 = 'update5-yes'
+ where f2 like '%yes';
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update5-yes 10
+trig 1_1-yes update5-yes 20
+select @f2;
+@f2
+trig 1_2-yes
+update t1 set f1 = 'update6_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update6_no'
+ where f1 like '%insert%';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+update t1 set f1 = 'update7_no'
+ where f1 like '%insert%';
+update t2 set f1 = 'update7_no'
+ where f1 like '%insert%';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
+select f1 from t1 order by f1;
+f1
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+trig 1_1-yes
+select f1 from t2 order by f1;
+f1
+insert2-yes
+trig 2_1-yes
+
+check if rejected without trigger privilege:
+--------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+update t1 set f1 = 'update8-no',
+f2 = 'update8-no'
+ where f2 like '%yes';
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update5-yes 10
+trig 1_1-yes update5-yes 20
+select @f2;
+@f2
+trig 1_2-yes
+
+check trigger, but not update privilege on column:
+--------------------------------------------------
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost;
+grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1
+to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection yes_privs;
+select current_user;
+current_user
+test_yesprivs@localhost
+use priv_db;
+drop trigger trg1_1;
+create trigger trg1_3 before UPDATE on t1 for each row
+set new.f1 = 'trig 1_3-yes';
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f1 = 'update9-no',
+f2 = 'update9-no'
+ where f2 like '%yes';
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select * from t1 order by f1,f2,f3;
+f1 f2 f3
+trig 1_1-yes NULL NULL
+trig 1_1-yes NULL NULL
+trig 1_1-yes update5-yes 10
+trig 1_1-yes update5-yes 20
+update t1 set f3= f3+1;
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
+select f3 from t1 order by f3;
+f3
+NULL
+NULL
+10
+20
+connection default;
+select current_user;
+current_user
+root@localhost
+revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+grant UPDATE(f1),UPDATE(f2),UPDATE(f3) on priv_db.t1
+to test_yesprivs@localhost;
+show grants for test_yesprivs@localhost;
+Grants for test_yesprivs@localhost
+GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+connection no_privs;
+select current_user;
+current_user
+test_noprivs@localhost
+use priv_db;
+update t1 set f3= f3+1;
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
+select f3 from t1 order by f3;
+f3
+NULL
+NULL
+10
+20
+
+##### trigger privilege on column level? #######
+------------------------------------------------
+grant TRIGGER(f1) on priv_db.t1 to test_yesprivs@localhost;
+ERROR 42000: 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 '(f1) on priv_db.t1 to test_yesprivs@localhost' at line 1
+disconnect yes_privs;
+disconnect no_privs;
+connection default;
+select current_user;
+current_user
+root@localhost
+drop database if exists priv_db;
+drop user test_yesprivs@localhost;
+drop user test_noprivs@localhost;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
new file mode 100644
index 00000000..c9a15b46
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
@@ -0,0 +1,496 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+set GLOBAL sql_mode="";
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase: 3.5:
+--------------
+create User test_general@localhost;
+set password for test_general@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
+create User test_super@localhost;
+set password for test_super@localhost = password('PWD');
+grant ALL on *.* to test_super@localhost with grant OPTION;
+connect con1_general,localhost,test_general,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection con1_general;
+connect con1_super,localhost,test_super,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK;
+connection con1_super;
+connection default;
+
+Testcase 3.5.4:
+---------------
+connection default;
+use test;
+
+Testcase 3.5.4.1:
+-----------------
+connection con1_super;
+create database db_drop;
+Use db_drop;
+create table t1 (f1 char(30)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on db_drop.t1 to test_general;
+Use db_drop;
+Create trigger trg1 BEFORE INSERT on t1
+for each row set new.f1='Trigger 3.5.4.1';
+connection con1_general;
+Use db_drop;
+Insert into t1 values ('Insert error 3.5.4.1');
+Select * from t1 order by f1;
+f1
+Trigger 3.5.4.1
+connection con1_super;
+drop trigger trg1;
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where trigger_schema = 'db_drop'
+ order by trigger_name;
+trigger_schema trigger_name event_object_table
+connection con1_general;
+Insert into t1 values ('Insert no trigger 3.5.4.1');
+Select * from t1 order by f1;
+f1
+Insert no trigger 3.5.4.1
+Trigger 3.5.4.1
+connection con1_super;
+drop trigger trg1;
+drop database if exists db_drop;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.4.2:
+-----------------
+connection con1_super;
+create database db_drop2;
+Use db_drop2;
+drop table if exists t1_432 ;
+create table t1_432 (f1 char (30)) engine = <engine_to_be_used>;
+Drop trigger tr_does_not_exit;
+ERROR HY000: Trigger does not exist
+drop table if exists t1_432 ;
+drop database if exists db_drop2;
+
+Testcase 3.5.4.3:
+-----------------
+connection con1_super;
+create database db_drop3;
+Use db_drop3;
+drop table if exists t1_433 ;
+drop table if exists t1_433a ;
+create table t1_433 (f1 char (30)) engine = <engine_to_be_used>;
+create table t1_433a (f1a char (5)) engine = <engine_to_be_used>;
+CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
+set new.f1 = 'Trigger 3.5.4.3';
+Drop trigger t1.433.trg3;
+ERROR 42000: 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 '.trg3' at line 1
+Drop trigger db_drop3.t1.433.trg3;
+ERROR 42000: 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 '.433.trg3' at line 1
+Drop trigger mysql.trg3;
+ERROR HY000: Trigger does not exist
+Drop trigger tbx.trg3;
+ERROR HY000: Trigger does not exist
+Drop trigger db_drop3.trg3;
+drop table if exists t1_433;
+drop table if exists t1_433a;
+drop database if exists db_drop3;
+
+Testcase 3.5.4.4:
+-----------------
+connection con1_super;
+create database db_drop4;
+Use db_drop4;
+create table t1 (f1 char(30)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on db_drop4.t1 to test_general;
+Create trigger trg4 BEFORE INSERT on t1
+for each row set new.f1='Trigger 3.5.4.4';
+connection con1_general;
+Use db_drop4;
+Insert into t1 values ('Insert 3.5.4.4');
+Select * from t1;
+f1
+Trigger 3.5.4.4
+connection con1_super;
+Drop database db_drop4;
+Show databases like 'db_drop4';
+Database (db_drop4)
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where information_schema.triggers.trigger_name='trg4';
+trigger_schema trigger_name event_object_table
+create database db_drop4;
+Use db_drop4;
+create table t1 (f1 char(30)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on db_drop4.t1 to test_general;
+connection con1_general;
+Insert into t1 values ('2nd Insert 3.5.4.4');
+Select * from t1;
+f1
+2nd Insert 3.5.4.4
+connection con1_super;
+drop trigger trg4;
+ERROR HY000: Trigger does not exist
+drop database if exists db_drop4;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.4.5:
+-----------------
+connection con1_super;
+create database db_drop5;
+Use db_drop5;
+create table t1 (f1 char(50)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on t1 to test_general;
+Create trigger trg5 BEFORE INSERT on t1
+for each row set new.f1='Trigger 3.5.4.5';
+connection con1_general;
+Use db_drop5;
+Insert into t1 values ('Insert 3.5.4.5');
+Select * from t1;
+f1
+Trigger 3.5.4.5
+connection con1_super;
+Drop table t1;
+Show tables;
+Tables_in_db_drop5
+select trigger_schema, trigger_name, event_object_table
+from information_schema.triggers
+where information_schema.triggers.trigger_name='trg5';
+trigger_schema trigger_name event_object_table
+create table t1 (f1 char(50)) engine = <engine_to_be_used>;
+grant INSERT, SELECT on t1 to test_general;
+connection con1_general;
+Insert into t1 values ('2nd Insert 3.5.4.5');
+Select * from t1;
+f1
+2nd Insert 3.5.4.5
+connection con1_super;
+drop trigger trg5;
+ERROR HY000: Trigger does not exist
+drop database if exists db_drop5;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.5:
+---------------
+connection default;
+use test;
+
+Testcase 3.5.5.1:
+-----------------
+Create trigger trg1 before INSERT on t100 for each row set new.f2=1000;
+ERROR 42S02: Table 'test.t100' doesn't exist
+
+Testcase 3.5.5.2:
+-----------------
+Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
+Create trigger trg2 before INSERT
+on t1_temp for each row set new.f2=9999;
+ERROR HY000: Trigger's 't1_temp' is a view, temporary table or sequence
+drop table t1_temp;
+
+Testcase 3.5.5.3:
+-----------------
+Create view vw3 as select f118 from tb3;
+Create trigger trg3 before INSERT
+on vw3 for each row set new.f118='s';
+ERROR HY000: 'test.vw3' is not of type 'BASE TABLE'
+drop view vw3;
+
+Testcase 3.5.5.4:
+-----------------
+connection con1_super;
+create database dbtest_one;
+create database dbtest_two;
+use dbtest_two;
+create table t2 (f1 char(15)) engine = <engine_to_be_used>;
+use dbtest_one;
+create trigger trg4 before INSERT
+on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
+ERROR HY000: Trigger in wrong schema
+grant INSERT, SELECT on dbtest_two.t2 to test_general;
+grant SELECT on dbtest_one.* to test_general;
+connection con1_general;
+use dbtest_two;
+Insert into t2 values ('1st Insert 3.5.5.4');
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
+Select * from t2;
+f1
+1st Insert 3.5.
+use dbtest_one;
+Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4');
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
+Select * from dbtest_two.t2 order by f1;
+f1
+1st Insert 3.5.
+2nd Insert 3.5.
+connection con1_super;
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+DROP DATABASE if exists dbtest_one;
+drop database if EXISTS dbtest_two;
+
+Testcase 3.5.6:
+---------------
+connection default;
+use test;
+
+Testcase 3.5.6.1 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.6.2 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.6.3:
+-----------------
+Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25;
+ERROR 42000: 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 'DURING UPDATE on tb3 for each row set new.f132=25' at line 1
+Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15;
+ERROR 42000: 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 'TIME INSERT on tb3 for each row set new.f132=15' at line 1
+drop trigger tb3.trg3_1;
+drop trigger tb3.trg3_2;
+
+Testcase 3.5.6.4 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.6.5 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.1 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.2 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.3 (see Testcase 3.5.1.1)
+---------------------------------------
+
+Testcase 3.5.7.4:
+-----------------
+Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5;
+ERROR 42000: 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 'SELECT on tb3 for each row set new.f132=5' at line 1
+Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1;
+ERROR 42000: 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 'VALUE on tb3 for each row set new.f132=1' at line 1
+drop trigger tb3.trg4_1;
+drop trigger tb3.trg4_2;
+
+Testcase 3.5.7.5 / 3.5.7.6:
+---------------------------
+Create trigger trg5_1 BEFORE INSERT
+on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
+Create trigger trg5_2 BEFORE INSERT
+on tb3 for each row set new.f122='Trigger2 3.5.7.5';
+Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
+Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
+f121 f122
+Test 3.5.7.5/6 Trigger2 3.5.7.5
+update tb3 set f122='Update 3.5.7.6' where f121= 'Test 3.5.7.5/6';
+Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
+f121 f122
+Test 3.5.7.5/6 Update 3.5.7.6
+drop trigger trg5_1;
+drop trigger trg5_2;
+delete from tb3 where f121='Test 3.5.7.5/6';
+
+Testcase 3.5.7.7 / 3.5.7.8:
+---------------------------
+set @test_var='Before trig 3.5.7.7';
+Create trigger trg6_1 AFTER INSERT
+on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
+Create trigger trg6_2 AFTER INSERT
+on tb3 for each row set @test_var='Trigger2 3.5.7.7';
+select @test_var;
+@test_var
+Before trig 3.5.7.7
+Insert into tb3 (f121,f122) values ('Test 3.5.7.7/8','Insert 3.5.7.7');
+Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
+f121 f122
+Test 3.5.7.7/8 Insert 3.5.7.7
+select @test_var;
+@test_var
+Trigger2 3.5.7.7
+update tb3 set f122='Update 3.5.7.8' where f121= 'Test 3.5.7.7/8';
+Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
+f121 f122
+Test 3.5.7.7/8 Update 3.5.7.8
+select @test_var;
+@test_var
+Trigger2 3.5.7.7
+drop trigger trg6_1;
+drop trigger trg6_2;
+delete from tb3 where f121='Test 3.5.7.7/8';
+
+Testcase 3.5.7.9/10:
+--------------------
+Create trigger trg7_1 BEFORE UPDATE
+on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
+Create trigger trg7_2 BEFORE UPDATE
+on tb3 for each row set new.f122='Trigger2 3.5.7.9';
+Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
+Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
+f121 f122
+Test 3.5.7.9/10 Insert 3.5.7.9
+update tb3 set f122='update 3.5.7.10' where f121='Test 3.5.7.9/10';
+Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
+f121 f122
+Test 3.5.7.9/10 Trigger2 3.5.7.9
+drop trigger trg7_1;
+drop trigger trg7_2;
+delete from tb3 where f121='Test 3.5.7.9/10';
+
+Testcase 3.5.7.11/12:
+---------------------
+set @test_var='Before trig 3.5.7.11';
+Create trigger trg8_1 AFTER UPDATE
+on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
+Create trigger trg8_2 AFTER UPDATE
+on tb3 for each row set @test_var='Trigger2 3.5.7.11';
+select @test_var;
+@test_var
+Before trig 3.5.7.11
+Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12');
+select @test_var;
+@test_var
+Before trig 3.5.7.11
+Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
+f121 f122
+Test 3.5.7.11/12 Insert 3.5.7.11/12
+update tb3 set f122='update 3.5.7.12' where f121='Test 3.5.7.11/12';
+Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
+f121 f122
+Test 3.5.7.11/12 update 3.5.7.12
+select @test_var;
+@test_var
+Trigger2 3.5.7.11
+delete from tb3 where f121='Test 3.5.7.11/12';
+drop trigger trg8_1;
+drop trigger trg8_2;
+delete from tb3 where f121='Test 3.5.7.11/12';
+
+Testcase 3.5.7.13/14:
+---------------------
+set @test_var=1;
+Create trigger trg9_1 BEFORE DELETE
+on tb3 for each row set @test_var=@test_var+1;
+Create trigger trg9_2 BEFORE DELETE
+on tb3 for each row set @test_var=@test_var+10;
+select @test_var;
+@test_var
+1
+Insert into tb3 (f121,f122) values ('Test 3.5.7.13/14','Insert 3.5.7.13');
+Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
+f121 f122
+Test 3.5.7.13/14 Insert 3.5.7.13
+select @test_var;
+@test_var
+1
+delete from tb3 where f121='Test 3.5.7.13/14';
+Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
+f121 f122
+select @test_var;
+@test_var
+12
+delete from tb3 where f121='Test 3.5.7.13/14';
+select @test_var;
+@test_var
+12
+drop trigger trg9_1;
+drop trigger trg9_2;
+delete from tb3 where f121='Test 3.5.7.13/14';
+
+Testcase 3.5.7.15/16:
+---------------------
+set @test_var=1;
+Create trigger trg_3_406010_1 AFTER DELETE
+on tb3 for each row set @test_var=@test_var+5;
+Create trigger trg_3_406010_2 AFTER DELETE
+on tb3 for each row set @test_var=@test_var+50;
+Create trigger trg_3_406010_1 AFTER INSERT
+on tb3 for each row set @test_var=@test_var+1;
+ERROR HY000: Trigger 'test.trg_3_406010_1' already exists
+select @test_var;
+@test_var
+1
+Insert into tb3 (f121,f122) values ('Test 3.5.7.15/16','Insert 3.5.7.15/16');
+Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
+f121 f122
+Test 3.5.7.15/16 Insert 3.5.7.15/16
+select @test_var;
+@test_var
+1
+delete from tb3 where f121='Test 3.5.7.15/16';
+Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
+f121 f122
+select @test_var;
+@test_var
+56
+delete from tb3 where f121='Test 3.5.7.15/16';
+select @test_var;
+@test_var
+56
+drop trigger trg_3_406010_1;
+drop trigger trg_3_406010_2;
+delete from tb3 where f121='Test 3.5.7.15/16';
+
+Testcase 3.5.7.17 (see Testcase 3.5.1.1)
+----------------------------------------
+connection default;
+drop user test_general@localhost;
+drop user test_general;
+drop user test_super@localhost;
+DROP TABLE test.tb3;
+set GLOBAL sql_mode=default;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result
new file mode 100644
index 00000000..c37266bb
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result
@@ -0,0 +1,542 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+set GLOBAL sql_mode="";
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+
+Testcase: 3.5:
+--------------
+create User test_general@localhost;
+set password for test_general@localhost = password('PWD');
+revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
+grant SELECT,UPDATE,DELETE,INSERT on test.* to test_general@localhost;
+create User test_super@localhost;
+set password for test_super@localhost = password('PWD');
+grant ALL on *.* to test_super@localhost with grant OPTION;
+connect con2_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connect con2_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection default;
+
+Testcase 3.5.8.1: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.8.2: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.8.3/4:
+-------------------
+connection con2_super;
+create database db_test;
+grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
+grant LOCK TABLES on db_test.* to test_general;
+Use db_test;
+create table t1_i (
+i120 char ascii not null DEFAULT b'101',
+i136 smallint zerofill not null DEFAULT 999,
+i144 int zerofill not null DEFAULT 99999,
+i163 decimal (63,30)) engine=<engine_to_be_used>;
+create table t1_u (
+u120 char ascii not null DEFAULT b'101',
+u136 smallint zerofill not null DEFAULT 999,
+u144 int zerofill not null DEFAULT 99999,
+u163 decimal (63,30)) engine=<engine_to_be_used>;
+create table t1_d (
+d120 char ascii not null DEFAULT b'101',
+d136 smallint zerofill not null DEFAULT 999,
+d144 int zerofill not null DEFAULT 99999,
+d163 decimal (63,30)) engine=<engine_to_be_used>;
+Insert into t1_u values ('a',111,99999,999.99);
+Insert into t1_u values ('b',222,99999,999.99);
+Insert into t1_u values ('c',333,99999,999.99);
+Insert into t1_u values ('d',222,99999,999.99);
+Insert into t1_u values ('e',222,99999,999.99);
+Insert into t1_u values ('f',333,99999,999.99);
+Insert into t1_d values ('a',111,99999,999.99);
+Insert into t1_d values ('b',222,99999,999.99);
+Insert into t1_d values ('c',333,99999,999.99);
+Insert into t1_d values ('d',444,99999,999.99);
+Insert into t1_d values ('e',222,99999,999.99);
+Insert into t1_d values ('f',222,99999,999.99);
+
+3.5.8.4 - multiple SQL
+----------------------
+use test;
+Create trigger trg1 AFTER INSERT on tb3 for each row
+BEGIN
+insert into db_test.t1_i
+values (new.f120, new.f136, new.f144, new.f163);
+update db_test.t1_u
+set u144=new.f144, u163=new.f163
+where u136=new.f136;
+delete from db_test.t1_d where d136= new.f136;
+select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
+where u136= new.f136;
+END//
+connection con2_general;
+Use test;
+set @test_var=0;
+Insert into tb3 (f120, f122, f136, f144, f163)
+values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
+Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
+f120 f122 f136 f144 f163
+1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_i;
+i120 i136 i144 i163
+1 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_u;
+u120 u136 u144 u163
+a 00111 0000099999 999.990000000000000000000000000000
+b 00222 0000023456 1.050000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+d 00222 0000023456 1.050000000000000000000000000000
+e 00222 0000023456 1.050000000000000000000000000000
+f 00333 0000099999 999.990000000000000000000000000000
+select * from db_test.t1_d;
+d120 d136 d144 d163
+a 00111 0000099999 999.990000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+d 00444 0000099999 999.990000000000000000000000000000
+select @test_var;
+@test_var
+3.150000000000000000000000000000
+
+3.5.8.4 - single SQL - insert
+-----------------------------
+connection con2_super;
+Create trigger trg2 BEFORE UPDATE on tb3 for each row
+BEGIN
+insert into db_test.t1_i
+values (new.f120, new.f136, new.f144, new.f163);
+END//
+connection con2_general;
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_i order by i120;
+i120 i136 i144 i163
+1 00222 0000023456 1.050000000000000000000000000000
+update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert'
+ where f122='Test 3.5.8.4';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_i order by i120;
+i120 i136 i144 i163
+1 00222 0000023456 1.050000000000000000000000000000
+I 00222 0000023456 1.050000000000000000000000000000
+
+3.5.8.4 - single SQL - update
+-----------------------------
+connection con2_super;
+drop trigger trg2;
+Create trigger trg3 BEFORE UPDATE on tb3 for each row
+update db_test.t1_u
+set u120=new.f120
+where u136=new.f136;
+connection con2_general;
+update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
+ where f122='Test 3.5.8.4-Single Insert';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_u order by u120;
+u120 u136 u144 u163
+a 00111 0000099999 999.990000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+f 00333 0000099999 999.990000000000000000000000000000
+U 00222 0000023456 1.050000000000000000000000000000
+U 00222 0000023456 1.050000000000000000000000000000
+U 00222 0000023456 1.050000000000000000000000000000
+
+3.5.8.3/4 - single SQL - delete
+-------------------------------
+connection con2_super;
+drop trigger trg3;
+Create trigger trg4 AFTER UPDATE on tb3 for each row
+delete from db_test.t1_d where d136= new.f136;
+connection con2_general;
+update tb3 set f120='D', f136=444,
+f122='Test 3.5.8.4-Single Delete'
+ where f122='Test 3.5.8.4-Single Update';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000
+select * from db_test.t1_d order by d120;
+d120 d136 d144 d163
+a 00111 0000099999 999.990000000000000000000000000000
+c 00333 0000099999 999.990000000000000000000000000000
+
+3.5.8.3/4 - single SQL - select
+-------------------------------
+connection con2_super;
+drop trigger trg4;
+Create trigger trg5 AFTER UPDATE on tb3 for each row
+select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
+where u136= new.f136;
+connection con2_general;
+set @test_var=0;
+update tb3 set f120='S', f136=111,
+f122='Test 3.5.8.4-Single Select'
+ where f122='Test 3.5.8.4-Single Delete';
+Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+f120 f122 f136 f144 f163
+S Test 3.5.8.4-Single Select 00111 0000023456 1.050000000000000000000000000000
+select @test_var;
+@test_var
+999.990000000000000000000000000000
+connection default;
+drop trigger trg1;
+drop trigger trg5;
+drop database if exists db_test;
+delete from tb3 where f122 like 'Test 3.5.8.4%';
+revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+Testcase 3.5.8.5 (IF):
+----------------------
+create trigger trg2 before insert on tb3 for each row
+BEGIN
+IF new.f120='1' then
+set @test_var='one', new.f120='2';
+ELSEIF new.f120='2' then
+set @test_var='two', new.f120='3';
+ELSEIF new.f120='3' then
+set @test_var='three', new.f120='4';
+END IF;
+IF (new.f120='4') and (new.f136=10) then
+set @test_var2='2nd if', new.f120='d';
+ELSE
+set @test_var2='2nd else', new.f120='D';
+END IF;
+END//
+set @test_var='Empty', @test_var2=0;
+Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+D Test 3.5.8.5-if 00101 one 2nd else
+Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+D Test 3.5.8.5-if 00101 two 2nd else
+D Test 3.5.8.5-if 00102 two 2nd else
+Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+d Test 3.5.8.5-if 00010 three 2nd if
+D Test 3.5.8.5-if 00101 three 2nd if
+D Test 3.5.8.5-if 00102 three 2nd if
+Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
+select f120, f122, f136, @test_var, @test_var2
+from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+f120 f122 f136 @test_var @test_var2
+d Test 3.5.8.5-if 00010 three 2nd else
+D Test 3.5.8.5-if 00101 three 2nd else
+D Test 3.5.8.5-if 00102 three 2nd else
+D Test 3.5.8.5-if 00103 three 2nd else
+create trigger trg3 before update on tb3 for each row
+BEGIN
+ELSEIF new.f120='2' then
+END IF;
+END//
+ERROR 42000: 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 'ELSEIF new.f120='2' then
+END IF;
+END' at line 3
+drop trigger trg3//
+create trigger trg4 before update on tb3 for each row
+BEGIN
+IF (new.f120='4') and (new.f136=10) then
+set @test_var2='2nd if', new.f120='d';
+ELSE
+set @test_var2='2nd else', new.f120='D';
+END//
+ERROR 42000: 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 7
+drop trigger trg4;
+drop trigger trg2;
+delete from tb3 where f121='Test 3.5.8.5-if';
+
+Testcase 3.5.8.5-case:
+----------------------
+create trigger trg3 before insert on tb3 for each row
+BEGIN
+SET new.f120=char(ascii(new.f120)-32);
+CASE
+when new.f136<100 then set new.f136=new.f136+120;
+when new.f136<10 then set new.f144=777;
+when new.f136>100 then set new.f120=new.f136-1;
+END case;
+CASE
+when new.f136=200 then set @test_var=CONCAT(new.f120, '=');
+ELSE set @test_var=concat(new.f120, '*');
+END case;
+CASE new.f144
+when 1 then set @test_var=concat(@test_var, 'one');
+when 2 then set @test_var=concat(@test_var, 'two');
+when 3 then set @test_var=concat(@test_var, 'three');
+when 4 then set @test_var=concat(@test_var, 'four');
+when 5 then set @test_var=concat(@test_var, 'five');
+when 6 then set @test_var=concat(@test_var, 'six');
+when 7 then set @test_var=concat(@test_var, 'seven');
+when 8 then set @test_var=concat(@test_var, 'eight');
+when 9 then set @test_var=concat(@test_var, 'nine');
+when 10 then set @test_var=concat(@test_var, 'ten');
+when 11 then set @test_var=concat(@test_var, 'eleven');
+when 12 then set @test_var=concat(@test_var, 'twelve');
+when 13 then set @test_var=concat(@test_var, 'thirteen');
+when 14 then set @test_var=concat(@test_var, 'fourteen');
+when 15 then set @test_var=concat(@test_var, 'fifteen');
+ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
+END case;
+END//
+set @test_var='Empty';
+Insert into tb3 (f120, f122, f136, f144)
+values ('a', 'Test 3.5.8.5-case', 5, 7);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+A Test 3.5.8.5-case 00125 0000000007 A*seven
+Insert into tb3 (f120, f122, f136, f144)
+values ('b', 'Test 3.5.8.5-case', 71,16);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+A Test 3.5.8.5-case 00125 0000000007 B*0000000016
+B Test 3.5.8.5-case 00191 0000000016 B*0000000016
+Insert into tb3 (f120, f122, f136, f144)
+values ('c', 'Test 3.5.8.5-case', 80,1);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+A Test 3.5.8.5-case 00125 0000000007 C=one
+B Test 3.5.8.5-case 00191 0000000016 C=one
+C Test 3.5.8.5-case 00200 0000000001 C=one
+Insert into tb3 (f120, f122, f136)
+values ('d', 'Test 3.5.8.5-case', 152);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
+A Test 3.5.8.5-case 00125 0000000007 1*0000099999
+B Test 3.5.8.5-case 00191 0000000016 1*0000099999
+C Test 3.5.8.5-case 00200 0000000001 1*0000099999
+Insert into tb3 (f120, f122, f136, f144)
+values ('e', 'Test 3.5.8.5-case', 200, 8);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+1 Test 3.5.8.5-case 00152 0000099999 1=eight
+1 Test 3.5.8.5-case 00200 0000000008 1=eight
+A Test 3.5.8.5-case 00125 0000000007 1=eight
+B Test 3.5.8.5-case 00191 0000000016 1=eight
+C Test 3.5.8.5-case 00200 0000000001 1=eight
+Insert into tb3 (f120, f122, f136, f144)
+values ('f', 'Test 3.5.8.5-case', 100, 8);
+select f120, f122, f136, f144, @test_var
+from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+f120 f122 f136 f144 @test_var
+1 Test 3.5.8.5-case 00152 0000099999 1=eight
+1 Test 3.5.8.5-case 00200 0000000008 1=eight
+A Test 3.5.8.5-case 00125 0000000007 1=eight
+B Test 3.5.8.5-case 00191 0000000016 1=eight
+C Test 3.5.8.5-case 00200 0000000001 1=eight
+create trigger trg3a before update on tb3 for each row
+BEGIN
+CASE
+when new.f136<100 then set new.f120='p';
+END//
+ERROR 42000: 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 5
+drop trigger trg3a;
+drop trigger trg3;
+delete from tb3 where f121='Test 3.5.8.5-case';
+
+Testcase 3.5.8.5-loop/leave:
+----------------------------
+Create trigger trg4 after insert on tb3 for each row
+BEGIN
+set @counter=0, @flag='Initial';
+Label1: loop
+if new.f136<new.f144 then
+set @counter='Nothing to loop';
+leave Label1;
+else
+set @counter=@counter+1;
+if new.f136=new.f144+@counter then
+set @counter=concat(@counter, ' loops');
+leave Label1;
+end if;
+end if;
+iterate label1;
+set @flag='Final';
+END loop Label1;
+END//
+Insert into tb3 (f122, f136, f144)
+values ('Test 3.5.8.5-loop', 2, 8);
+select @counter, @flag;
+@counter @flag
+Nothing to loop Initial
+Insert into tb3 (f122, f136, f144)
+values ('Test 3.5.8.5-loop', 11, 8);
+select @counter, @flag;
+@counter @flag
+3 loops Initial
+Create trigger trg4_2 after update on tb3 for each row
+BEGIN
+Label1: loop
+set @counter=@counter+1;
+END;
+END//
+ERROR 42000: 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 ';
+END' at line 5
+drop trigger trg4_2;
+drop trigger trg4;
+delete from tb3 where f122='Test 3.5.8.5-loop';
+
+Testcase 3.5.8.5-repeat:
+------------------------
+Create trigger trg6 after insert on tb3 for each row
+BEGIN
+rp_label: REPEAT
+SET @counter1 = @counter1 + 1;
+IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
+END IF;
+SET @counter2 = @counter2 + 1;
+UNTIL @counter1> new.f136 END REPEAT rp_label;
+END//
+set @counter1= 0, @counter2= 0;
+Insert into tb3 (f122, f136)
+values ('Test 3.5.8.5-repeat', 13);
+select @counter1, @counter2;
+@counter1 @counter2
+15 8
+Create trigger trg6_2 after update on tb3 for each row
+BEGIN
+REPEAT
+SET @counter2 = @counter2 + 1;
+END//
+ERROR 42000: 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 'END' at line 5
+drop trigger trg6;
+delete from tb3 where f122='Test 3.5.8.5-repeat';
+
+Testcase 3.5.8.5-while:
+-----------------------
+Create trigger trg7 after insert on tb3 for each row
+wl_label: WHILE @counter1 < new.f136 DO
+SET @counter1 = @counter1 + 1;
+IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
+END IF;
+SET @counter2 = @counter2 + 1;
+END WHILE wl_label//
+set @counter1= 0, @counter2= 0;
+Insert into tb3 (f122, f136)
+values ('Test 3.5.8.5-while', 7);
+select @counter1, @counter2;
+@counter1 @counter2
+7 4
+Create trigger trg7_2 after update on tb3 for each row
+BEGIN
+WHILE @counter1 < new.f136
+SET @counter1 = @counter1 + 1;
+END//
+ERROR 42000: 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 'SET @counter1 = @counter1 + 1;
+END' at line 4
+delete from tb3 where f122='Test 3.5.8.5-while';
+drop trigger trg7;
+
+Testcase 3.5.8.6: (requirement void)
+------------------------------------
+CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END//
+CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW
+BEGIN
+CALL sp_01 ();
+END//
+Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101);
+update tb3 set f120='S', f136=111,
+f122='Test 3.5.8.6-tr8_1'
+ where f122='Test 3.5.8.6-insert';
+select f120, f122
+from tb3 where f122 like 'Test 3.5.8.6%' order by f120;
+f120 f122
+S Test 3.5.8.6-tr8_1
+DROP TRIGGER trg8_1;
+DROP PROCEDURE sp_01;
+
+Testcase 3.5.8.7
+----------------
+Create trigger trg9_1 before update on tb3 for each row
+BEGIN
+Start transaction;
+Set new.f120='U';
+Commit;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+Create trigger trg9_2 before delete on tb3 for each row
+BEGIN
+Start transaction;
+Set @var2=old.f120;
+Rollback;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+connection default;
+drop user test_general@localhost;
+drop user test_general;
+drop user test_super@localhost;
+DROP TABLE test.tb3;
+set GLOBAL sql_mode=default;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_09.result b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
new file mode 100644
index 00000000..b3e5e109
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
@@ -0,0 +1,268 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
+
+Testcase 3.5.9.1/2:
+-------------------
+Create trigger trg1 BEFORE UPDATE on tb3 for each row
+set new.f142 = 94087, @counter=@counter+1;
+TotalRows
+10
+Affected
+9
+NotAffected
+1
+NewValuew
+0
+set @counter=0;
+Update tb3 Set f142='1' where f130<100;
+select count(*) as ExpectedChanged, @counter as TrigCounter
+from tb3 where f142=94087;
+ExpectedChanged TrigCounter
+9 9
+select count(*) as ExpectedNotChange from tb3
+where f130<100 and f142<>94087;
+ExpectedNotChange
+0
+select count(*) as NonExpectedChanged from tb3
+where f130>=130 and f142=94087;
+NonExpectedChanged
+0
+drop trigger trg1;
+
+Testcase 3.5.9.3:
+-----------------
+Create trigger trg2_a before update on tb3 for each row
+set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
+@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
+@tr_var_b4_163=old.f163;
+Create trigger trg2_b after update on tb3 for each row
+set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
+@tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
+@tr_var_af_163=old.f163;
+Create trigger trg2_c before delete on tb3 for each row
+set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
+@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
+@tr_var_b4_163=old.f163;
+Create trigger trg2_d after delete on tb3 for each row
+set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
+@tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
+@tr_var_af_163=old.f163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+0 0 0 0 0
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+0 0 0 0 0
+Insert into tb3 (f122, f136, f163)
+values ('Test 3.5.9.3', 7, 123.17);
+Update tb3 Set f136=8 where f122='Test 3.5.9.3';
+select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
+f118 f121 f122 f136 f163
+a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+0 0 0 0 0
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+0 0 0 0 0
+delete from tb3 where f122='Test 3.5.9.3';
+select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
+f118 f121 f122 f136 f163
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
+a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
+a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
+drop trigger trg2_a;
+drop trigger trg2_b;
+drop trigger trg2_c;
+drop trigger trg2_d;
+
+Testcase 3.5.9.4:
+-----------------
+Create trigger trg3_a before insert on tb3 for each row
+set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
+@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
+@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
+Create trigger trg3_b after insert on tb3 for each row
+set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
+@tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
+@tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
+Create trigger trg3_c before update on tb3 for each row
+set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
+@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
+@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
+Create trigger trg3_d after update on tb3 for each row
+set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
+@tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
+@tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+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
+Insert into tb3 (f122, f136, f151, f163)
+values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
+select f118, f121, f122, f136, f151, f163 from tb3
+where f122 like 'Test 3.5.9.4%' order by f163;
+f118 f121 f122 f136 f151 f163
+a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
+a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+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 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
+select f118, f121, f122, f136, f151, f163 from tb3
+where f122 like 'Test 3.5.9.4-trig' order by f163;
+f118 f121 f122 f136 f151 f163
+a NULL Test 3.5.9.4-trig 00000 999 NULL
+select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
+a NULL Test 3.5.9.4-trig NULL 999 NULL
+select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
+a NULL Test 3.5.9.4-trig 0 999 NULL
+drop trigger trg3_a;
+drop trigger trg3_b;
+drop trigger trg3_c;
+drop trigger trg3_d;
+delete from tb3 where f122='Test 3.5.9.4-trig';
+
+Testcase 3.5.9.5: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.9.6:
+-----------------
+create trigger trg4a before insert on tb3 for each row
+set @temp1= old.f120;
+ERROR HY000: There is no OLD row in on INSERT trigger
+create trigger trg4b after insert on tb3 for each row
+set old.f120= 'test';
+ERROR HY000: Updating of OLD row is not allowed in trigger
+drop trigger trg4a;
+drop trigger trg4b;
+
+Testcase 3.5.9.7: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.9.8: (implied in previous tests)
+---------------------------------------------
+
+Testcase 3.5.9.9:
+-----------------
+create trigger trg5a before DELETE on tb3 for each row
+set @temp1=new.f122;
+ERROR HY000: There is no NEW row in on DELETE trigger
+create trigger trg5b after DELETE on tb3 for each row
+set new.f122='test';
+ERROR HY000: There is no NEW row in on DELETE trigger
+drop trigger trg5a;
+drop trigger trg5b;
+
+Testcase 3.5.9.10: (implied in previous tests)
+----------------------------------------------
+
+Testcase 3.5.9.11: covered by 3.5.9.9
+-------------------------------------
+
+Testcase 3.5.9.12: covered by 3.5.9.6
+-------------------------------------
+
+Testcase 3.5.9.13:
+------------------
+create trigger trg6a before UPDATE on tb3 for each row
+set old.f118='C', new.f118='U';
+ERROR HY000: Updating of OLD row is not allowed in trigger
+create trigger trg6b after INSERT on tb3 for each row
+set old.f136=163, new.f118='U';
+ERROR HY000: Updating of OLD row is not allowed in trigger
+create trigger trg6c after UPDATE on tb3 for each row
+set old.f136=NULL;
+ERROR HY000: Updating of OLD row is not allowed in trigger
+drop trigger trg6a;
+drop trigger trg6b;
+drop trigger trg6c;
+
+Testcase 3.5.9.14: (implied in previous tests)
+----------------------------------------------
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result
new file mode 100644
index 00000000..cacef967
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result
@@ -0,0 +1,405 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb3;
+create table tb3 (
+f118 char not null DEFAULT 'a',
+f119 char binary not null DEFAULT b'101',
+f120 char ascii not null DEFAULT b'101',
+f121 char(50),
+f122 char(50),
+f129 binary not null DEFAULT b'101',
+f130 tinyint not null DEFAULT 99,
+f131 tinyint unsigned not null DEFAULT 99,
+f132 tinyint zerofill not null DEFAULT 99,
+f133 tinyint unsigned zerofill not null DEFAULT 99,
+f134 smallint not null DEFAULT 999,
+f135 smallint unsigned not null DEFAULT 999,
+f136 smallint zerofill not null DEFAULT 999,
+f137 smallint unsigned zerofill not null DEFAULT 999,
+f138 mediumint not null DEFAULT 9999,
+f139 mediumint unsigned not null DEFAULT 9999,
+f140 mediumint zerofill not null DEFAULT 9999,
+f141 mediumint unsigned zerofill not null DEFAULT 9999,
+f142 int not null DEFAULT 99999,
+f143 int unsigned not null DEFAULT 99999,
+f144 int zerofill not null DEFAULT 99999,
+f145 int unsigned zerofill not null DEFAULT 99999,
+f146 bigint not null DEFAULT 999999,
+f147 bigint unsigned not null DEFAULT 999999,
+f148 bigint zerofill not null DEFAULT 999999,
+f149 bigint unsigned zerofill not null DEFAULT 999999,
+f150 decimal not null DEFAULT 999.999,
+f151 decimal unsigned not null DEFAULT 999.17,
+f152 decimal zerofill not null DEFAULT 999.999,
+f153 decimal unsigned zerofill,
+f154 decimal (0),
+f155 decimal (64),
+f156 decimal (0) unsigned,
+f157 decimal (64) unsigned,
+f158 decimal (0) zerofill,
+f159 decimal (64) zerofill,
+f160 decimal (0) unsigned zerofill,
+f161 decimal (64) unsigned zerofill,
+f162 decimal (0,0),
+f163 decimal (63,30),
+f164 decimal (0,0) unsigned,
+f165 decimal (63,30) unsigned,
+f166 decimal (0,0) zerofill,
+f167 decimal (63,30) zerofill,
+f168 decimal (0,0) unsigned zerofill,
+f169 decimal (63,30) unsigned zerofill,
+f170 numeric,
+f171 numeric unsigned,
+f172 numeric zerofill,
+f173 numeric unsigned zerofill,
+f174 numeric (0),
+f175 numeric (64)
+) engine = <engine_to_be_used>;
+Warnings:
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
+
+Testcase 3.5.10.1/2/3:
+----------------------
+Create view vw11 as select * from tb3
+where f122 like 'Test 3.5.10.1/2/3%';
+Create trigger trg1a before insert on tb3
+for each row set new.f163=111.11;
+Create trigger trg1b after insert on tb3
+for each row set @test_var='After Insert';
+Create trigger trg1c before update on tb3
+for each row set new.f121='Y', new.f122='Test 3.5.10.1/2/3-Update';
+Create trigger trg1d after update on tb3
+for each row set @test_var='After Update';
+Create trigger trg1e before delete on tb3
+for each row set @test_var=5;
+Create trigger trg1f after delete on tb3
+for each row set @test_var= 2* @test_var+7;
+Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1);
+Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2);
+Insert into vw11 (f122, f151) values ('Not in View', 3);
+select f121, f122, f151, f163
+from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+f121 f122 f151 f163
+NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
+NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
+select f121, f122, f151, f163 from vw11;
+f121 f122 f151 f163
+NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
+NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
+select f121, f122, f151, f163
+from tb3 where f122 like 'Not in View';
+f121 f122 f151 f163
+NULL Not in View 3 111.110000000000000000000000000000
+Update vw11 set f163=1;
+select f121, f122, f151, f163 from tb3
+where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+select f121, f122, f151, f163 from vw11;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+set @test_var=0;
+Select @test_var as 'before delete';
+before delete
+0
+delete from vw11 where f151=1;
+select f121, f122, f151, f163 from tb3
+where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+select f121, f122, f151, f163 from vw11;
+f121 f122 f151 f163
+Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
+Select @test_var as 'after delete';
+after delete
+17
+drop view vw11;
+drop trigger trg1a;
+drop trigger trg1b;
+drop trigger trg1c;
+drop trigger trg1d;
+drop trigger trg1e;
+drop trigger trg1f;
+delete from tb3 where f122 like 'Test 3.5.10.1/2/3%';
+
+Testcase 3.5.10.4:
+------------------
+create table tb_load (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
+Create trigger trg4 before insert on tb_load
+for each row set new.f3=-(new.f1 div 5), @counter= @counter+1;
+set @counter= 0;
+select @counter as 'Rows Loaded Before';
+Rows Loaded Before
+0
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table tb_load;
+select @counter as 'Rows Loaded After';
+Rows Loaded After
+10
+Select * from tb_load order by f1 limit 10;
+f1 f2 f3
+-5000 a` 1000
+-4999 aaa 999
+-4998 abaa 999
+-4997 acaaa 999
+-4996 adaaaa 999
+-4995 aeaaaaa 999
+-4994 afaaaaaa 998
+-4993 agaaaaaaa 998
+-4992 a^aaaaaaaa 998
+-4991 a_aaaaaaaaa 998
+drop trigger trg4;
+drop table tb_load;
+
+Testcase 3.5.10.5: (implemented in trig_frkey.test)
+---------------------------------------------------
+
+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;
+create procedure trig_sp()
+begin
+declare done int default 0;
+declare var151 decimal;
+declare var136 tinyint;
+declare cur1 cursor for select f136, f151 from tb3;
+declare continue handler for sqlstate '01000' set done = 1;
+open cur1;
+fetch cur1 into var136, var151;
+wl_loop: WHILE NOT done DO
+insert into t1_sp values (var136, var151);
+fetch cur1 into var136, var151;
+END WHILE wl_loop;
+close cur1;
+end//
+set @counter=0;
+select @counter;
+@counter
+0
+call trig_sp();
+ERROR 02000: No data - zero rows fetched, selected, or processed
+select @counter;
+@counter
+11
+select count(*) from tb3;
+count(*)
+11
+select count(*) from t1_sp;
+count(*)
+11
+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)
+-------------------------------------------------
+
+Testcase y.y.y.2: Check for triggers starting triggers
+------------------------------------------------------
+use test;
+drop table if exists t1;
+drop table if exists t2_1;
+drop table if exists t2_2;
+drop table if exists t2_3;
+drop table if exists t2_4;
+drop table if exists t3;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+create table t2_1 (f1 integer) engine = <engine_to_be_used>;
+create table t2_2 (f1 integer) engine = <engine_to_be_used>;
+create table t2_3 (f1 integer) engine = <engine_to_be_used>;
+create table t2_4 (f1 integer) engine = <engine_to_be_used>;
+create table t3 (f1 integer) engine = <engine_to_be_used>;
+insert into t1 values (1);
+create trigger tr1 after insert on t1 for each row
+BEGIN
+insert into t2_1 (f1) values (new.f1+1);
+insert into t2_2 (f1) values (new.f1+1);
+insert into t2_3 (f1) values (new.f1+1);
+insert into t2_4 (f1) values (new.f1+1);
+END//
+create trigger tr2_1 after insert on t2_1 for each row
+insert into t3 (f1) values (new.f1+10);
+create trigger tr2_2 after insert on t2_2 for each row
+insert into t3 (f1) values (new.f1+100);
+create trigger tr2_3 after insert on t2_3 for each row
+insert into t3 (f1) values (new.f1+1000);
+create trigger tr2_4 after insert on t2_4 for each row
+insert into t3 (f1) values (new.f1+10000);
+insert into t1 values (1);
+select * from t3 order by f1;
+f1
+12
+102
+1002
+10002
+drop trigger tr1;
+drop trigger tr2_1;
+drop trigger tr2_2;
+drop trigger tr2_3;
+drop trigger tr2_4;
+drop table t1, t2_1, t2_2, t2_3, t2_4, t3;
+
+Testcase y.y.y.3: Circular trigger reference
+--------------------------------------------
+use test;
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+drop table if exists t4;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+create table t2 (f2 integer) engine = <engine_to_be_used>;
+create table t3 (f3 integer) engine = <engine_to_be_used>;
+create table t4 (f4 integer) engine = <engine_to_be_used>;
+insert into t1 values (0);
+create trigger tr1 after insert on t1
+for each row insert into t2 (f2) values (new.f1+1);
+create trigger tr2 after insert on t2
+for each row insert into t3 (f3) values (new.f2+1);
+create trigger tr3 after insert on t3
+for each row insert into t4 (f4) values (new.f3+1);
+create trigger tr4 after insert on t4
+for each row insert into t1 (f1) values (new.f4+1);
+insert into t1 values (1);
+ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
+select * from t1 order by f1;
+f1
+0
+1
+select * from t2 order by f2;
+f2
+2
+select * from t3 order by f3;
+f3
+3
+select * from t4 order by f4;
+f4
+4
+drop trigger tr1;
+drop trigger tr2;
+drop trigger tr3;
+drop trigger tr4;
+drop table t1;
+drop table t2;
+drop table t3;
+drop table t4;
+
+Testcase y.y.y.4: Recursive trigger/SP references
+-------------------------------------------------
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
+create table t1_sp (
+count integer,
+var136 tinyint,
+var151 decimal) engine = <engine_to_be_used>;
+create procedure trig_sp()
+begin
+declare done int default 0;
+declare var151 decimal;
+declare var136 tinyint;
+declare cur1 cursor for select f136, f151 from tb3;
+declare continue handler for sqlstate '01000' set done = 1;
+set @counter= @counter+1;
+open cur1;
+fetch cur1 into var136, var151;
+wl_loop: WHILE NOT done DO
+insert into t1_sp values (@counter, var136, var151);
+fetch cur1 into var136, var151;
+END WHILE wl_loop;
+close cur1;
+end//
+create trigger trg before insert on t1_sp
+for each row call trig_sp();
+set @counter=0;
+select @counter;
+@counter
+0
+call trig_sp();
+ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine trig_sp
+select @counter;
+@counter
+1
+select count(*) from tb3;
+count(*)
+11
+select count(*) from t1_sp;
+count(*)
+0
+set @@max_sp_recursion_depth= 10;
+set @counter=0;
+select @counter;
+@counter
+0
+call trig_sp();
+ERROR HY000: Can't update table 't1_sp' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
+select @counter;
+@counter
+2
+select count(*) from tb3;
+count(*)
+11
+select count(*) from t1_sp;
+count(*)
+0
+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
+-------------------------------------------------------
+set @@sql_mode='traditional';
+use test;
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+drop table if exists t4;
+create table t1 (f1 integer) engine = <engine_to_be_used>;
+create table t2 (f2 integer) engine = <engine_to_be_used>;
+create table t3 (f3 integer) engine = <engine_to_be_used>;
+create table t4 (f4 tinyint) engine = <engine_to_be_used>;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+insert into t1 values (1);
+create trigger tr1 after insert on t1
+for each row insert into t2 (f2) values (new.f1+1);
+create trigger tr2 after insert on t2
+for each row insert into t3 (f3) values (new.f2+1);
+create trigger tr3 after insert on t3
+for each row insert into t4 (f4) values (new.f3+1000);
+set autocommit=0;
+start transaction;
+insert into t1 values (1);
+ERROR 22003: Out of range value for column 'f4' at row 1
+commit;
+select * from t1 order by f1;
+f1
+1
+1
+select * from t2 order by f2;
+f2
+2
+select * from t3 order by f3;
+f3
+3
+drop trigger tr1;
+drop trigger tr2;
+drop trigger tr3;
+drop table t1;
+drop table t2;
+drop table t3;
+drop table t4;
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/r/myisam_views-big.result b/mysql-test/suite/funcs_1/r/myisam_views-big.result
new file mode 100644
index 00000000..efd5ee1c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/myisam_views-big.result
@@ -0,0 +1,24623 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set",
+f110 VARBINARY(64) null,
+f111 VARBINARY(27) null ,
+f112 VARBINARY(64) null ,
+f113 VARBINARY(192) null ,
+f114 VARBINARY(192) ,
+f115 VARBINARY(27) null ,
+f116 VARBINARY(64) null,
+f117 VARBINARY(192) null
+) engine = myisam;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
+into table tb2;
+DROP DATABASE IF EXISTS test1;
+CREATE DATABASE test1;
+USE test1;
+drop table if exists tb2 ;
+create table tb2 (
+f59 numeric (0) unsigned,
+f60 numeric (64) unsigned,
+f61 numeric (0) zerofill,
+f62 numeric (64) zerofill,
+f63 numeric (0) unsigned zerofill,
+f64 numeric (64) unsigned zerofill,
+f65 numeric (0,0),
+f66 numeric (63,30),
+f67 numeric (0,0) unsigned,
+f68 numeric (63,30) unsigned,
+f69 numeric (0,0) zerofill,
+f70 numeric (63,30) zerofill,
+f71 numeric (0,0) unsigned zerofill,
+f72 numeric (63,30) unsigned zerofill,
+f73 real,
+f74 real unsigned,
+f75 real zerofill,
+f76 real unsigned zerofill,
+f77 double default 7.7,
+f78 double unsigned default 7.7,
+f79 double zerofill default 7.7,
+f80 double unsigned zerofill default 8.8,
+f81 float not null default 8.8,
+f82 float unsigned not null default 8.8,
+f83 float zerofill not null default 8.8,
+f84 float unsigned zerofill not null default 8.8,
+f85 float(0) not null default 8.8,
+f86 float(23) not null default 8.8,
+f87 float(0) unsigned not null default 8.8,
+f88 float(23) unsigned not null default 8.8,
+f89 float(0) zerofill not null default 8.8,
+f90 float(23) zerofill not null default 8.8,
+f91 float(0) unsigned zerofill not null default 8.8,
+f92 float(23) unsigned zerofill not null default 8.8,
+f93 float(24) not null default 8.8,
+f94 float(53) not null default 8.8,
+f95 float(24) unsigned not null default 8.8,
+f96 float(53) unsigned not null default 8.8,
+f97 float(24) zerofill not null default 8.8,
+f98 float(53) zerofill not null default 8.8,
+f99 float(24) unsigned zerofill not null default 8.8,
+f100 float(53) unsigned zerofill not null default 8.8,
+f101 date not null default '2000-01-01',
+f102 time not null default 20,
+f103 datetime not null default '2/2/2',
+f104 timestamp not null default 20001231235959,
+f105 year not null default 2000,
+f106 year(3) not null default 2000,
+f107 year(4) not null default 2000,
+f108 enum("1enum","2enum") not null default "1enum",
+f109 set("1set","2set") not null default "1set",
+f110 VARBINARY(64) null,
+f111 VARBINARY(27) null ,
+f112 VARBINARY(64) null ,
+f113 VARBINARY(192) null ,
+f114 VARBINARY(192) ,
+f115 VARBINARY(27) null ,
+f116 VARBINARY(64) null,
+f117 VARBINARY(192) null
+) engine = myisam;
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
+into table tb2;
+USE test;
+
+Attention: The nesting level @max_level in Testcase 3.3.1.A6
+(Complicated nested VIEWs) has to be limited to 20 because of
+MyISAM(only) performance issues Bug#11948
+--------------------------------------------------------------------------------
+SET @limit1 = 20;
+
+! Attention: The file with the expected results is not
+| thoroughly checked.
+! The server return codes are correct, but
+| most result sets where the table tb2 is
+! involved are not checked.
+--------------------------------------------------------------------------------
+
+There are some statements where the ps-protocol is switched off.
+Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
+--------------------------------------------------------------------------------
+insert into test.tb2 (f59,f60) values (76710,226546);
+insert into test.tb2 (f59,f60) values(2760,985654);
+insert into test.tb2 (f59,f60) values(569300,9114376);
+insert into test.tb2 (f59,f60) values(660,876546);
+insert into test.tb2 (f59,f60) values(250,87895654);
+insert into test.tb2 (f59,f60) values(340,9984376);
+insert into test.tb2 (f59,f60) values(3410,996546);
+insert into test.tb2 (f59,f60) values(2550,775654);
+insert into test.tb2 (f59,f60) values(3330,764376);
+insert into test.tb2 (f59,f60) values(441,16546);
+insert into test.tb2 (f59,f60) values(24,51654);
+insert into test.tb2 (f59,f60) values(323,14376);
+insert into test.tb2 (f59,f60) values(34,41);
+insert into test.tb2 (f59,f60) values(04,74);
+insert into test.tb2 (f59,f60) values(15,87);
+insert into test.tb2 (f59,f60) values(22,93);
+insert into test.tb2 (f59,f60) values(394,41);
+insert into test.tb2 (f59,f60) values(094,74);
+insert into test.tb2 (f59,f60) values(195,87);
+insert into test.tb2 (f59,f60) values(292,93);
+insert into test.tb2 (f59,f60) values(0987,41) ;
+insert into test.tb2 (f59,f60) values(7876,74) ;
+INSERT INTO tb2 (f59,f61) VALUES(321,765 );
+INSERT INTO tb2 (f59,f61) VALUES(9112,8771);
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+Insert into tb2 (f59,f60,f61) values (107,105,106) ;
+Insert into tb2 (f59,f60,f61) values (109,108,104) ;
+Insert into tb2 (f59,f60,f61) values (207,205,206) ;
+Insert into tb2 (f59,f60,f61) values (209,208,204) ;
+Insert into tb2 (f59,f60,f61) values (27,25,26) ;
+Insert into tb2 (f59,f60,f61) values (29,28,24) ;
+Insert into tb2 (f59,f60,f61) values (17,15,16) ;
+Insert into tb2 (f59,f60,f61) values (19,18,14) ;
+insert into tb2 (f59,f60,f61) values (107,105,106);
+insert into tb2 (f59,f60,f61) values (109,108,104);
+INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
+INSERT INTO tb2 (f59,f60) VALUES( 242,79 );
+INSERT INTO tb2 (f59,f60) VALUES( 424,89 );
+SELECT * FROM tb2 ORDER BY f59, f60, f61;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+Use test;
+
+Testcase 3.3.1.1
+--------------------------------------------------------------------------------
+Drop table if exists t1;
+Create table t1 (f59 INT, f60 INT) ;
+Insert into t1 values (100,4234);
+Insert into t1 values (990,6624);
+Insert into t1 values (710,765);
+Insert into t1 values (300,433334);
+Insert into t1 values (800,9788);
+Insert into t1 values (500,9866);
+Drop view if exists v1 ;
+CREATE VIEW v1 AS select f59,f60,f61
+FROM test.tb2 where f59=250;
+select * FROM v1 order by f60,f61 limit 0,10;
+f59 f60 f61
+250 87895654 NULL
+Drop view if exists v1 ;
+CREATE VIEW v1 AS select f59,f60,f61
+FROM test.tb2 limit 100;
+select * FROM v1 order by f59,f60,f61 limit 0,10;
+f59 f60 f61
+1 1 0000000001
+2 2 0000000002
+3 3 0000000003
+4 4 0000000004
+4 74 NULL
+5 5 0000000005
+6 6 0000000006
+7 7 0000000007
+8 8 0000000008
+9 9 0000000009
+CREATE or REPLACE VIEW v1 AS select f59,f60,f61
+FROM test.tb2;
+select * FROM v1 order by f59,f60,f61 limit 4,3;
+f59 f60 f61
+4 74 NULL
+5 5 0000000005
+6 6 0000000006
+CREATE or REPLACE VIEW v1 AS select distinct f59
+FROM test.tb2;
+select * FROM v1 order by f59 limit 4,3;
+f59
+5
+6
+7
+ALTER VIEW v1 AS select f59
+FROM test.tb2;
+select * FROM v1 order by f59 limit 6,2;
+f59
+6
+7
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 order by f59;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+4
+5
+6
+7
+8
+9
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 order by f59 asc;
+select * FROM v1 limit 0,10;
+f59
+1
+2
+3
+4
+4
+5
+6
+7
+8
+9
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 order by f59 desc;
+select * FROM v1 limit 0,10;
+f59
+569300
+76710
+9112
+7876
+3410
+3330
+2760
+2550
+987
+660
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 group by f59;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 group by f59 asc;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS select f59
+from tb2 group by f59 desc;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
+union (select f59 from t1);
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
+UNION DISTINCT(select f59 FROM t1) ;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
+UNION ALL(select f59 FROM t1) ;
+select * FROM v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+4
+5
+6
+7
+8
+9
+CREATE or REPLACE VIEW v1 AS select *
+FROM test.tb2 WITH LOCAL CHECK OPTION ;
+select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 4
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 4
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+CREATE or REPLACE VIEW v1 AS select *
+FROM test.tb2 WITH CASCADED CHECK OPTION ;
+select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 4
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 4
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 WITH CASCADED CHECK OPTION;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+F59 F60
+1 1
+2 2
+3 3
+4 4
+4 74
+5 5
+6 6
+7 7
+8 8
+9 9
+CREATE or REPLACE VIEW v1 AS select f59, f60
+from test.tb2 where f59=3330 ;
+select * FROM v1 order by f60 limit 0,10;
+f59 f60
+3330 764376
+DROP VIEW v1 ;
+DROP TABLE t1 ;
+
+Testcase 3.3.1.2
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS v2 ;
+CREATE TABLE t1 (f1 BIGINT) ;
+SET @x=0;
+CREATE or REPLACE VIEW v1 AS Select 1 INTO @x;
+ERROR 42000: 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 'INTO @x' at line 1
+Select @x;
+@x
+0
+CREATE or REPLACE VIEW v1 AS Select 1
+FROM (SELECT 1 FROM t1) my_table;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ;
+SET @a:=0 ;
+SELECT @a ;
+@a
+0
+INSERT INTO v1 VALUES (1) ;
+SELECT @a ;
+@a
+1
+SELECT * FROM t1;
+f1
+1
+DROP TRIGGER tr1 ;
+SET @a:=0 ;
+CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ;
+ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
+RENAME TABLE v1 TO v2;
+RENAME VIEW v2 TO v1;
+ERROR 42000: 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 'VIEW v2 TO v1' at line 1
+ALTER TABLE v2 RENAME AS v1;
+ERROR HY000: 'test.v2' is not of type 'BASE TABLE'
+ALTER VIEW v1 RENAME AS v2;
+ERROR 42000: 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 'RENAME AS v2' at line 1
+DROP TABLE IF EXISTS t1, t2 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS v2 ;
+CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE );
+CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
+ALTER TABLE t1 ADD PRIMARY KEY(f1);
+ALTER TABLE v1 ADD PRIMARY KEY(f1);
+ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
+ALTER VIEW v1 ADD PRIMARY KEY(f1);
+ERROR 42000: 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 'ADD PRIMARY KEY(f1)' at line 1
+CREATE INDEX t1_idx ON t1(f3);
+CREATE INDEX v1_idx ON v1(f3);
+ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
+DROP TABLE t1;
+DROP VIEW v1;
+
+Testcase 3.3.1.3 + 3.1.1.4
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
+ERROR 42000: 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 'or REPLACE AS Select * from tb2 my_table' at line 1
+CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
+from tb2 my_table limit 50;
+ERROR 42000: 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 'WITH CASCADED CHECK OPTION AS Select *
+from tb2 my_table limit 50' at line 1
+CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
+from tb2 my_table limit 50;
+ERROR 42000: 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 'WITH LOCAL CHECK OPTION AS Select *
+from tb2 my_table limit 50' at line 1
+SELECT * FROM tb2 my_table CREATE VIEW As v1;
+ERROR 42000: 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 'CREATE VIEW As v1' at line 1
+CREATE or REPLACE VIEW v1 Select f59, f60
+from test.tb2 my_table where f59 = 250 ;
+ERROR 42000: 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 'Select f59, f60
+from test.tb2 my_table where f59 = 250' at line 1
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+DROP VIEW v1;
+REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+ERROR 42000: 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 'OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHE...' at line 1
+CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+ERROR 42000: 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 'SELECT AS F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION' at line 1
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CASCADED WITH CHECK OPTION;
+ERROR 42000: 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 'CASCADED WITH CHECK OPTION' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED OPTION CHECK;
+ERROR 42000: 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 'OPTION CHECK' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CHECK OPTION WITH CASCADED;
+ERROR 42000: 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 'CHECK OPTION WITH CASCADED' at line 2
+CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table;
+ERROR 42000: 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 'WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1
+REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
+ERROR 42000: 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 'OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK ...' at line 1
+CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
+ERROR 42000: 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 'SELECT AS F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION' at line 1
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table LOCAL WITH CHECK OPTION;
+ERROR 42000: 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 'LOCAL WITH CHECK OPTION' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL OPTION CHECK;
+ERROR 42000: 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 'OPTION CHECK' at line 2
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CHECK OPTION WITH LOCAL;
+ERROR 42000: 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 'CHECK OPTION WITH LOCAL' at line 2
+CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table;
+ERROR 42000: 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 'WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION' at line 1
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1;
+ERROR 42000: 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 'AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1' at line 1
+Drop table if exists t1 ;
+CREATE table t1 (f1 int ,f2 int) ;
+INSERT INTO t1 values (235, 22);
+INSERT INTO t1 values (554, 11);
+CREATE or REPLACE view v1 as (Select from f59 tb2)
+Union ALL (Select from f1 t1);
+ERROR 42000: 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 'from f59 tb2)
+Union ALL (Select from f1 t1)' at line 1
+CREATE or REPLACE view v1 as Select f59, f60
+from tb2 by order f59;
+ERROR 42000: 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 'by order f59' at line 2
+CREATE or REPLACE view v1 as Select f59, f60
+from tb2 by group f59 ;
+ERROR 42000: 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 'by group f59' at line 2
+
+Testcase 3.3.1.5
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+CREATE VIEW v1 SELECT * FROM tb2;
+ERROR 42000: 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 'SELECT * FROM tb2' at line 1
+CREATE v1 AS SELECT * FROM tb2;
+ERROR 42000: 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 'v1 AS SELECT * FROM tb2' at line 1
+VIEW v1 AS SELECT * FROM tb2;
+ERROR 42000: 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 'VIEW v1 AS SELECT * FROM tb2' at line 1
+CREATE VIEW v1 AS SELECT 1;
+DROP VIEW v1;
+VIEW v1 AS SELECT 1;
+ERROR 42000: 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 'VIEW v1 AS SELECT 1' at line 1
+CREATE v1 AS SELECT 1;
+ERROR 42000: 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 'v1 AS SELECT 1' at line 1
+CREATE VIEW AS SELECT 1;
+ERROR 42000: 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 'AS SELECT 1' at line 1
+CREATE VIEW v1 SELECT 1;
+ERROR 42000: 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 'SELECT 1' at line 1
+CREATE VIEW v1 AS ;
+ERROR 42000: 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
+
+Testcase 3.3.1.6
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+CREATE or REPLACE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = MERGE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 '= TEMPTABLE VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'TEMPTABLE VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE ALGORITHM = VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'TEMPTABLE = ALGORITHM VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'TEMPTABLE - ALGORITHM VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'GARBAGE = TEMPTABLE VIEW v1
+as SELECT * from tb2' at line 1
+CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
+as SELECT * from tb2;
+ERROR 42000: 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 'GARBAGE VIEW v1
+as SELECT * from tb2' at line 1
+Drop view if exists v1 ;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH LOCAL CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH NO CHECK OPTION;
+ERROR 42000: 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 'NO CHECK OPTION' at line 2
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 CASCADED CHECK OPTION;
+ERROR 42000: 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 'CASCADED CHECK OPTION' at line 2
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED OPTION;
+ERROR 42000: 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 'OPTION' at line 2
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK ;
+ERROR 42000: 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 2
+
+Testcase 3.3.1.7
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1 ;
+Create view test.v1 AS Select * from test.tb2;
+Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
+Drop view test.v1 ;
+Create view v1 AS Select * from test.tb2 limit 100 ;
+Alter view v1 AS Select F59 from test.tb2 limit 100 ;
+Drop view v1 ;
+
+Testcase 3.3.1.A0
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS V1 ;
+CREATE TABLE t1 (f1 NUMERIC(4)) ENGINE = myisam;
+INSERT INTO t1 VALUES(1111), (2222);
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111;
+CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222;
+SELECT * FROM v1;
+f1
+1111
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS V1 ;
+
+Testcase 3.3.1.8
+--------------------------------------------------------------------------------
+Create view select AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'select AS Select * from test.tb2 limit 100' at line 1
+Create view as AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'as AS Select * from test.tb2 limit 100' at line 1
+Create view where AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'where AS Select * from test.tb2 limit 100' at line 1
+Create view from AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'from AS Select * from test.tb2 limit 100' at line 1
+Create view while AS Select * from test.tb2 limit 100;
+ERROR 42000: 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 'while AS Select * from test.tb2 limit 100' at line 1
+Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ;
+ERROR 42000: 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 '*(&*&&^ as Select * from test.tb2 limit 100' at line 1
+Drop view if exists test.procedure ;
+Create view test.procedure as Select * from test.tb2 limit 100 ;
+Drop view if exists test.procedure ;
+
+Testcase 3.3.1.9
+--------------------------------------------------------------------------------
+Drop TABLE IF EXISTS t1 ;
+Drop VIEW IF EXISTS v1;
+Drop VIEW IF EXISTS v2;
+Drop VIEW IF EXISTS v3;
+CREATE TABLE t1 ( f1 char(5));
+INSERT INTO t1 SET f1 = 'abcde';
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+CREATE VIEW v2 AS SELECT * FROM v1;
+DROP TABLE t1;
+SELECT * FROM v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DELETE FROM v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE v1 SET f1 = 'aaaaa';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v1 SET f1 = "fffff";
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DELETE FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE v2 SET f1 = 'aaaaa';
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v2 SET f1 = "fffff";
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DROP VIEW v1;
+SELECT * FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DELETE FROM v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE v2 SET f1 = 'aaaaa';
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v2 SET f1 = "fffff";
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DROP VIEW v2;
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 (f1 FLOAT);
+CREATE VIEW v1 AS SELECT * FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE or REPLACE VIEW v1 AS SELECT * FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+DROP VIEW v1;
+DROP TABLE t1;
+
+Testcase 3.3.1.10
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Create view test.v1 AS Select * from test.tb2 ;
+Create view test.v1 AS Select F59 from test.tb2 ;
+ERROR 42S01: Table 'v1' already exists
+Create view v1 AS Select F59 from test.tb2 ;
+ERROR 42S01: Table 'v1' already exists
+
+Testcase 3.3.1.11
+--------------------------------------------------------------------------------
+Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ;
+ERROR 42S01: Table 'tb2' already exists
+Create view tb2 AS Select f59,f60 from test.tb2 limit 100 ;
+ERROR 42S01: Table 'tb2' already exists
+Drop view if exists test.v111 ;
+Create view test.v111 as select * from tb2 limit 50;
+Create table test.v111(f1 int );
+ERROR 42S01: Table 'v111' already exists
+Create table v111(f1 int );
+ERROR 42S01: Table 'v111' already exists
+DROP VIEW test.v111;
+
+Testcase 3.3.1.12
+--------------------------------------------------------------------------------
+USE test;
+Drop database if exists test2 ;
+Create database test2 ;
+DROP TABLE IF EXISTS test.t0, test.t1, test.t2;
+DROP VIEW IF EXISTS test.v1;
+DROP VIEW IF EXISTS test.v2;
+CREATE TABLE test.t1 ( f1 VARCHAR(20));
+CREATE TABLE test2.t1 ( f1 VARCHAR(20));
+CREATE TABLE test.t2 ( f1 VARCHAR(20));
+CREATE TABLE test2.v1 ( f1 VARCHAR(20));
+CREATE TABLE test.t0 ( f1 VARCHAR(20));
+CREATE TABLE test2.t0 ( f1 VARCHAR(20));
+CREATE VIEW test2.t2 AS SELECT * FROM test2.t0;
+CREATE VIEW test.v1 AS SELECT * FROM test.t0;
+CREATE VIEW test.v2 AS SELECT * FROM test.t0;
+CREATE VIEW test2.v2 AS SELECT * FROM test2.t0;
+INSERT INTO test.t1 VALUES('test.t1 - 1');
+INSERT INTO test2.t1 VALUES('test2.t1 - 1');
+INSERT INTO test.t2 VALUES('test.t2 - 1');
+INSERT INTO test2.v1 VALUES('test2.v1 - 1');
+INSERT INTO test.t0 VALUES('test.t0 - 1');
+INSERT INTO test2.t0 VALUES('test2.t0 - 1');
+USE test;
+INSERT INTO t1 VALUES('test.t1 - 2');
+INSERT INTO t2 VALUES('test.t2 - 2');
+INSERT INTO t0 VALUES('test.t0 - 2');
+USE test2;
+INSERT INTO t1 VALUES('test2.t1 - 2');
+INSERT INTO v1 VALUES('test2.v1 - 2');
+INSERT INTO t0 VALUES('test2.t0 - 2');
+SELECT * FROM t1;
+f1
+test2.t1 - 1
+test2.t1 - 2
+SELECT * FROM t2;
+f1
+test2.t0 - 1
+test2.t0 - 2
+SELECT * FROM v1;
+f1
+test2.v1 - 1
+test2.v1 - 2
+SELECT * FROM v2;
+f1
+test2.t0 - 1
+test2.t0 - 2
+USE test;
+SELECT * FROM t1;
+f1
+test.t1 - 1
+test.t1 - 2
+SELECT * FROM t2;
+f1
+test.t2 - 1
+test.t2 - 2
+SELECT * FROM v1;
+f1
+test.t0 - 1
+test.t0 - 2
+SELECT * FROM v2;
+f1
+test.t0 - 1
+test.t0 - 2
+
+Testcase 3.3.1.13
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (f1 BIGINT);
+INSERT INTO t1 VALUES(1);
+CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
+SELECT * FROM test.v1;
+f1
+1
+CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1
+AS SELECT * FROM t1 limit 2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
+SELECT * FROM test.v1;
+f1
+1
+CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109`,`tb2`.`f110` AS `f110`,`tb2`.`f111` AS `f111`,`tb2`.`f112` AS `f112`,`tb2`.`f113` AS `f113`,`tb2`.`f114` AS `f114`,`tb2`.`f115` AS `f115`,`tb2`.`f116` AS `f116`,`tb2`.`f117` AS `f117` from `tb2` order by `tb2`.`f59` limit 2 latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2;
+SHOW CREATE VIEW test.v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by F59 limit 10,100;
+F59
+10
+15
+17
+19
+22
+24
+27
+29
+34
+94
+107
+107
+109
+109
+195
+207
+209
+242
+250
+292
+299
+321
+323
+340
+394
+424
+441
+500
+500
+500
+660
+987
+2550
+2760
+3330
+3410
+7876
+9112
+76710
+569300
+Drop table test.t1 ;
+Drop view test.v1 ;
+
+Testcase 3.3.1.14
+--------------------------------------------------------------------------------
+CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2;
+ERROR HY000: 'test.tb2' is not of type 'VIEW'
+CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2;
+ERROR HY000: 'test.tb2' is not of type 'VIEW'
+
+Testcase 3.3.1.15
+--------------------------------------------------------------------------------
+Drop table if exists test.v1 ;
+CREATE OR REPLACE view test.v1 as select * from tb2;
+SELECT * FROM test.v1;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+Drop view test.v1 ;
+
+Testcase 3.3.1.16 + 3.3.1.17
+--------------------------------------------------------------------------------
+Drop table if exists test.v1 ;
+CREATE OR REPLACE VIEW v1 AS SELECT * From tb2;
+SELECT * FROM tb2 WHERE 1 = 2;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+SELECT * FROM v1 WHERE 1 = 2;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+Drop view v1;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (f1 NUMERIC(15,3));
+INSERT INTO t1 VALUES(8.8);
+CREATE VIEW v1 AS SELECT * FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+f1
+8.800
+CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+f1
+8.800
+CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+my_column
+8.800
+CREATE OR REPLACE VIEW v1(column1,column2)
+AS SELECT f1 As my_column, f1 FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+column1 column2
+8.800 8.800
+CREATE OR REPLACE VIEW test.v1(column1,column2)
+AS SELECT f1 As my_column, f1 FROM test.t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
+SELECT * FROM v1;
+column1 column2
+8.800 8.800
+
+Testcase 3.3.1.18
+--------------------------------------------------------------------------------
+Drop view if exists v1 ;
+Drop view if exists v1_1 ;
+Create view v1
+as Select test.tb2.f59 as NewNameF1, test.tb2.f60
+from test.tb2 limit 0,100 ;
+Create view v1_1
+as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
+from tb2 limit 0,100 ;
+SELECT NewNameF1,f60 FROM test.v1_1 ;
+ERROR 42S22: Unknown column 'f60' in 'field list'
+SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
+ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
+SELECT f59, f60 FROM test.v1 ;
+ERROR 42S22: Unknown column 'f59' in 'field list'
+Use test ;
+SELECT F59 FROM v1 ;
+ERROR 42S22: Unknown column 'F59' in 'field list'
+
+Testcase 3.3.1.19
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1, t2;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
+INSERT INTO t1 VALUES(7, 7.7);
+CREATE TABLE t2( f1 BIGINT, f2 DECIMAL(5,2));
+INSERT INTO t2 VALUES(6, 6.6);
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1;
+f1 f2
+7 7.70
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1;
+SELECT * FROM v1;
+f1 f2
+7 7.70
+CREATE OR REPLACE VIEW v1 AS SELECT f1 AS my_f1, f2 AS my_f2 FROM t1;
+SELECT * FROM v1;
+my_f1 my_f2
+7 7.70
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
+SELECT * FROM v1;
+my_f1 my_f2
+7 7.70
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT t1.f1, t2.f2 FROM t1, t2;
+SELECT * FROM v1;
+my_f1 my_f2
+7 6.60
+SELECT f1, f2 AS f1 FROM t1;
+f1 f1
+7 7.70
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1;
+ERROR 42S21: Duplicate column name 'f1'
+SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
+f1 f1
+7 6
+CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
+ERROR 42S21: Duplicate column name 'f1'
+CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1;
+ERROR 42S21: Duplicate column name 'my_col'
+
+Testcase 3.3.1.20
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT * FROM t1;
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
+CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT * FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT f1, f2 FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT * FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1;
+ERROR HY000: View's SELECT and view's field list have different column counts
+
+Testcase 3.3.1.21
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1;
+CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2;
+SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2;
+F59 F60
+1 1
+2 2
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.22
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1;
+CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 WHERE f59 < 3;
+SELECT * FROM test.v1;
+product
+1
+4
+CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
+SELECT * FROM test.v1;
+product
+2
+CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
+SELECT * FROM test.v1;
+product
+root@localhost
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.23 + 3.3.1.24
+--------------------------------------------------------------------------------
+USE test;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+CREATE VIEW test.v2 AS SELECT * FROM test.t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+CREATE VIEW v2 AS Select * from test.v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+DROP VIEW IF EXISTS v2;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v2'
+
+Testcase 3.3.1.25
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1_temp;
+DROP TABLE IF EXISTS t2_temp;
+DROP VIEW IF EXISTS v1;
+Create table t1_temp(f59 char(10),f60 int) ;
+Create temporary table t1_temp(f59 char(10),f60 int) ;
+Insert into t1_temp values('FER',90);
+Insert into t1_temp values('CAR',27);
+Create view v1 as select * from t1_temp ;
+ERROR HY000: View's SELECT refers to a temporary table 't1_temp'
+Create temporary table t2_temp(f59 char(10),f60 int) ;
+Insert into t2_temp values('AAA',11);
+Insert into t2_temp values('BBB',22);
+Create or replace view v1
+as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ;
+ERROR HY000: View's SELECT refers to a temporary table 't1_temp'
+DROP temporary table t1_temp;
+DROP table t1_temp;
+DROP temporary table t2_temp;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (f1 char(10));
+CREATE TEMPORARY TABLE t2 (f2 char(10));
+INSERT INTO t1 VALUES('t1');
+INSERT INTO t1 VALUES('A');
+INSERT INTO t2 VALUES('t2');
+INSERT INTO t2 VALUES('B');
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2, t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1, t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2 UNION SELECT * FROM t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2;
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
+WHERE f2 = ( SELECT f1 FROM t1 );
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1
+WHERE f1 = ( SELECT f2 FROM t2 );
+ERROR HY000: View's SELECT refers to a temporary table 't2'
+DROP TABLE t1;
+DROP TEMPORARY TABLE t2;
+
+Testcase 3.3.1.26
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS v1;
+Create view test.v1 AS Select * from test.tb2;
+Select * from test.v1;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+Drop view test.v1 ;
+
+Testcase 3.3.1.27
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS test.v1;
+Drop VIEW IF EXISTS test.v1_1 ;
+Create view test.v1 AS Select * from test.tb2;
+Create view test.v1_1 AS Select F59 from test.v1 ;
+Select * from test.v1_1 order by F59 limit 2;
+F59
+1
+2
+Drop view test.v1 ;
+Drop view test.v1_1 ;
+
+Testcase 3.3.1.28
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+create database test2 ;
+Create view test2.v2 AS Select * from test.tb2 limit 50,50;
+use test2 ;
+Create view v1 AS Select * from test.tb2 limit 50 ;
+Select * from v1 order by f59,f60,f61,f62,f63,f64,f65;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 4
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 4
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+Select * from test2.v2 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+Drop view if exists test2.v1 ;
+Drop view if exists test2.v2 ;
+Drop database test2 ;
+
+Testcase 3.3.1.29
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+Drop view if exists test.v1 ;
+create database test2 ;
+use test2;
+Create view test.v1 AS Select * from test.tb2 limit 50 ;
+Create view test2.v2 AS Select F59 from test.v1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test2.v2 ;
+
+Testcase 3.3.1.31
+--------------------------------------------------------------------------------
+Drop table if exists test.t1 ;
+CREATE TABLE test.t1 ( f59 int, f60 int );
+INSERT INTO test.t1 VALUES( 34, 654 );
+INSERT INTO test.t1 VALUES( 906, 434 );
+INSERT INTO test.t1 VALUES( 445, 765 );
+Create or replace view test.v1
+AS SELECT test.t1.F59, test.tb2.F60
+FROM test.tb2 JOIN test.t1 ON test.tb2.F59 = test.t1.F59 ;
+Select * from test.v1;
+F59 F60
+34 41
+Drop view test.v1 ;
+
+Testcase 3.3.1.32
+--------------------------------------------------------------------------------
+Drop table if exists test.t1 ;
+Drop database if exists test2 ;
+Drop view if exists test.v1 ;
+create database test2 ;
+use test2 ;
+CREATE TABLE t1 ( f59 int, f60 int );
+INSERT INTO t1 VALUES( 34, 654 );
+INSERT INTO t1 VALUES( 906, 434 );
+INSERT INTO t1 VALUES( 445, 765 );
+CREATE VIEW test2.v1
+AS SELECT test.tb2.F59, test.tb2.F60
+FROM test.tb2 INNER JOIN test2.t1 ON tb2.f59 = t1.f59;
+Select * from test2.v1;
+F59 F60
+34 41
+Use test;
+
+Testcase 3.3.1.33
+--------------------------------------------------------------------------------
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1
+AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
+FROM test.v1_firstview INNER JOIN test.v1_secondview
+ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
+SELECT * FROM test.v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.34
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+create database test2 ;
+use test2 ;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2 ;
+CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2 ;
+CREATE VIEW v1
+AS SELECT test.v1_firstview.F59, test.v1_firstview.F60
+FROM test.v1_firstview INNER JOIN test.v1_secondview
+ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+F59 F60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop view v1 ;
+Drop view test.v1_firstview ;
+Drop view test.v1_secondview ;
+
+Testcase 3.3.1.35
+--------------------------------------------------------------------------------
+use test;
+Drop view if exists test.v1;
+Drop view if exists test.v1_firstview;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1
+AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
+FROM test.v1_firstview INNER JOIN test.tb2
+ON test.v1_firstview.f59 = test.tb2.f59;
+SELECT * FROM test.v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop view test.v1 ;
+Drop view test.v1_firstview;
+
+Testcase 3.3.1.36
+--------------------------------------------------------------------------------
+Drop database if exists test2 ;
+create database test2 ;
+use test2 ;
+CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ;
+CREATE VIEW v1
+AS SELECT v1_firstview.f59, v1_firstview.f60
+FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 4
+4 74
+4 74
+5 5
+6 6
+7 7
+Drop database test2 ;
+
+Testcase 3.3.1.37
+--------------------------------------------------------------------------------
+use test;
+Drop table if exists t1;
+Drop view if exists test.v1 ;
+Drop view if exists test.v1_1 ;
+Drop view if exists test.v1_1 ;
+Drop view if exists test.v1_main ;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 0,10;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 74
+5 5
+6 6
+7 7
+8 8
+9 9
+Create table t1(f59 int, f60 int);
+Insert into t1 values (90,507) ;
+Create view v1_1 as Select f59,f60 from t1 ;
+Select * from v1_1 ;
+f59 f60
+90 507
+Create view v1_main
+as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1
+ON test.tb2.f59 = test.v1.f59;
+Select * from v1_main order by f59 limit 0,10;
+f59
+1
+2
+3
+4
+4
+4
+4
+5
+6
+7
+Drop table t1;
+Drop view test.v1 ;
+Drop view test.v1_1 ;
+Drop view test.v1_main ;
+
+Testcase 3.3.1.31 - 3.3.1.37 New Implementation
+--------------------------------------------------------------------------------
+USE test;
+DROP DATABASE IF EXISTS test2;
+DROP TABLE IF EXISTS t0,t1;
+DROP VIEW IF EXISTS t3,t4;
+CREATE DATABASE test2;
+CREATE TABLE test1.t0 (f1 VARCHAR(20));
+CREATE TABLE test1.t1 (f1 VARCHAR(20));
+CREATE TABLE test2.t0 (f1 VARCHAR(20));
+CREATE TABLE test2.t1 (f1 VARCHAR(20));
+CREATE VIEW test1.t2 AS SELECT * FROM test1.t0;
+CREATE VIEW test1.t3 AS SELECT * FROM test2.t0;
+CREATE VIEW test2.t2 AS SELECT * FROM test2.t0;
+CREATE VIEW test2.t3 AS SELECT * FROM test1.t0;
+INSERT INTO test1.t0 VALUES('test1.t0');
+INSERT INTO test1.t1 VALUES('test1.t1');
+INSERT INTO test2.t0 VALUES('test2.t0');
+INSERT INTO test2.t1 VALUES('test2.t1');
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t3 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t3 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t2 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t2 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t0 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test2.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test1.t3 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test2.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test2.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test1.t2 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test1.t0
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test2.t1 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test2.t1 test1.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test2.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test2.t1
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.f1 AS col1,
+tb.f1 AS col2
+FROM test1.t1 ta, test1.t1 tb;
+SELECT * FROM test.v1;
+col1 col2
+test1.t1 test1.t1
+
+Testcase 3.3.1.38
+--------------------------------------------------------------------------------
+Drop table if exists test1.t1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test.v1_main;
+Drop view if exists test1.v1_1 ;
+Drop database if exists test3 ;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 20;
+f59 f60
+1 1
+2 2
+3 3
+4 4
+4 74
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+15 87
+17 15
+19 18
+22 93
+24 51654
+27 25
+29 28
+34 41
+94 74
+Create table test1.t1 (f59 int,f60 int) ;
+Insert into test1.t1 values (199,507) ;
+Create view test1.v1_1 as Select f59,f60 from test1.t1 ;
+Select * from test1.v1_1 ;
+f59 f60
+199 507
+Create database test3 ;
+Create table test3.t1(f59 int,f60 int) ;
+Insert into test3.t1 values (1023,7670) ;
+Create view test3.v1_2 as Select f59,f60 from test3.t1 ;
+Select * from test3.v1_2 ;
+f59 f60
+1023 7670
+use test ;
+Create view v1_main
+as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2,
+test3.v1_2.f59 as f3
+FROM (test.tb2,test1.v1_1,test.v1) JOIN test3.v1_2
+ON (test.v1.f59 = test1.v1_1.f59) ;
+Select * from v1_main ;
+f1 f2 f3
+DROP VIEW test.v1 ;
+DROP VIEW test1.v1_1 ;
+DROP VIEW test.v1_main ;
+DROP DATABASE test3;
+
+Testcase 3.3.1.39
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1
+AS Select f59 from (Select * FROM tb2 limit 20) tx ;
+DROP VIEW test.v1;
+SELECT * FROM test.v1 order by f59 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.40
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Set @var1 = 'ABC' ;
+Set @var2 = 'XYZ' ;
+CREATE VIEW test.v1 AS SELECT @var1, @var2 ;
+ERROR HY000: View's SELECT contains a variable or parameter
+CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size;
+ERROR HY000: View's SELECT contains a variable or parameter
+Drop view if exists test.v1 ;
+
+Testcase 3.3.1.41
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Drop procedure if exists sp1 ;
+Create procedure sp1() DETERMINISTIC
+Begin
+DECLARE x char;
+Set x = 200 ;
+Create view test.v1 as SELECT * FROM tb2 WHERE f59 = x ;
+End //
+ERROR HY000: View's SELECT contains a variable or parameter
+Call sp1() ;
+ERROR 42000: PROCEDURE test.sp1 does not exist
+Drop view if exists test.v1 ;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v1'
+Drop procedure sp1 ;
+ERROR 42000: PROCEDURE test.sp1 does not exist
+
+Testcase 3.3.1.42
+--------------------------------------------------------------------------------
+Drop VIEW if exists test.v1 ;
+CREATE TEMPORARY VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2 ;
+ERROR 42000: 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 'VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2' at line 1
+CREATE OR REPLACE TEMPORARY VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2 ;
+ERROR 42000: 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 'VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2' at line 1
+Drop view if exists test.v1 ;
+Use test;
+
+Testcase 3.3.1.43
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2;
+INSERT INTO test.v1 values(122,432);
+SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20;
+f59 122
+f60 432
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ;
+SELECT * FROM test.tb2 where f59 = 3000 limit 0,20;
+f59 3000
+f60 432
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+DELETE FROM test.v1
+where test.v1.f59 = 3000 and test.v1.f60 = 432;
+SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+drop view test.v1 ;
+
+Testcase 3.3.1.44
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100;
+INSERT INTO test.v1 values(31, 32, 33) ;
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+Drop view test.v1 ;
+
+Testcase 3.3.1.45
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04;
+UPDATE test.v1 SET f59 = 30 where F59 = 04 ;
+affected rows: 2
+info: Rows matched: 2 Changed: 2 Warnings: 0
+SELECT * FROM test.v1 where f59 = 30 order by f59;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+SELECT * FROM test.tb2 where f59 = 30 ;
+f59 30
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 30
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+UPDATE tb2 SET f59 = 100 where f59 = 30 ;
+affected rows: 2
+info: Rows matched: 2 Changed: 2 Warnings: 0
+SELECT * FROM tb2 where f59 = 100 ;
+f59 100
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 100
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+SELECT * FROM test.v1 order by f59 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+drop view if exists test.v1 ;
+Drop TABLE IF EXISTS test.t1 ;
+Drop VIEW IF EXISTS test.v1 ;
+CREATE TABLE t1 (f1 BIGINT, f2 VARCHAR(20), PRIMARY KEY(f1))
+ENGINE = myisam;
+INSERT INTO t1 VALUES(1,'one');
+INSERT INTO t1 VALUES(2,'two');
+INSERT INTO t1 VALUES(3,'three');
+INSERT INTO t1 VALUES(5,'five');
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 BETWEEN 2 AND 4;
+SELECT COUNT(*) FROM v1 WHERE f1 = 2;
+COUNT(*)
+1
+SELECT COUNT(*) FROM v1 WHERE f1 = 4;
+COUNT(*)
+0
+SELECT COUNT(*) FROM v1 WHERE f1 = 5;
+COUNT(*)
+0
+SELECT COUNT(*) FROM v1 WHERE f1 = 10;
+COUNT(*)
+0
+INSERT INTO t1 VALUES(4,'four');
+DELETE FROM v1 WHERE f1 = 3;
+affected rows: 1
+DELETE FROM v1 WHERE f1 = 5;
+affected rows: 0
+SELECT * FROM t1 ORDER BY f1;
+f1 f2
+1 one
+2 two
+4 four
+5 five
+SELECT * FROM v1 ORDER BY f1;
+f1 f2
+2 two
+4 four
+INSERT INTO v1 VALUES(2,'two');
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+INSERT INTO v1 VALUES(3,'three');
+affected rows: 1
+INSERT INTO v1 VALUES(6,'six');
+affected rows: 1
+SELECT * FROM t1 ORDER BY f1;
+f1 f2
+1 one
+2 two
+3 three
+4 four
+5 five
+6 six
+SELECT * FROM v1 ORDER BY f1;
+f1 f2
+2 two
+3 three
+4 four
+UPDATE v1 SET f1 = 2 WHERE f1 = 3;
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+UPDATE v1 SET f2 = 'number' WHERE f1 = 3;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+UPDATE v1 SET f1 = 10 WHERE f1 = 3;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+UPDATE v1 SET f2 = 'number' WHERE f1 = 1;
+affected rows: 0
+
+Testcase 3.3.1.46
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60
+FROM test.tb2 where f59 = 195 WITH CHECK OPTION ;
+UPDATE test.v1 SET f59 = 198 where f59=195 ;
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+SELECT * FROM test.v1 order by f59 ;
+f59 f60
+195 87
+drop view if exists test.v1 ;
+
+Testcase 3.3.1.47
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Drop view if exists test.v2 ;
+CREATE VIEW test.v1 AS SELECT f59,f60
+FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ;
+CREATE VIEW test.v2 as SELECT * FROM test.v1 ;
+UPDATE test.v1 SET F59 = 919 where f59 = 0987 ;
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+SELECT * FROM test.v1 order by f59 ;
+f59 f60
+987 41
+UPDATE test.v2 SET F59 = 9879 where f59 = 919 ;
+SELECT * FROM tb2 where f59 = 9879 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+drop view if exists v1 ;
+drop view if exists v2 ;
+
+Testcase 3.3.1.48
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS test.t1;
+DROP VIEW IF EXISTS test.v1;
+CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER)
+ENGINE = myisam;
+INSERT INTO t1 VALUES ('A', 1);
+SELECT * FROM t1 order by f1, f2;
+f1 f2
+A 1
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2
+WITH CASCADED CHECK OPTION ;
+SELECT * FROM v1 order by f1, f2;
+f1 f2
+A 1
+UPDATE v1 SET f2 = 2 WHERE f2 = 1;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+INSERT INTO v1 VALUES('B',2);
+affected rows: 1
+SELECT * FROM v1 order by f1, f2;
+f1 f2
+A 2
+B 2
+UPDATE v1 SET f2 = 4;
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+INSERT INTO v1 VALUES('B',3);
+ERROR 44000: CHECK OPTION failed `test`.`v1`
+SELECT * FROM v1 order by f1, f2;
+f1 f2
+A 2
+B 2
+
+Testcase 3.3.1.49
+--------------------------------------------------------------------------------
+Drop table if exists test.t1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test.v2 ;
+Drop view if exists test.v3 ;
+Create table test.t1 (f59 INT, f60 INT) ;
+Insert into test.t1 values (100,4234);
+Insert into test.t1 values (290,6624);
+Insert into test.t1 values (410,765);
+Insert into test.t1 values (300,433334);
+Insert into test.t1 values (800,9788);
+Insert into test.t1 values (501,9866);
+Create view test.v1 as select f59
+FROM test.t1 where f59<500 with check option ;
+Create view test.v2 as select *
+from test.v1 where f59>0 with local check option ;
+Create view test.v3 as select *
+from test.v1 where f59>0 with cascaded check option ;
+Insert into test.v2 values(23) ;
+Insert into test.v3 values(24) ;
+drop view if exists test.v1 ;
+drop view if exists test.v2 ;
+drop view if exists test.v3 ;
+
+Testcase 3.3.1.49A
+--------------------------------------------------------------------------------
+USE test;
+DROP TABLE IF EXISTS test.t1 ;
+DROP TABLE IF EXISTS test.t1_results ;
+DROP VIEW IF EXISTS test.v1;
+DROP VIEW IF EXISTS test.v2;
+DROP VIEW IF EXISTS test.v3;
+CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20));
+CREATE TABLE t1_results (v3_to_v1_options VARCHAR(100), statement VARCHAR(10),
+v3_to_v1_violation VARCHAR(20), errno CHAR(10));
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH LOCAL CHECK OPTION ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - WITH LOCAL CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CASCADED CHECK OPTION ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - WITH CASCADED CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CHECK OPTION ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - WITH CHECK OPTION
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 ;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH LOCAL CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CASCADED CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ;
+option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - WITH CHECK OPTION - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ;
+option_variant WITH LOCAL CHECK OPTION - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CASCADED CHECK OPTION - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant WITH CHECK OPTION - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(0, 'zero');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(7, 'seven');
+ERROR 44000: CHECK OPTION failed `test`.`v3`
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+option_variant <nothing> - <nothing> - <nothing>
+option_variant --------------------------------------------------------------------------------
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+SELECT * FROM v1;
+f1 f2
+0 zero
+7 seven
+8 eight
+SELECT * FROM v2;
+col1 col2
+7 seven
+8 eight
+SELECT * FROM v3;
+my_col1 my_col2
+8 eight
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+DELETE FROM v3 WHERE my_col1 = 16;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 0;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 7;
+affected rows: 0
+DELETE FROM v3 WHERE my_col1 = 8;
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+DELETE FROM t1;
+INSERT INTO t1 VALUES(16, 'sixteen');
+INSERT INTO t1 VALUES(0, 'zero');
+INSERT INTO t1 VALUES(7, 'seven');
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+affected rows: 0
+info: Rows matched: 0 Changed: 0 Warnings: 0
+UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 whatever
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+7 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+0 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+16 eight
+DELETE FROM t1;
+INSERT INTO t1 VALUES(8, 'eight');
+UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+f1 f2
+10 eight
+DELETE FROM t1;
+INSERT INTO v3 VALUES(16, 'sixteen');
+affected rows: 1
+INSERT INTO v3 VALUES(0, 'zero');
+affected rows: 1
+INSERT INTO v3 VALUES(7, 'seven');
+affected rows: 1
+INSERT INTO v3 VALUES(8, 'eight');
+affected rows: 1
+SELECT * FROM t1;
+f1 f2
+16 sixteen
+0 zero
+7 seven
+8 eight
+DELETE FROM t1;
+DROP VIEW v3;
+DROP VIEW v2;
+DROP VIEW v1;
+SELECT * FROM t1_results ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+ <nothing> - <nothing> - <nothing> UPDATE _v2_ 0
+ <nothing> - <nothing> - <nothing> INSERT _v2_ 0
+ <nothing> - <nothing> - <nothing> INSERT _ _v1 0
+ <nothing> - <nothing> - <nothing> UPDATE _ _ 0
+ <nothing> - <nothing> - <nothing> UPDATE _ _v1 0
+ <nothing> - <nothing> - <nothing> UPDATE v3_ _ 0
+ <nothing> - <nothing> - <nothing> INSERT _ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - <nothing> - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - <nothing> - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE _v2_ 0
+ <nothing> - WITH CHECK OPTION - <nothing> INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - <nothing> INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+ <nothing> - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - <nothing> - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369
+WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - <nothing> - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - <nothing> INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369
+WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0
+
+Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above).
+All following SELECTs must give ROW NOT FOUND
+--------------------------------------------------------------------------------
+SELECT * FROM t1_results
+WHERE v3_to_v1_violation = ' _ _ ' AND errno <> 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE ' %' AND errno <> 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE 'WITH %'
+ AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %'
+ AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+SELECT * FROM t1_results
+WHERE errno <> 0 AND errno <> 1369
+ORDER BY v3_to_v1_options;
+v3_to_v1_options statement v3_to_v1_violation errno
+
+End of plausibility checks
+--------------------------------------------------------------------------------
+DROP TABLE t1_results;
+
+Testcase 3.3.1.50 - 3.3.1.53
+--------------------------------------------------------------------------------
+DROP VIEW IF EXISTS test.v1;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f60,f61 ;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 100
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 100
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+drop view test.v1 ;
+CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2;
+SELECT * FROM test.v1 order by F59, F61 limit 50;
+F59 F61
+1 0000000001
+2 0000000002
+3 0000000003
+5 0000000005
+6 0000000006
+7 0000000007
+8 0000000008
+9 0000000009
+10 0000000010
+15 NULL
+17 0000000016
+19 0000000014
+22 NULL
+24 NULL
+27 0000000026
+29 0000000024
+34 NULL
+94 NULL
+100 NULL
+100 0000000004
+107 0000000106
+107 0000000106
+109 0000000104
+109 0000000104
+195 NULL
+207 0000000206
+209 0000000204
+242 NULL
+250 NULL
+292 NULL
+299 NULL
+321 0000000765
+323 NULL
+340 NULL
+394 NULL
+424 NULL
+441 NULL
+500 0000000900
+500 0000000900
+500 0000000900
+660 NULL
+987 NULL
+2550 NULL
+2760 NULL
+3330 NULL
+3410 NULL
+7876 NULL
+9112 0000008771
+76710 NULL
+569300 NULL
+drop view test.v1 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61;
+SELECT * FROM test.v1 order by f59,f60,f61 ;
+f59 1
+f60 1
+f61 0000000001
+f62 0000000000000000000000000000000000000000000000000000000000000001
+f63 0000000001
+f64 0000000000000000000000000000000000000000000000000000000000000001
+f65 -5
+f66 0.000000000000000000000000000000
+f67 1
+f68 0.000000000000000000000000000000
+f69 0000000001
+f70 000000000000000000000000000000000.000000000000000000000000000000
+f71 0000000001
+f72 000000000000000000000000000000000.000000000000000000000000000000
+f73 -1.17549435e-38
+f74 1.175494352e-38
+f75 00000001.175494352e-38
+f76 00000001.175494352e-38
+f77 -1.17549435e-38
+f78 1.175494352e-38
+f79 00000001.175494352e-38
+f80 00000001.175494352e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.17549435e-38
+f95 1.17549e-38
+f96 1.175494352e-38
+f97 01.17549e-38
+f98 00000001.175494352e-38
+f99 01.17549e-38
+f100 00000001.175494352e-38
+f101 1000-01-01
+f102 838:59:58
+f103 1970-01-02 00:00:01
+f104 1970-01-02 00:00:01
+f105 1902
+f106 1902
+f107 1902
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 2
+f60 2
+f61 0000000002
+f62 0000000000000000000000000000000000000000000000000000000000000002
+f63 0000000002
+f64 0000000000000000000000000000000000000000000000000000000000000002
+f65 -4
+f66 1.100000000000000000000000000000
+f67 2
+f68 1.100000000000000000000000000000
+f69 0000000002
+f70 000000000000000000000000000000001.100000000000000000000000000000
+f71 0000000002
+f72 000000000000000000000000000000001.100000000000000000000000000000
+f73 -1.175494349e-38
+f74 1.175494353e-38
+f75 00000001.175494353e-38
+f76 00000001.175494353e-38
+f77 -1.175494349e-38
+f78 1.175494353e-38
+f79 00000001.175494353e-38
+f80 00000001.175494353e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494349e-38
+f95 1.17549e-38
+f96 1.175494353e-38
+f97 01.17549e-38
+f98 00000001.175494353e-38
+f99 01.17549e-38
+f100 00000001.175494353e-38
+f101 1000-01-02
+f102 838:59:57
+f103 1970-01-03 00:00:02
+f104 1970-01-03 00:00:02
+f105 1903
+f106 1903
+f107 1903
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 3
+f60 3
+f61 0000000003
+f62 0000000000000000000000000000000000000000000000000000000000000003
+f63 0000000003
+f64 0000000000000000000000000000000000000000000000000000000000000003
+f65 -3
+f66 2.200000000000000000000000000000
+f67 3
+f68 2.200000000000000000000000000000
+f69 0000000003
+f70 000000000000000000000000000000002.200000000000000000000000000000
+f71 0000000003
+f72 000000000000000000000000000000002.200000000000000000000000000000
+f73 -1.175494348e-38
+f74 1.175494354e-38
+f75 00000001.175494354e-38
+f76 00000001.175494354e-38
+f77 -1.175494348e-38
+f78 1.175494354e-38
+f79 00000001.175494354e-38
+f80 00000001.175494354e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494348e-38
+f95 1.17549e-38
+f96 1.175494354e-38
+f97 01.17549e-38
+f98 00000001.175494354e-38
+f99 01.17549e-38
+f100 00000001.175494354e-38
+f101 1000-01-03
+f102 838:59:56
+f103 1970-01-04 00:00:03
+f104 1970-01-04 00:00:03
+f105 1904
+f106 1904
+f107 1904
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 5
+f60 5
+f61 0000000005
+f62 0000000000000000000000000000000000000000000000000000000000000005
+f63 0000000005
+f64 0000000000000000000000000000000000000000000000000000000000000005
+f65 -1
+f66 4.400000000000000000000000000000
+f67 5
+f68 4.400000000000000000000000000000
+f69 0000000005
+f70 000000000000000000000000000000004.400000000000000000000000000000
+f71 0000000005
+f72 000000000000000000000000000000004.400000000000000000000000000000
+f73 -1.175494346e-38
+f74 1.175494356e-38
+f75 00000001.175494356e-38
+f76 00000001.175494356e-38
+f77 -1.175494346e-38
+f78 1.175494356e-38
+f79 00000001.175494356e-38
+f80 00000001.175494356e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494346e-38
+f95 1.17549e-38
+f96 1.175494356e-38
+f97 01.17549e-38
+f98 00000001.175494356e-38
+f99 01.17549e-38
+f100 00000001.175494356e-38
+f101 1000-01-05
+f102 838:59:54
+f103 1970-01-06 00:00:05
+f104 1970-01-06 00:00:05
+f105 1906
+f106 1906
+f107 1906
+f108 2enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 6
+f60 6
+f61 0000000006
+f62 0000000000000000000000000000000000000000000000000000000000000006
+f63 0000000006
+f64 0000000000000000000000000000000000000000000000000000000000000006
+f65 0
+f66 5.500000000000000000000000000000
+f67 6
+f68 5.500000000000000000000000000000
+f69 0000000006
+f70 000000000000000000000000000000005.500000000000000000000000000000
+f71 0000000006
+f72 000000000000000000000000000000005.500000000000000000000000000000
+f73 -1.175494345e-38
+f74 1.175494357e-38
+f75 00000001.175494357e-38
+f76 00000001.175494357e-38
+f77 -1.175494345e-38
+f78 1.175494357e-38
+f79 00000001.175494357e-38
+f80 00000001.175494357e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494345e-38
+f95 1.17549e-38
+f96 1.175494357e-38
+f97 01.17549e-38
+f98 00000001.175494357e-38
+f99 01.17549e-38
+f100 00000001.175494357e-38
+f101 1000-01-06
+f102 838:59:53
+f103 1970-01-07 00:00:06
+f104 1970-01-07 00:00:06
+f105 1907
+f106 1907
+f107 1907
+f108 1enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 7
+f60 7
+f61 0000000007
+f62 0000000000000000000000000000000000000000000000000000000000000007
+f63 0000000007
+f64 0000000000000000000000000000000000000000000000000000000000000007
+f65 1
+f66 6.600000000000000000000000000000
+f67 7
+f68 6.600000000000000000000000000000
+f69 0000000007
+f70 000000000000000000000000000000006.600000000000000000000000000000
+f71 0000000007
+f72 000000000000000000000000000000006.600000000000000000000000000000
+f73 -1.175494344e-38
+f74 1.175494358e-38
+f75 00000001.175494358e-38
+f76 00000001.175494358e-38
+f77 -1.175494344e-38
+f78 1.175494358e-38
+f79 00000001.175494358e-38
+f80 00000001.175494358e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494344e-38
+f95 1.17549e-38
+f96 1.175494358e-38
+f97 01.17549e-38
+f98 00000001.175494358e-38
+f99 01.17549e-38
+f100 00000001.175494358e-38
+f101 1000-01-07
+f102 838:59:52
+f103 1970-01-08 00:00:07
+f104 1970-01-08 00:00:07
+f105 1908
+f106 1908
+f107 1908
+f108 2enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 8
+f60 8
+f61 0000000008
+f62 0000000000000000000000000000000000000000000000000000000000000008
+f63 0000000008
+f64 0000000000000000000000000000000000000000000000000000000000000008
+f65 2
+f66 7.700000000000000000000000000000
+f67 8
+f68 7.700000000000000000000000000000
+f69 0000000008
+f70 000000000000000000000000000000007.700000000000000000000000000000
+f71 0000000008
+f72 000000000000000000000000000000007.700000000000000000000000000000
+f73 -1.175494343e-38
+f74 1.175494359e-38
+f75 00000001.175494359e-38
+f76 00000001.175494359e-38
+f77 -1.175494343e-38
+f78 1.175494359e-38
+f79 00000001.175494359e-38
+f80 00000001.175494359e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494343e-38
+f95 1.17549e-38
+f96 1.175494359e-38
+f97 01.17549e-38
+f98 00000001.175494359e-38
+f99 01.17549e-38
+f100 00000001.175494359e-38
+f101 1000-01-08
+f102 838:59:51
+f103 1970-01-09 00:00:08
+f104 1970-01-09 00:00:08
+f105 1909
+f106 1909
+f107 1909
+f108 1enum
+f109 1set,2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 9
+f60 9
+f61 0000000009
+f62 0000000000000000000000000000000000000000000000000000000000000009
+f63 0000000009
+f64 0000000000000000000000000000000000000000000000000000000000000009
+f65 3
+f66 8.800000000000000000000000000000
+f67 9
+f68 8.800000000000000000000000000000
+f69 0000000009
+f70 000000000000000000000000000000008.800000000000000000000000000000
+f71 0000000009
+f72 000000000000000000000000000000008.800000000000000000000000000000
+f73 -1.175494342e-38
+f74 1.17549436e-38
+f75 000000001.17549436e-38
+f76 000000001.17549436e-38
+f77 -1.175494342e-38
+f78 1.17549436e-38
+f79 000000001.17549436e-38
+f80 000000001.17549436e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494342e-38
+f95 1.17549e-38
+f96 1.17549436e-38
+f97 01.17549e-38
+f98 000000001.17549436e-38
+f99 01.17549e-38
+f100 000000001.17549436e-38
+f101 1000-01-09
+f102 838:59:50
+f103 1970-01-10 00:00:09
+f104 1970-01-10 00:00:09
+f105 1910
+f106 1910
+f107 1910
+f108 2enum
+f109 1set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117
+f59 10
+f60 10
+f61 0000000010
+f62 0000000000000000000000000000000000000000000000000000000000000010
+f63 0000000010
+f64 0000000000000000000000000000000000000000000000000000000000000010
+f65 4
+f66 9.900000000000000000000000000000
+f67 10
+f68 9.900000000000000000000000000000
+f69 0000000010
+f70 000000000000000000000000000000009.900000000000000000000000000000
+f71 0000000010
+f72 000000000000000000000000000000009.900000000000000000000000000000
+f73 -1.175494341e-38
+f74 1.175494361e-38
+f75 00000001.175494361e-38
+f76 00000001.175494361e-38
+f77 -1.175494341e-38
+f78 1.175494361e-38
+f79 00000001.175494361e-38
+f80 00000001.175494361e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494341e-38
+f95 1.17549e-38
+f96 1.175494361e-38
+f97 01.17549e-38
+f98 00000001.175494361e-38
+f99 01.17549e-38
+f100 00000001.175494361e-38
+f101 1000-01-10
+f102 838:59:49
+f103 1970-01-11 00:00:10
+f104 1970-01-11 00:00:10
+f105 1911
+f106 1911
+f107 1911
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 15
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 17
+f60 15
+f61 0000000016
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 19
+f60 18
+f61 0000000014
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 22
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 24
+f60 51654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 27
+f60 25
+f61 0000000026
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 29
+f60 28
+f61 0000000024
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 34
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 94
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 100
+f60 4
+f61 0000000004
+f62 0000000000000000000000000000000000000000000000000000000000000004
+f63 0000000004
+f64 0000000000000000000000000000000000000000000000000000000000000004
+f65 -2
+f66 3.300000000000000000000000000000
+f67 4
+f68 3.300000000000000000000000000000
+f69 0000000004
+f70 000000000000000000000000000000003.300000000000000000000000000000
+f71 0000000004
+f72 000000000000000000000000000000003.300000000000000000000000000000
+f73 -1.175494347e-38
+f74 1.175494355e-38
+f75 00000001.175494355e-38
+f76 00000001.175494355e-38
+f77 -1.175494347e-38
+f78 1.175494355e-38
+f79 00000001.175494355e-38
+f80 00000001.175494355e-38
+f81 -1.17549e-38
+f82 1.17549e-38
+f83 01.17549e-38
+f84 01.17549e-38
+f85 -1.17549e-38
+f86 -1.17549e-38
+f87 1.17549e-38
+f88 1.17549e-38
+f89 01.17549e-38
+f90 01.17549e-38
+f91 01.17549e-38
+f92 01.17549e-38
+f93 -1.17549e-38
+f94 -1.175494347e-38
+f95 1.17549e-38
+f96 1.175494355e-38
+f97 01.17549e-38
+f98 00000001.175494355e-38
+f99 01.17549e-38
+f100 00000001.175494355e-38
+f101 1000-01-04
+f102 838:59:55
+f103 1970-01-05 00:00:04
+f104 1970-01-05 00:00:04
+f105 1905
+f106 1905
+f107 1905
+f108 1enum
+f109 2set
+f110
+f111
+f112
+f113
+f114
+f115
+f116
+f117 NULL
+f59 100
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 107
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 109
+f60 108
+f61 0000000104
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 195
+f60 87
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 207
+f60 205
+f61 0000000206
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 209
+f60 208
+f61 0000000204
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 250
+f60 87895654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 292
+f60 93
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 299
+f60 899
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 321
+f60 NULL
+f61 0000000765
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 323
+f60 14376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 340
+f60 9984376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 394
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 424
+f60 89
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 441
+f60 16546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 500
+f60 NULL
+f61 0000000900
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 660
+f60 876546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 987
+f60 41
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 2550
+f60 775654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 2760
+f60 985654
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 3330
+f60 764376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 3410
+f60 996546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 7876
+f60 74
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 9112
+f60 NULL
+f61 0000008771
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 76710
+f60 226546
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 569300
+f60 9114376
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+drop view test.v1 ;
+CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f61 desc limit 20;
+F59 f61
+1 0000000001
+2 0000000002
+3 0000000003
+5 0000000005
+6 0000000006
+7 0000000007
+8 0000000008
+9 0000000009
+10 0000000010
+15 NULL
+17 0000000016
+19 0000000014
+22 NULL
+24 NULL
+27 0000000026
+29 0000000024
+34 NULL
+94 NULL
+100 0000000004
+100 NULL
+drop view test.v1 ;
+
+Testcase 3.3.1.54
+--------------------------------------------------------------------------------
+USE test;
+drop table if exists test.t1 ;
+drop table if exists test.t2 ;
+drop view if exists test.v1 ;
+Create table t1 (f59 int, f60 int) ;
+Create table t2 (f59 int, f60 int) ;
+Insert into t1 values (1,10) ;
+Insert into t1 values (2,20) ;
+Insert into t1 values (47,80) ;
+Insert into t2 values (1,1000) ;
+Insert into t2 values (2,2000) ;
+Insert into t2 values (31,97) ;
+Create view test.v1 as select t1.f59, t1.f60
+from t1,t2 where t1.f59=t2.f59 ;
+Select * from test.v1 order by f59 limit 50 ;
+f59 f60
+1 10
+2 20
+drop table test.t1 ;
+drop table test.t2 ;
+drop view test.v1 ;
+
+Testcase 3.3.1.50 - 3.3.1.54 additional implementation
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 ( f1 BIGINT, f2 char(10), f3 DECIMAL(10,5) );
+INSERT INTO t1 VALUES(1, 'one', 1.1);
+INSERT INTO t1 VALUES(2, 'two', 2.2);
+INSERT INTO t1 VALUES(3, 'three', 3.3);
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1;
+f1 f2 f3
+1 one 1.10000
+2 two 2.20000
+3 three 3.30000
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1;
+SELECT * FROM v1;
+f2
+one
+two
+three
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE f3 = 2.2;
+SELECT * FROM v1;
+f1 f2 f3
+2 two 2.20000
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1 WHERE f3 = 2.2;
+SELECT * FROM v1;
+f2
+two
+SET sql_mode = 'traditional,ansi';
+CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
+FROM t1 WHERE f1 = 2;
+CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
+FROM t1 WHERE f1 = 2;
+ERROR 42000: Incorrect column name 'pure column f3: '
+SELECT * FROM v1;
+pure column f3: 2.20000
+sum of columns f1 + f3 = 4.20000
+product of constants 3 * (- 0.11111E+1): -3.3333
+expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
+SET sql_mode = '';
+
+Testcases 3.3.1.55 - 3.3.1.62
+--------------------------------------------------------------------------------
+Drop table if exists t1, t2 ;
+Drop view if exists v1 ;
+Create table t1 (f59 int, f60 char(10), f61 int, a char(1)) ;
+Insert into t1 values (1, 'single', 3, '1') ;
+Insert into t1 values (2, 'double', 6, '2') ;
+Insert into t1 values (3, 'single-f3', 4, '3') ;
+Create table t2 (f59 int, f60 char(10), f61 int, b char(1)) ;
+Insert into t2 values (2, 'double', 6, '2') ;
+Insert into t2 values (3, 'single-f3', 6, '3') ;
+Insert into t2 values (4, 'single', 4, '4') ;
+create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+from t1 inner join t2 where t1.f59 = t2.f59 ;
+select * from test.v1 order by t1_f59 ;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+from t1 inner join t2 where t1.f59 = t2.f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Create or replace view test.v1 as
+Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2 cross join t1;
+Select * from v1 order by t1_f59,t2_f59;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2 cross join t1;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Create or replace view test.v1 as
+Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2,t1;
+Select * from v1 order by t1_f59,t2_f59;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2,t1;
+t1_f59 t2_f59
+1 2
+1 3
+1 4
+2 2
+2 3
+2 4
+3 2
+3 3
+3 4
+Create or replace view test.v1 as
+Select f59, f60, f61, a, b
+FROM t2 natural join t1;
+Select * from v1 order by f59;
+f59 f60 f61 a b
+2 double 6 2 2
+Select f59, f60, f61, a, b
+FROM t2 natural join t1;
+f59 f60 f61 a b
+2 double 6 2 2
+Create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 left outer join t1 on t2.f59=t1.f59;
+Select * from v1 order by t1_f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+NULL 4 NULL single NULL 4
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 left outer join t1 on t2.f59=t1.f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+NULL 4 NULL single NULL 4
+Create or replace view test.v1 as
+Select f59, f60, f61, t1.a, t2.b
+FROM t2 natural left outer join t1;
+Select * from v1 order by f59;
+f59 f60 f61 a b
+2 double 6 2 2
+3 single-f3 6 NULL 3
+4 single 4 NULL 4
+Select f59, f60, f61, t1.a, t2.b
+FROM t2 natural left outer join t1;
+f59 f60 f61 a b
+2 double 6 2 2
+3 single-f3 6 NULL 3
+4 single 4 NULL 4
+set @save_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='outer_join_with_cache=off';
+Create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 right outer join t1 on t2.f59=t1.f59;
+Select * from v1 order by t1_f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+1 NULL single NULL 3 NULL
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 right outer join t1 on t2.f59=t1.f59;
+t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61
+1 NULL single NULL 3 NULL
+2 2 double double 6 6
+3 3 single-f3 single-f3 4 6
+Create or replace view test.v1 as
+Select f59, f60, a, b
+FROM t2 natural right outer join t1;
+Select * from v1 order by f59 desc;
+f59 f60 a b
+3 single-f3 3 NULL
+2 double 2 2
+1 single 1 NULL
+Select f59, f60, a, b
+FROM t2 natural right outer join t1;
+f59 f60 a b
+1 single 1 NULL
+2 double 2 2
+3 single-f3 3 NULL
+set optimizer_switch=@save_optimizer_switch;
+drop table t1, t2;
+drop view v1 ;
+Use test;
+
+Testcase 3.3.1.A1 - 3.3.1.A3
+--------------------------------------------------------------------------------
+Drop table if exists t1 ;
+Drop view if exists v1;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (101,201,301) ;
+Insert into t1 values (107,501,601) ;
+Insert into t1 values (901,801,401) ;
+Create or replace view test.v1 as
+Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+f59
+1
+2
+3
+5
+6
+7
+8
+9
+10
+15
+Drop view if exists test.v1 ;
+Drop table if exists t1 ;
+Drop view if exists v1;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (201,201,201) ;
+Insert into t1 values (207,201,201) ;
+Insert into t1 values (201,201,201) ;
+Create or replace view test.v1
+as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+f59
+207
+Drop view if exists test.v1 ;
+Drop table if exists t1 ;
+Drop view if exists v1;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (21,21,21) ;
+Insert into t1 values (27,21,21) ;
+Insert into t1 values (21,21,21) ;
+Create or replace view test.v1
+as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+f59
+27
+Drop view test.v1 ;
+
+Testcase 3.3.1.63
+--------------------------------------------------------------------------------
+Drop table if exists t1 ;
+Drop view if exists test.v1 ;
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (11,21,31) ;
+Insert into t1 values (17,51,61) ;
+Insert into t1 values (91,81,41) ;
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union ALL (Select f59 from t1 where f59=17 );
+Select * from test.v1 order by f59 limit 0,10;
+f59
+17
+17
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union (Select f59 from t1 where f59=17 );
+Select * from test.v1 order by f59 limit 0,10;
+f59
+17
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union Distinct (Select f59 from t1 where f60=17 );
+Select * from test.v1 order by f59 limit 0,10;
+f59
+17
+Drop view test.v1 ;
+drop table if exists t1;
+drop view if exists test.v1;
+create table t1 (f59 int, f60 int, f61 int);
+insert into t1 values (101,201,301);
+insert into t1 values (107,501,601);
+insert into t1 values (901,801,401);
+create or replace view test.v1 as
+select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59;
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+107
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union all
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+107
+107
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union distinct
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+f59
+107
+drop view if exists test.v1 ;
+drop table t1;
+
+Testcase 3.3.1.64
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT F59
+FROM test.tb2 where test.tb2.F59 = 109;
+SELECT * FROM test.v1 order by f59 limit 0,10;
+F59
+109
+109
+ALTER VIEW test.v1 AS SELECT *
+FROM test.tb2 WHERE test.tb2.f59 = 242 ;
+SELECT * FROM test.v1 order by f59 limit 0,10;
+f59 242
+f60 79
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+Drop view test.v1 ;
+
+Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS test.v1 ;
+CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = myisam ;
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+DROP VIEW v1;
+DROP VIEW v1;
+ERROR 42S02: Unknown VIEW: 'test.v1'
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v1;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v1'
+
+Testcase 3.3.1.68
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1_base ;
+DROP VIEW IF EXISTS v1_top ;
+CREATE TABLE t1 ( f1 DOUBLE);
+CREATE VIEW v1_base AS SELECT * FROM t1;
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_top ;
+DROP VIEW v1_top;
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_base ;
+DROP VIEW v1_base;
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
+DROP VIEW v1_top;
+CREATE VIEW v1_base AS SELECT * FROM t1;
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_top CASCADE ;
+DROP VIEW v1_top;
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_base CASCADE ;
+DROP VIEW v1_base;
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
+DROP VIEW v1_top;
+CREATE VIEW v1_base AS SELECT * FROM t1;
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_top RESTRICT ;
+DROP VIEW v1_top;
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
+CREATE VIEW v1_top AS SELECT * FROM v1_base;
+DROP VIEW v1_base RESTRICT ;
+DROP VIEW v1_base;
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
+DROP VIEW v1_top;
+
+Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ENGINE = myisam;
+CREATE VIEW v1 AS SELECT * FROM t1;
+DROP VIEW v1 ;
+SELECT * FROM v1 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW CREATE VIEW v1 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW CREATE TABLE v1 ;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW TABLE STATUS like 'v1' ;
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+SHOW TABLES LIKE 'v1';
+Tables_in_test (v1)
+SHOW COLUMNS FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+SHOW FIELDS FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+CHECK TABLE v1;
+Table Op Msg_type Msg_text
+test.v1 check Error Table 'test.v1' doesn't exist
+test.v1 check status Operation failed
+DESCRIBE v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+EXPLAIN SELECT * FROM v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+Use test;
+
+Testcase 3.3.1.A6
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS test3;
+CREATE DATABASE test3;
+CREATE TABLE test3.t1 (f1 DECIMAL(5,3)) ENGINE = myisam;
+INSERT INTO test3.t1 SET f1 = 1.0;
+CREATE VIEW test3.v0 AS SELECT * FROM test3.t1;
+CREATE VIEW test3.v1 AS SELECT * FROM test3.v0;
+CREATE VIEW test3.v2 AS SELECT * FROM test3.v1;
+CREATE VIEW test3.v3 AS SELECT * FROM test3.v2;
+CREATE VIEW test3.v4 AS SELECT * FROM test3.v3;
+CREATE VIEW test3.v5 AS SELECT * FROM test3.v4;
+CREATE VIEW test3.v6 AS SELECT * FROM test3.v5;
+CREATE VIEW test3.v7 AS SELECT * FROM test3.v6;
+CREATE VIEW test3.v8 AS SELECT * FROM test3.v7;
+CREATE VIEW test3.v9 AS SELECT * FROM test3.v8;
+CREATE VIEW test3.v10 AS SELECT * FROM test3.v9;
+CREATE VIEW test3.v11 AS SELECT * FROM test3.v10;
+CREATE VIEW test3.v12 AS SELECT * FROM test3.v11;
+CREATE VIEW test3.v13 AS SELECT * FROM test3.v12;
+CREATE VIEW test3.v14 AS SELECT * FROM test3.v13;
+CREATE VIEW test3.v15 AS SELECT * FROM test3.v14;
+CREATE VIEW test3.v16 AS SELECT * FROM test3.v15;
+CREATE VIEW test3.v17 AS SELECT * FROM test3.v16;
+CREATE VIEW test3.v18 AS SELECT * FROM test3.v17;
+CREATE VIEW test3.v19 AS SELECT * FROM test3.v18;
+CREATE VIEW test3.v20 AS SELECT * FROM test3.v19;
+CREATE VIEW test3.v21 AS SELECT * FROM test3.v20;
+CREATE VIEW test3.v22 AS SELECT * FROM test3.v21;
+CREATE VIEW test3.v23 AS SELECT * FROM test3.v22;
+CREATE VIEW test3.v24 AS SELECT * FROM test3.v23;
+CREATE VIEW test3.v25 AS SELECT * FROM test3.v24;
+CREATE VIEW test3.v26 AS SELECT * FROM test3.v25;
+CREATE VIEW test3.v27 AS SELECT * FROM test3.v26;
+CREATE VIEW test3.v28 AS SELECT * FROM test3.v27;
+CREATE VIEW test3.v29 AS SELECT * FROM test3.v28;
+CREATE VIEW test3.v30 AS SELECT * FROM test3.v29;
+CREATE VIEW test3.v31 AS SELECT * FROM test3.v30;
+CREATE VIEW test3.v32 AS SELECT * FROM test3.v31;
+SHOW CREATE VIEW test3.v32;
+View Create View character_set_client collation_connection
+v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
+SELECT * FROM test3.v32;
+f1
+1.000
+EXPLAIN SELECT * FROM test3.v32;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 1
+DROP VIEW test3.v0;
+SHOW CREATE VIEW test3.v32;
+View Create View character_set_client collation_connection
+v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
+Warnings:
+Warning 1356 View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM test3.v32;
+ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+EXPLAIN SELECT * FROM test3.v32;
+ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+
+FIXME - Setting join_limit to 28 - hangs for higher values
+----------------------------------------------------------
+SET @join_limit = 28;
+SET @max_level = @join_limit - 1;
+DROP DATABASE IF EXISTS test3;
+DROP TABLE IF EXISTS test1.t1;
+DROP TABLE IF EXISTS test2.t1;
+DROP VIEW IF EXISTS test1.v27;
+DROP VIEW IF EXISTS test1.v26;
+DROP VIEW IF EXISTS test1.v25;
+DROP VIEW IF EXISTS test1.v24;
+DROP VIEW IF EXISTS test1.v23;
+DROP VIEW IF EXISTS test1.v22;
+DROP VIEW IF EXISTS test1.v21;
+DROP VIEW IF EXISTS test1.v20;
+DROP VIEW IF EXISTS test1.v19;
+DROP VIEW IF EXISTS test1.v18;
+DROP VIEW IF EXISTS test1.v17;
+DROP VIEW IF EXISTS test1.v16;
+DROP VIEW IF EXISTS test1.v15;
+DROP VIEW IF EXISTS test1.v14;
+DROP VIEW IF EXISTS test1.v13;
+DROP VIEW IF EXISTS test1.v12;
+DROP VIEW IF EXISTS test1.v11;
+DROP VIEW IF EXISTS test1.v10;
+DROP VIEW IF EXISTS test1.v9;
+DROP VIEW IF EXISTS test1.v8;
+DROP VIEW IF EXISTS test1.v7;
+DROP VIEW IF EXISTS test1.v6;
+DROP VIEW IF EXISTS test1.v5;
+DROP VIEW IF EXISTS test1.v4;
+DROP VIEW IF EXISTS test1.v3;
+DROP VIEW IF EXISTS test1.v2;
+DROP VIEW IF EXISTS test1.v1;
+DROP VIEW IF EXISTS test1.v0;
+CREATE DATABASE test3;
+USE test1;
+CREATE TABLE t1 (f1 BIGINT, f2 CHAR(50)) ENGINE = myisam ;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (0, NULL);
+INSERT INTO t1 VALUES (5, 'five');
+INSERT INTO t1 VALUES (1, 'one');
+INSERT INTO t1 VALUES (2, 'two');
+USE test2;
+CREATE TABLE t1 (f1 DECIMAL(64,30), f2 VARCHAR(50)) ENGINE = myisam;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (0.000000000000000000000000000000, NULL);
+INSERT INTO t1 VALUES (5.000000000000000000000000000000, 'five');
+INSERT INTO t1 VALUES (+1.000000000000000000000000000000, 'one');
+INSERT INTO t1 VALUES (3.000000000000000, 'three');
+USE test3;
+CREATE TABLE t1 (f1 DOUBLE, f2 VARBINARY(50)) ENGINE = myisam;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (+0.0E-35, NULL);
+INSERT INTO t1 VALUES (+0.5E+1, 'five');
+INSERT INTO t1 VALUES (20.0E-1, 'two');
+INSERT INTO t1 VALUES (0.0300E2, 'three');
+USE test;
+CREATE OR REPLACE VIEW test1.v0 AS SELECT * FROM test2.t1;
+CREATE OR REPLACE VIEW test1.v1 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v0 tab2;
+CREATE OR REPLACE VIEW test1.v2 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v1 tab2;
+CREATE OR REPLACE VIEW test1.v3 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v2 tab2;
+CREATE OR REPLACE VIEW test1.v4 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v3 tab2;
+CREATE OR REPLACE VIEW test1.v5 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v4 tab2;
+CREATE OR REPLACE VIEW test1.v6 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v5 tab2;
+CREATE OR REPLACE VIEW test1.v7 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v6 tab2;
+CREATE OR REPLACE VIEW test1.v8 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v7 tab2;
+CREATE OR REPLACE VIEW test1.v9 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v8 tab2;
+CREATE OR REPLACE VIEW test1.v10 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v9 tab2;
+CREATE OR REPLACE VIEW test1.v11 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v10 tab2;
+CREATE OR REPLACE VIEW test1.v12 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v11 tab2;
+CREATE OR REPLACE VIEW test1.v13 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v12 tab2;
+CREATE OR REPLACE VIEW test1.v14 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v13 tab2;
+CREATE OR REPLACE VIEW test1.v15 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v14 tab2;
+CREATE OR REPLACE VIEW test1.v16 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v15 tab2;
+CREATE OR REPLACE VIEW test1.v17 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v16 tab2;
+CREATE OR REPLACE VIEW test1.v18 AS SELECT f1, f2
+FROM test1.t1 tab1 NATURAL JOIN test1.v17 tab2;
+CREATE OR REPLACE VIEW test1.v19 AS SELECT f1, f2
+FROM test2.t1 tab1 NATURAL JOIN test1.v18 tab2;
+CREATE OR REPLACE VIEW test1.v20 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v19 tab2;
+SHOW CREATE VIEW test1.v20;
+View Create View character_set_client collation_connection
+v20 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v20` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v19` `tab2` on(`tab1`.`f1` = `tab2`.`f1` and `tab1`.`f2` = `tab2`.`f2`)) latin1 latin1_swedish_ci
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v20;
+f1 f2
+5 five
+
+The output of following EXPLAIN is deactivated, because the result
+differs on some platforms
+FIXME Is this a bug ?
+--------------------------------------------------------------------------------
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v20;
+CREATE VIEW test1.v21 AS SELECT f1, f2
+FROM test3.t1 tab1 NATURAL JOIN test1.v20 tab2;
+SHOW CREATE VIEW test1.v21;
+View Create View character_set_client collation_connection
+v21 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v21` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v20` `tab2` on(`tab1`.`f1` = `tab2`.`f1` and `tab1`.`f2` = `tab2`.`f2`)) latin1 latin1_swedish_ci
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v21;
+f1 f2
+5 five
+
+The output of following EXPLAIN is deactivated, because the result
+differs on some platforms
+FIXME Is this a bug ?
+--------------------------------------------------------------------------------
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v21;
+DROP VIEW IF EXISTS test1.v21;
+CREATE OR REPLACE VIEW test1.v0 AS
+SELECT f1 as f2, f2 as f1 FROM test2.t1;
+CREATE OR REPLACE VIEW test2.v0 AS
+SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
+SHOW CREATE VIEW test1.v20;
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v20;
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v20;
+CREATE OR REPLACE VIEW test3.v0 AS
+SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1;
+SHOW CREATE VIEW test1.v20;
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v20;
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v20;
+CREATE OR REPLACE VIEW test3.v0 AS
+SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1;
+SHOW CREATE VIEW test1.v20;
+SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v20;
+EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+CAST(f2 AS CHAR) AS f2 FROM test1.v20;
+DROP VIEW IF EXISTS test1.v20;
+DROP VIEW IF EXISTS test1.v19;
+DROP VIEW IF EXISTS test1.v18;
+DROP VIEW IF EXISTS test1.v17;
+DROP VIEW IF EXISTS test1.v16;
+DROP VIEW IF EXISTS test1.v15;
+DROP VIEW IF EXISTS test1.v14;
+DROP VIEW IF EXISTS test1.v13;
+DROP VIEW IF EXISTS test1.v12;
+DROP VIEW IF EXISTS test1.v11;
+DROP VIEW IF EXISTS test1.v10;
+DROP VIEW IF EXISTS test1.v9;
+DROP VIEW IF EXISTS test1.v8;
+DROP VIEW IF EXISTS test1.v7;
+DROP VIEW IF EXISTS test1.v6;
+DROP VIEW IF EXISTS test1.v5;
+DROP VIEW IF EXISTS test1.v4;
+DROP VIEW IF EXISTS test1.v3;
+DROP VIEW IF EXISTS test1.v2;
+DROP VIEW IF EXISTS test1.v1;
+DROP VIEW IF EXISTS test1.v0;
+DROP DATABASE test3;
+DROP TABLE test1.t1;
+DROP TABLE test2.t1;
+Use test;
+
+Testcase 3.3.2.1
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Create View test.v1 AS SELECT f59,f60 FROM tb2 where f59 = 1995 ;
+INSERT INTO test.v1 (f59,f60) values (879,700) ;
+affected rows: 1
+SELECT f59,f60 FROM test.v1 where f59 = 879 and f60 = 700 ;
+f59 f60
+DELETE FROM tb2 where f59 = 879 and f60 = 700 ;
+Drop view test.v1 ;
+
+Testcase 3.3.2.2
+--------------------------------------------------------------------------------
+Drop view if exists test.v1 ;
+Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ;
+affected rows: 1
+SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ;
+f59 2005
+f60 101
+f61 NULL
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ;
+f59 f60
+2005 101
+DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ;
+Drop view test.v1 ;
+
+Testcase 3.3.2.3
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (780,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM tb2 where f59 = 8 and f60 = 105;
+f59 8
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ;
+f59 f60
+8 105
+Drop view test.v1 ;
+
+Testcase 3.3.2.4
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (781,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ;
+affected rows: 4
+info: Rows matched: 4 Changed: 4 Warnings: 0
+SELECT * FROM tb2 where f59 = 891 and f60 = 105;
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+f59 891
+f60 105
+f61 0000000106
+f62 NULL
+f63 NULL
+f64 NULL
+f65 NULL
+f66 NULL
+f67 NULL
+f68 NULL
+f69 NULL
+f70 NULL
+f71 NULL
+f72 NULL
+f73 NULL
+f74 NULL
+f75 NULL
+f76 NULL
+f77 7.7
+f78 7.7
+f79 00000000000000000007.7
+f80 00000000000000000008.8
+f81 8.8
+f82 8.8
+f83 0000000008.8
+f84 0000000008.8
+f85 8.8
+f86 8.8
+f87 8.8
+f88 8.8
+f89 0000000008.8
+f90 0000000008.8
+f91 0000000008.8
+f92 0000000008.8
+f93 8.8
+f94 8.8
+f95 8.8
+f96 8.8
+f97 0000000008.8
+f98 00000000000000000008.8
+f99 0000000008.8
+f100 00000000000000000008.8
+f101 2000-01-01
+f102 00:00:20
+f103 0002-02-02 00:00:00
+f104 2000-12-31 23:59:59
+f105 2000
+f106 2000
+f107 2000
+f108 1enum
+f109 1set
+f110 NULL
+f111 NULL
+f112 NULL
+f113 NULL
+f114 NULL
+f115 NULL
+f116 NULL
+f117 NULL
+SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ;
+f59 f60
+891 105
+891 105
+891 105
+891 105
+Drop view test.v1 ;
+
+Testcase 3.3.2.5
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (789,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ;
+DELETE FROM test.v1 where f59 = 789 ;
+affected rows: 1
+SELECT * FROM tb2 where f59 = 789 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ;
+f59 f60
+Drop view test.v1 ;
+
+Testcase 3.3.2.6
+--------------------------------------------------------------------------------
+Insert into tb2 (f59,f60,f61) values (711,105,106) ;
+Drop view if exists test.v1 ;
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 711 ;
+DELETE FROM test.v1 where f59 = 711 ;
+affected rows: 1
+SELECT * FROM tb2 where f59 = 711 ;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ;
+f59 f60
+Drop view test.v1 ;
+
+Testcase 3.3.2.1 - 3.3.2.6 alternative implementation
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 ( f1 BIGINT DEFAULT 0, f2 CHAR(20), f3 NUMERIC(7,4),
+f4 CHAR, PRIMARY KEY(f1));
+CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
+INSERT INTO v1 SET f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NULL NULL NULL
+DELETE FROM t1;
+INSERT INTO v1 SET f2 = 'ABC';
+INSERT INTO v1 SET f2 = 'ABC';
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SELECT * from t1;
+f1 f2 f3 f4
+0 ABC NULL NULL
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 NNN -0.0012 X
+DELETE FROM t1;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f2, f3 FROM t1;
+INSERT INTO v1 SET f2 = 'ABC';
+INSERT INTO v1 SET f2 = 'ABC';
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SELECT * from t1;
+f1 f2 f3 f4
+0 ABC NULL NULL
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1;
+INSERT INTO v1 SET f1 = 1;
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+SELECT * from t1;
+f1 f2 f3 f4
+DELETE FROM t1;
+INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO';
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+SELECT * from t1;
+f1 f2 f3 f4
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1;
+SELECT * from t1;
+f1 f2 f3 f4
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2 WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2;
+SELECT * from t1;
+f1 f2 f3 f4
+2 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN' WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+f1 f2 f3 f4
+1 NNN -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1;
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC';
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO';
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET my_greeting = 'Hej';
+ERROR HY000: Column 'my_greeting' is not updatable
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 X
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+2 NNN -0.0012 X
+DELETE FROM t1;
+DROP TABLE t1;
+SET sql_mode = 'traditional';
+CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4) NOT NULL,
+f4 CHAR, PRIMARY KEY(f1));
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1;
+INSERT INTO v1 SET f1 = 1;
+ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default value
+SELECT * from t1;
+f1 f2 f3 f4
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+DELETE FROM v1 WHERE f1 = 1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+UPDATE v1 SET f4 = 'Y' WHERE f2 = 'ABC';
+SELECT * from t1;
+f1 f2 f3 f4
+1 ABC -0.0012 Y
+DELETE FROM t1;
+SET sql_mode = '';
+
+Testcases 3.3.2.7 - 3.3.2.9,
+3.3.2.10 - 3.3.2.11 omitted because of missing
+features EXCEPT and INTERSECT
+--------------------------------------------------------------------------------
+INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ;
+INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ;
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ;
+INSERT INTO t1 VALUES (19,41,32) ;
+INSERT INTO t1 VALUES (59,54,71) ;
+INSERT INTO t1 VALUES (21,91,99) ;
+SET @variant1 = 'UNION ';
+SET @variant2 = 'UNION ALL ';
+SET @variant3 = 'UNION DISTINCT ';
+SET @variant4 = 'EXCEPT ';
+SET @variant5 = 'INTERSECT ';
+CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION DISTINCT SELECT f61 FROM t1 WHERE f59=19;
+INSERT INTO v1 VALUES (3000);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1 ;
+CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION ALL SELECT f61 FROM t1 WHERE f59=19;
+INSERT INTO v1 VALUES (3000);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1 ;
+CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION SELECT f61 FROM t1 WHERE f59=19;
+INSERT INTO v1 VALUES (3000);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1 ;
+
+Testcases 3.3.2.12 - 3.3.2.20
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1, t2 ;
+DROP VIEW IF EXISTS test.v1 ;
+Drop view if exists v2 ;
+CREATE TABLE t1 (f59 int, f60 int, f61 int) ;
+INSERT INTO t1 VALUES (19,41,32) ;
+INSERT INTO t1 VALUES (59,54,71) ;
+INSERT INTO t1 VALUES (21,91,99) ;
+CREATE TABLE t2 (f59 int, f60 int, f61 int) ;
+INSERT INTO t2 VALUES (19,41,32) ;
+INSERT INTO t2 VALUES (59,54,71) ;
+INSERT INTO t2 VALUES (21,91,99) ;
+CREATE VIEW v2 AS SELECT f59, f60, f61 FROM t2 LIMIT 5;
+SET @variant1= 'CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1';
+SET @variant2= 'CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1';
+SET @variant3= 'CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1';
+SET @variant4= 'CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61';
+SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0';
+SET @variant6= 'CREATE VIEW v1 AS SELECT f61 FROM v2';
+SET @variant7= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
+SET @variant8= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1';
+CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f61 FROM v2;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: The target table v1 of the UPDATE is not updatable
+DELETE FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
+INSERT INTO v1 VALUES (1002);
+ERROR HY000: The target table v1 of the INSERT is not insertable-into
+UPDATE v1 SET f61=1007;
+ERROR HY000: Column 'f61' is not updatable
+DELETE FROM v1;
+DROP VIEW v1;
+Drop TABLE t1, t2 ;
+Drop VIEW v2 ;
+
+Testcases 3.3.A1
+--------------------------------------------------------------------------------
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+CREATE TABLE t1 (f1 BIGINT, f2 DATE DEFAULT NULL, f4 CHAR(5),
+report char(10)) ENGINE = myisam;
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 SET f1 = -1, f4 = 'ABC', report = 't1 0';
+INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(5) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(5) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5);
+INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
+INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
+ERROR 42S22: Unknown column 'f4x' in 'field list'
+INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4x char(5) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4x report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+SELECT * FROM v1 order by f1, report;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5);
+ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10);
+INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2';
+INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(10) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(10) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 --> t1 2
+2 NULL <-- 10 --> v1 2
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 --> t1 2
+2 NULL <-- 10 --> v1 2
+ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8);
+Warnings:
+Warning 1265 Data truncated for column 'f4' at row <some number>
+Warning 1265 Data truncated for column 'f4' at row <some number>
+INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3';
+Warnings:
+Warning 1265 Data truncated for column 'f4' at row 1
+INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3';
+Warnings:
+Warning 1265 Data truncated for column 'f4' at row 1
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(8) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 char(8) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20);
+INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4';
+INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 bigint(20) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
+INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
+f4 = '<------ 20 -------->', report = 't1 5';
+INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
+f4 = '<------ 20 -------->', report = 'v1 5';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ALTER TABLE t1 DROP COLUMN f2;
+INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6';
+INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6';
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+DESCRIBE v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM t1 order by f1, report;
+f1 f4 report
+-1 ABC t1 0
+-1 ABC v1 0
+0 ABC t1 1
+2 <-- 10 - t1 2
+2 <-- 10 - v1 2
+3 <-- 10 - t1 3
+3 <-- 10 - v1 3
+4 <------ 20 --------> t1 4
+4 <------ 20 --------> v1 4
+<------------- 30 -----------> <------ 20 --------> t1 5
+<------------- 30 -----------> <------ 20 --------> v1 5
+ABC <------ 20 --------> t1 6
+SELECT * FROM v1 order by f1, report;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL;
+INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04',
+f4 = '<------ 20 -------->', report = 't1 7';
+INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04',
+f4 = '<------ 20 -------->', report = 'v1 7';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+f2 date YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 date YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f4 report f2
+-1 ABC t1 0 NULL
+-1 ABC v1 0 NULL
+0 ABC t1 1 NULL
+2 <-- 10 - t1 2 NULL
+2 <-- 10 - v1 2 NULL
+3 <-- 10 - t1 3 NULL
+3 <-- 10 - v1 3 NULL
+4 <------ 20 --------> t1 4 NULL
+4 <------ 20 --------> v1 4 NULL
+<------------- 30 -----------> <------ 20 --------> t1 5 NULL
+<------------- 30 -----------> <------ 20 --------> v1 5 NULL
+ABC <------ 20 --------> t1 6 NULL
+ABC <------ 20 --------> t1 7 1500-12-04
+ABC <------ 20 --------> v1 7 1500-12-04
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ABC NULL <------ 20 --------> t1 6
+ABC 1500-12-04 <------ 20 --------> t1 7
+ABC 1500-12-04 <------ 20 --------> v1 7
+ALTER TABLE t1 DROP COLUMN f2;
+ALTER TABLE t1 ADD COLUMN f2 FLOAT;
+INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
+f4 = '<------ 20 -------->', report = 't1 8';
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+f4 = '<------ 20 -------->', report = 'v1 8';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+f2 float YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 float YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f4 report f2
+-1 ABC t1 0 NULL
+-1 ABC v1 0 NULL
+0 ABC t1 1 NULL
+2 <-- 10 - t1 2 NULL
+2 <-- 10 - v1 2 NULL
+3 <-- 10 - t1 3 NULL
+3 <-- 10 - v1 3 NULL
+4 <------ 20 --------> t1 4 NULL
+4 <------ 20 --------> v1 4 NULL
+<------------- 30 -----------> <------ 20 --------> t1 5 NULL
+<------------- 30 -----------> <------ 20 --------> v1 5 NULL
+ABC <------ 20 --------> t1 6 NULL
+ABC <------ 20 --------> t1 7 NULL
+ABC <------ 20 --------> t1 8 -0.00033
+ABC <------ 20 --------> v1 7 NULL
+ABC <------ 20 --------> v1 8 -0.00033
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ABC NULL <------ 20 --------> t1 6
+ABC NULL <------ 20 --------> t1 7
+ABC -0.00033 <------ 20 --------> t1 8
+ABC NULL <------ 20 --------> v1 7
+ABC -0.00033 <------ 20 --------> v1 8
+ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2);
+INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
+f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
+ERROR 42S22: Unknown column 'f3' in 'field list'
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+f4 = '<------ 20 -------->', report = 'v1 9a';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+f2 float YES NULL
+f3 decimal(7,2) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 varchar(30) YES NULL
+f2 float YES NULL
+f4 varchar(20) YES NULL
+report char(10) YES NULL
+SELECT * FROM t1 order by f1, report;
+f1 f4 report f2 f3
+-1 ABC t1 0 NULL NULL
+-1 ABC v1 0 NULL NULL
+0 ABC t1 1 NULL NULL
+2 <-- 10 - t1 2 NULL NULL
+2 <-- 10 - v1 2 NULL NULL
+3 <-- 10 - t1 3 NULL NULL
+3 <-- 10 - v1 3 NULL NULL
+4 <------ 20 --------> t1 4 NULL NULL
+4 <------ 20 --------> v1 4 NULL NULL
+<------------- 30 -----------> <------ 20 --------> t1 5 NULL NULL
+<------------- 30 -----------> <------ 20 --------> v1 5 NULL NULL
+ABC <------ 20 --------> t1 6 NULL NULL
+ABC <------ 20 --------> t1 7 NULL NULL
+ABC <------ 20 --------> t1 8 -0.00033 NULL
+ABC <------ 20 --------> t1 9 -0.00033 -2.20
+ABC <------ 20 --------> v1 7 NULL NULL
+ABC <------ 20 --------> v1 8 -0.00033 NULL
+ABC <------ 20 --------> v1 9a -0.00033 NULL
+SELECT * FROM v1 order by f1, report;
+f1 f2 f4 report
+-1 NULL ABC t1 0
+-1 NULL ABC v1 0
+0 NULL ABC t1 1
+2 NULL <-- 10 - t1 2
+2 NULL <-- 10 - v1 2
+3 NULL <-- 10 - t1 3
+3 NULL <-- 10 - v1 3
+4 NULL <------ 20 --------> t1 4
+4 NULL <------ 20 --------> v1 4
+<------------- 30 -----------> NULL <------ 20 --------> t1 5
+<------------- 30 -----------> NULL <------ 20 --------> v1 5
+ABC NULL <------ 20 --------> t1 6
+ABC NULL <------ 20 --------> t1 7
+ABC -0.00033 <------ 20 --------> t1 8
+ABC -0.00033 <------ 20 --------> t1 9
+ABC NULL <------ 20 --------> v1 7
+ABC -0.00033 <------ 20 --------> v1 8
+ABC -0.00033 <------ 20 --------> v1 9a
+DROP TABLE t1;
+DROP VIEW v1;
+CREATE TABLE t1 (f1 CHAR(10), f2 BIGINT) ENGINE = myisam;
+INSERT INTO t1 SET f1 = 'ABC', f2 = 3;
+CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+f2 bigint(20) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+my_sqrt double YES NULL
+SELECT * FROM t1 order by f1, f2;
+f1 f2
+ABC 3
+SELECT * FROM v1 order by 2;
+f1 my_sqrt
+ABC 1.7320508075688772
+ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30);
+INSERT INTO t1 SET f1 = 'ABC', f2 = 'DEF';
+DESCRIBE t1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+f2 varchar(30) YES NULL
+DESCRIBE v1;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+my_sqrt double YES NULL
+SELECT * FROM t1 order by f1, f2;
+f1 f2
+ABC 3
+ABC DEF
+SELECT * FROM v1 order by 2;
+f1 my_sqrt
+ABC 0
+ABC 1.7320508075688772
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT SQRT('DEF');
+SQRT('DEF')
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+CREATE VIEW v2 AS SELECT SQRT('DEF');
+SELECT * FROM v2 order by 1;
+SQRT('DEF')
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+DESCRIBE v2;
+Field Type Null Key Default Extra
+f1 char(10) YES NULL
+my_sqrt double YES NULL
+SELECT * FROM v2 order by 2;
+f1 my_sqrt
+ABC 0
+ABC 1.7320508075688772
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT * FROM t2 order by 2;
+f1 ABC
+my_sqrt 0
+f1 ABC
+my_sqrt 1.7320508075688772
+DROP TABLE t2;
+CREATE TABLE t2 AS SELECT * FROM v1;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT * FROM t2 order by 2;
+f1 ABC
+my_sqrt 0
+f1 ABC
+my_sqrt 1.7320508075688772
+DROP TABLE t2;
+CREATE TABLE t2 AS SELECT * FROM v2;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
+SELECT * FROM t2 order by 2;
+f1 ABC
+my_sqrt 0
+f1 ABC
+my_sqrt 1.7320508075688772
+DROP TABLE t1;
+DROP TABLE t2;
+DROP VIEW v1;
+DROP VIEW v2;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v1_1;
+DROP VIEW IF EXISTS v1_2;
+DROP VIEW IF EXISTS v1_firstview;
+DROP VIEW IF EXISTS v1_secondview;
+DROP VIEW IF EXISTS v2;
+DROP DATABASE IF EXISTS test2;
+DROP DATABASE IF EXISTS test3;
+DROP DATABASE test1;
+DROP TABLE test.tb2;
diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
new file mode 100644
index 00000000..2bba1c06
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
@@ -0,0 +1,547 @@
+USE information_schema;
+####################################################################################
+1 Prepare test.
+connection default (user=root)
+####################################################################################
+####################################################################################
+1.1 Create two user
+####################################################################################
+DROP USER ddicttestuser1@'localhost';
+DROP USER ddicttestuser2@'localhost';
+CREATE USER ddicttestuser1@'localhost';
+CREATE USER ddicttestuser2@'localhost';
+GRANT SELECT,UPDATE,DELETE,INSERT,CREATE,CREATE TEMPORARY TABLES,CREATE VIEW,DROP on test.* to ddicttestuser1@'localhost';
+GRANT SELECT,UPDATE,DELETE,INSERT,CREATE,CREATE TEMPORARY TABLES,CREATE VIEW,DROP on test.* to ddicttestuser2@'localhost';
+SET PASSWORD FOR ddicttestuser1@'localhost' = PASSWORD('ddictpass');
+SET PASSWORD FOR ddicttestuser2@'localhost' = PASSWORD('ddictpass');
+####################################################################################
+1.2 Establish connection con100 (user=ddicttestuser1 with no PROCESS privilege):
+connect con100,localhost,ddicttestuser1,ddictpass,information_schema;
+####################################################################################
+####################################################################################
+2 connection default(user=root with default privileges):
+SHOW/SELECT shows all processes/threads.
+####################################################################################
+connection default;
+SHOW CREATE TABLE processlist;
+Table Create Table
+PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
+ `ID` bigint(4) NOT NULL,
+ `USER` varchar(128) NOT NULL,
+ `HOST` varchar(64) NOT NULL,
+ `DB` varchar(64),
+ `COMMAND` varchar(16) NOT NULL,
+ `TIME` int(7) NOT NULL,
+ `STATE` varchar(64),
+ `INFO` longtext,
+ `TIME_MS` decimal(22,3) NOT NULL,
+ `STAGE` tinyint(2) NOT NULL,
+ `MAX_STAGE` tinyint(2) NOT NULL,
+ `PROGRESS` decimal(7,3) NOT NULL,
+ `MEMORY_USED` bigint(7) NOT NULL,
+ `MAX_MEMORY_USED` bigint(7) NOT NULL,
+ `EXAMINED_ROWS` int(7) NOT NULL,
+ `QUERY_ID` bigint(4) NOT NULL,
+ `INFO_BINARY` blob,
+ `TID` bigint(4) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+SELECT * FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID root HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
+ID root HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL
+CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
+UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
+INSERT INTO processlist SELECT * FROM test.t_processlist;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE test.t_processlist;
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY) AS SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist WITH CHECK OPTION;
+ERROR HY000: CHECK OPTION on non-updatable view `test`.`v_processlist`
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY) AS SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist;
+DROP VIEW test.v_processlist;
+UPDATE processlist SET user='any_user' WHERE id=1 ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM processlist WHERE id=1 ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+REVOKE ALL ON processlist FROM current_user;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT INSERT,UPDATE ON processlist TO current_user;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+SHOW GRANTS;
+Grants for root@localhost
+GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
+GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+CREATE INDEX i_processlist ON processlist (user);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE processlist;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE processlist DROP COLUMN user;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE processlist ADD COLUMN (my_column INT);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+RENAME TABLE processlist TO new_processlist;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+RENAME TABLE processlist TO files;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE new_processlist AS SELECT * FROM processlist;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE information_schema;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+RENAME DATABASE information_schema TO info_schema;
+ERROR 42000: 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 'DATABASE information_schema TO info_schema' at line 1
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+####################################################################################
+3 Switch to connection con100 (user=ddicttestuser1 with no PROCESS privilege):
+connection con100;
+SHOW/SELECT shows only the processes (1) of the user.
+####################################################################################
+SHOW CREATE TABLE processlist;
+Table Create Table
+PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
+ `ID` bigint(4) NOT NULL,
+ `USER` varchar(128) NOT NULL,
+ `HOST` varchar(64) NOT NULL,
+ `DB` varchar(64),
+ `COMMAND` varchar(16) NOT NULL,
+ `TIME` int(7) NOT NULL,
+ `STATE` varchar(64),
+ `INFO` longtext,
+ `TIME_MS` decimal(22,3) NOT NULL,
+ `STAGE` tinyint(2) NOT NULL,
+ `MAX_STAGE` tinyint(2) NOT NULL,
+ `PROGRESS` decimal(7,3) NOT NULL,
+ `MEMORY_USED` bigint(7) NOT NULL,
+ `MAX_MEMORY_USED` bigint(7) NOT NULL,
+ `EXAMINED_ROWS` int(7) NOT NULL,
+ `QUERY_ID` bigint(4) NOT NULL,
+ `INFO_BINARY` blob,
+ `TID` bigint(4) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
+SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
+CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
+UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
+INSERT INTO processlist SELECT * FROM test.t_processlist;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+DROP TABLE test.t_processlist;
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY) AS SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist WITH CHECK OPTION;
+ERROR HY000: CHECK OPTION on non-updatable view `test`.`v_processlist`
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY) AS SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist;
+DROP VIEW test.v_processlist;
+UPDATE processlist SET user='any_user' WHERE id=1 ;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+DELETE FROM processlist WHERE id=1 ;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+REVOKE ALL ON processlist FROM current_user;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+GRANT INSERT,UPDATE ON processlist TO current_user;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+SHOW GRANTS;
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+CREATE INDEX i_processlist ON processlist (user);
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+DROP TABLE processlist;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+ALTER TABLE processlist DROP COLUMN user;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+ALTER TABLE processlist ADD COLUMN (my_column INT);
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+RENAME TABLE processlist TO new_processlist;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+RENAME TABLE processlist TO files;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+CREATE TABLE new_processlist AS SELECT * FROM processlist;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+DROP DATABASE information_schema;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+RENAME DATABASE information_schema TO info_schema;
+ERROR 42000: 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 'DATABASE information_schema TO info_schema' at line 1
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+####################################################################################
+4 Grant PROCESS privilege to ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+GRANT PROCESS ON *.* TO ddicttestuser1@'localhost' IDENTIFIED BY 'ddictpass';
+####################################################################################
+4.1 Existing connection con100 (ddicttestuser1)
+The user ddicttestuser1 has the PROCESS privilege, but the connection was
+established before PROCESS was granted.
+SHOW/SELECT shows only the processes (1) of the user.
+####################################################################################
+connection con100;
+SHOW GRANTS;
+Grants for ddicttestuser1@localhost
+GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+####################################################################################
+4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
+SHOW/SELECT shows all processes/threads.
+####################################################################################
+connect con101,localhost,ddicttestuser1,ddictpass,information_schema;
+SHOW GRANTS;
+Grants for ddicttestuser1@localhost
+GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+5 Grant PROCESS privilege to anonymous user.
+connection default (user=root)
+####################################################################################
+connection default;
+create user ''@'localhost';
+GRANT PROCESS ON *.* TO ''@'localhost';
+####################################################################################
+5.1 Establish connection (anonymous1,localhost,'',,information_schema)
+anonymous user with PROCESS privilege
+SHOW/SELECT shows all processes/threads.
+####################################################################################
+connect anonymous1,localhost,"''",,information_schema;
+SHOW GRANTS;
+Grants for @localhost
+GRANT PROCESS ON *.* TO ``@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+6 Revoke PROCESS privilege from ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE PROCESS ON *.* FROM ddicttestuser1@'localhost';
+####################################################################################
+6.1 New connection con102 (ddicttestuser1 has no more PROCESS privilege)
+connect con102,localhost,ddicttestuser1,ddictpass,information_schema;
+Again (compared to state before GRANT PROCESS) only the processes of
+ddicttestuser1 are visible.
+####################################################################################
+SHOW GRANTS;
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+7 Revoke PROCESS privilege from anonymous user
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE PROCESS ON *.* FROM ''@'localhost';
+####################################################################################
+7.1 New connection (anonymous2,localhost,'',,information_schema)
+connect anonymous2,localhost,"''",,information_schema;
+The anonymous user has no more the PROCESS privilege
+Again only the processes of the anonymous user are visible.
+####################################################################################
+SHOW GRANTS FOR ''@'localhost';
+Grants for @localhost
+GRANT USAGE ON *.* TO ``@`localhost`
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost';
+####################################################################################
+8.1 New connection con103 (ddicttestuser1 with SUPER privilege)
+connect con103,localhost,ddicttestuser1,ddictpass,information_schema;
+Only the processes of ddicttestuser1 user are visible.
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+9 Revoke SUPER privilege from user ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE SUPER ON *.* FROM 'ddicttestuser1'@'localhost';
+####################################################################################
+9.1 New connection con104 (ddicttestuser1 without SUPER privilege)
+connect con104,localhost,ddicttestuser1,ddictpass,information_schema;
+ddicttestuser1 has no more the SUPER privilege.
+Only the processes of ddicttestuser1 are visible.
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+10 Grant SUPER privilege with grant option to user ddicttestuser1.
+connection default (user=root)
+####################################################################################
+connection default;
+GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost' WITH GRANT OPTION;
+####################################################################################
+10.1 New connection con105 (ddicttestuser1 with SUPER privilege and GRANT OPTION)
+connect con105,localhost,ddicttestuser1,ddictpass,information_schema;
+Try to grant PROCESS privilege to user ddicttestuser2 without having it.
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES)
+####################################################################################
+10.2 Grant SUPER and PROCESS privilege with grant option to user ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+GRANT SUPER,PROCESS ON *.* TO 'ddicttestuser1'@'localhost' WITH GRANT OPTION;
+####################################################################################
+10.3 New connection con106 (ddicttestuser1 with SUPER,PROCESS WITH GRANT OPTION)
+connect con106,localhost,ddicttestuser1,ddictpass,information_schema;
+Grant PROCESS privilege to user ddicttestuser2
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT PROCESS, SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+####################################################################################
+10.4 New connection con200 (ddicttestuser2 with PROCESS privilege)
+connect con200,localhost,ddicttestuser2,ddictpass,information_schema;
+ddicttestuser2 has now the PROCESS privilege and sees all connections
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
+Grants for ddicttestuser2@localhost
+GRANT PROCESS ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser2`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
+connection ddicttestuser1;
+####################################################################################
+connection con106;
+REVOKE PROCESS ON *.* FROM 'ddicttestuser2'@'localhost';
+####################################################################################
+11.1 New connection con201 (ddicttestuser2)
+connect con201,localhost,ddicttestuser2,ddictpass,information_schema;
+ddicttestuser2 has no more the PROCESS privilege and can only see own connects
+####################################################################################
+SHOW GRANTS;
+Grants for ddicttestuser2@localhost
+GRANT USAGE ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser2`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE SUPER,PROCESS,GRANT OPTION ON *.* FROM 'ddicttestuser1'@'localhost';
+####################################################################################
+11.3 New connection con107 (ddicttestuser1)
+connect con107,localhost,ddicttestuser1,ddictpass,information_schema;
+ddicttestuser1 has no more the PROCESS privilege and can only see own connects
+He is also unable to GRANT the PROCESS privilege to ddicttestuser2
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES)
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+12 Revoke the SELECT privilege from user ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE SELECT ON *.* FROM 'ddicttestuser1'@'localhost';
+####################################################################################
+12.1 New connection con108 (ddicttestuser1)
+connect con108,localhost,ddicttestuser1,ddictpass,information_schema;
+ddicttestuser1 has neither PROCESS nor SELECT privilege
+Manual says: Each MySQL user has the right to access these tables, but can see
+only the rows ...
+Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST.
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE SELECT ON information_schema.* FROM 'ddicttestuser3'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+####################################################################################
+connection default (user=root)
+Cleanup: close connections, DROP USER etc.
+####################################################################################
+connection default;
+disconnect con100;
+disconnect con101;
+disconnect con102;
+disconnect con103;
+disconnect con104;
+disconnect con105;
+disconnect con106;
+disconnect con107;
+disconnect con108;
+disconnect con200;
+disconnect con201;
+disconnect anonymous1;
+disconnect anonymous2;
+DROP USER ddicttestuser1@'localhost';
+DROP USER ddicttestuser2@'localhost';
+REVOKE USAGE ON *.* FROM ''@'localhost';
+DROP USER ''@'localhost';
diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
new file mode 100644
index 00000000..94bc1544
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
@@ -0,0 +1,547 @@
+USE information_schema;
+####################################################################################
+1 Prepare test.
+connection default (user=root)
+####################################################################################
+####################################################################################
+1.1 Create two user
+####################################################################################
+DROP USER ddicttestuser1@'localhost';
+DROP USER ddicttestuser2@'localhost';
+CREATE USER ddicttestuser1@'localhost';
+CREATE USER ddicttestuser2@'localhost';
+GRANT SELECT,UPDATE,DELETE,INSERT,CREATE,CREATE TEMPORARY TABLES,CREATE VIEW,DROP on test.* to ddicttestuser1@'localhost';
+GRANT SELECT,UPDATE,DELETE,INSERT,CREATE,CREATE TEMPORARY TABLES,CREATE VIEW,DROP on test.* to ddicttestuser2@'localhost';
+SET PASSWORD FOR ddicttestuser1@'localhost' = PASSWORD('ddictpass');
+SET PASSWORD FOR ddicttestuser2@'localhost' = PASSWORD('ddictpass');
+####################################################################################
+1.2 Establish connection con100 (user=ddicttestuser1 with no PROCESS privilege):
+connect con100,localhost,ddicttestuser1,ddictpass,information_schema;
+####################################################################################
+####################################################################################
+2 connection default(user=root with default privileges):
+SHOW/SELECT shows all processes/threads.
+####################################################################################
+connection default;
+SHOW CREATE TABLE processlist;
+Table Create Table
+PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
+ `ID` bigint(4) NOT NULL,
+ `USER` varchar(128) NOT NULL,
+ `HOST` varchar(64) NOT NULL,
+ `DB` varchar(64),
+ `COMMAND` varchar(16) NOT NULL,
+ `TIME` int(7) NOT NULL,
+ `STATE` varchar(64),
+ `INFO` longtext,
+ `TIME_MS` decimal(22,3) NOT NULL,
+ `STAGE` tinyint(2) NOT NULL,
+ `MAX_STAGE` tinyint(2) NOT NULL,
+ `PROGRESS` decimal(7,3) NOT NULL,
+ `MEMORY_USED` bigint(7) NOT NULL,
+ `MAX_MEMORY_USED` bigint(7) NOT NULL,
+ `EXAMINED_ROWS` int(7) NOT NULL,
+ `QUERY_ID` bigint(4) NOT NULL,
+ `INFO_BINARY` blob,
+ `TID` bigint(4) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+SELECT * FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
+ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL
+CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
+UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
+INSERT INTO processlist SELECT * FROM test.t_processlist;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE test.t_processlist;
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY) AS SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist WITH CHECK OPTION;
+ERROR HY000: CHECK OPTION on non-updatable view `test`.`v_processlist`
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY) AS SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist;
+DROP VIEW test.v_processlist;
+UPDATE processlist SET user='any_user' WHERE id=1 ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DELETE FROM processlist WHERE id=1 ;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+REVOKE ALL ON processlist FROM current_user;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+GRANT INSERT,UPDATE ON processlist TO current_user;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+SHOW GRANTS;
+Grants for root@localhost
+GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
+GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+CREATE INDEX i_processlist ON processlist (user);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP TABLE processlist;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE processlist DROP COLUMN user;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ALTER TABLE processlist ADD COLUMN (my_column INT);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+RENAME TABLE processlist TO new_processlist;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+RENAME TABLE processlist TO files;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+CREATE TABLE new_processlist AS SELECT * FROM processlist;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+DROP DATABASE information_schema;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+RENAME DATABASE information_schema TO info_schema;
+ERROR 42000: 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 'DATABASE information_schema TO info_schema' at line 1
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+####################################################################################
+3 Switch to connection con100 (user=ddicttestuser1 with no PROCESS privilege):
+connection con100;
+SHOW/SELECT shows only the processes (1) of the user.
+####################################################################################
+SHOW CREATE TABLE processlist;
+Table Create Table
+PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
+ `ID` bigint(4) NOT NULL,
+ `USER` varchar(128) NOT NULL,
+ `HOST` varchar(64) NOT NULL,
+ `DB` varchar(64),
+ `COMMAND` varchar(16) NOT NULL,
+ `TIME` int(7) NOT NULL,
+ `STATE` varchar(64),
+ `INFO` longtext,
+ `TIME_MS` decimal(22,3) NOT NULL,
+ `STAGE` tinyint(2) NOT NULL,
+ `MAX_STAGE` tinyint(2) NOT NULL,
+ `PROGRESS` decimal(7,3) NOT NULL,
+ `MEMORY_USED` bigint(7) NOT NULL,
+ `MAX_MEMORY_USED` bigint(7) NOT NULL,
+ `EXAMINED_ROWS` int(7) NOT NULL,
+ `QUERY_ID` bigint(4) NOT NULL,
+ `INFO_BINARY` blob,
+ `TID` bigint(4) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
+SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
+CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
+UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
+INSERT INTO processlist SELECT * FROM test.t_processlist;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+DROP TABLE test.t_processlist;
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY) AS SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist WITH CHECK OPTION;
+ERROR HY000: CHECK OPTION on non-updatable view `test`.`v_processlist`
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY) AS SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist;
+DROP VIEW test.v_processlist;
+UPDATE processlist SET user='any_user' WHERE id=1 ;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+DELETE FROM processlist WHERE id=1 ;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+REVOKE ALL ON processlist FROM current_user;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+GRANT INSERT,UPDATE ON processlist TO current_user;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+SHOW GRANTS;
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+CREATE INDEX i_processlist ON processlist (user);
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+DROP TABLE processlist;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+ALTER TABLE processlist DROP COLUMN user;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+ALTER TABLE processlist ADD COLUMN (my_column INT);
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+RENAME TABLE processlist TO new_processlist;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+RENAME TABLE processlist TO files;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+CREATE TABLE new_processlist AS SELECT * FROM processlist;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+DROP DATABASE information_schema;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+RENAME DATABASE information_schema TO info_schema;
+ERROR 42000: 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 'DATABASE information_schema TO info_schema' at line 1
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
+####################################################################################
+4 Grant PROCESS privilege to ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+GRANT PROCESS ON *.* TO ddicttestuser1@'localhost' IDENTIFIED BY 'ddictpass';
+####################################################################################
+4.1 Existing connection con100 (ddicttestuser1)
+The user ddicttestuser1 has the PROCESS privilege, but the connection was
+established before PROCESS was granted.
+SHOW/SELECT shows only the processes (1) of the user.
+####################################################################################
+connection con100;
+SHOW GRANTS;
+Grants for ddicttestuser1@localhost
+GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+####################################################################################
+4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
+SHOW/SELECT shows all processes/threads.
+####################################################################################
+connect con101,localhost,ddicttestuser1,ddictpass,information_schema;
+SHOW GRANTS;
+Grants for ddicttestuser1@localhost
+GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+5 Grant PROCESS privilege to anonymous user.
+connection default (user=root)
+####################################################################################
+connection default;
+create user ''@'localhost';
+GRANT PROCESS ON *.* TO ''@'localhost';
+####################################################################################
+5.1 Establish connection (anonymous1,localhost,'',,information_schema)
+anonymous user with PROCESS privilege
+SHOW/SELECT shows all processes/threads.
+####################################################################################
+connect anonymous1,localhost,"''",,information_schema;
+SHOW GRANTS;
+Grants for @localhost
+GRANT PROCESS ON *.* TO ``@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+6 Revoke PROCESS privilege from ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE PROCESS ON *.* FROM ddicttestuser1@'localhost';
+####################################################################################
+6.1 New connection con102 (ddicttestuser1 has no more PROCESS privilege)
+connect con102,localhost,ddicttestuser1,ddictpass,information_schema;
+Again (compared to state before GRANT PROCESS) only the processes of
+ddicttestuser1 are visible.
+####################################################################################
+SHOW GRANTS;
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+7 Revoke PROCESS privilege from anonymous user
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE PROCESS ON *.* FROM ''@'localhost';
+####################################################################################
+7.1 New connection (anonymous2,localhost,'',,information_schema)
+connect anonymous2,localhost,"''",,information_schema;
+The anonymous user has no more the PROCESS privilege
+Again only the processes of the anonymous user are visible.
+####################################################################################
+SHOW GRANTS FOR ''@'localhost';
+Grants for @localhost
+GRANT USAGE ON *.* TO ``@`localhost`
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost';
+####################################################################################
+8.1 New connection con103 (ddicttestuser1 with SUPER privilege)
+connect con103,localhost,ddicttestuser1,ddictpass,information_schema;
+Only the processes of ddicttestuser1 user are visible.
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+9 Revoke SUPER privilege from user ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE SUPER ON *.* FROM 'ddicttestuser1'@'localhost';
+####################################################################################
+9.1 New connection con104 (ddicttestuser1 without SUPER privilege)
+connect con104,localhost,ddicttestuser1,ddictpass,information_schema;
+ddicttestuser1 has no more the SUPER privilege.
+Only the processes of ddicttestuser1 are visible.
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+10 Grant SUPER privilege with grant option to user ddicttestuser1.
+connection default (user=root)
+####################################################################################
+connection default;
+GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost' WITH GRANT OPTION;
+####################################################################################
+10.1 New connection con105 (ddicttestuser1 with SUPER privilege and GRANT OPTION)
+connect con105,localhost,ddicttestuser1,ddictpass,information_schema;
+Try to grant PROCESS privilege to user ddicttestuser2 without having it.
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES)
+####################################################################################
+10.2 Grant SUPER and PROCESS privilege with grant option to user ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+GRANT SUPER,PROCESS ON *.* TO 'ddicttestuser1'@'localhost' WITH GRANT OPTION;
+####################################################################################
+10.3 New connection con106 (ddicttestuser1 with SUPER,PROCESS WITH GRANT OPTION)
+connect con106,localhost,ddicttestuser1,ddictpass,information_schema;
+Grant PROCESS privilege to user ddicttestuser2
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT PROCESS, SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+####################################################################################
+10.4 New connection con200 (ddicttestuser2 with PROCESS privilege)
+connect con200,localhost,ddicttestuser2,ddictpass,information_schema;
+ddicttestuser2 has now the PROCESS privilege and sees all connections
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
+Grants for ddicttestuser2@localhost
+GRANT PROCESS ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser2`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
+connection ddicttestuser1;
+####################################################################################
+connection con106;
+REVOKE PROCESS ON *.* FROM 'ddicttestuser2'@'localhost';
+####################################################################################
+11.1 New connection con201 (ddicttestuser2)
+connect con201,localhost,ddicttestuser2,ddictpass,information_schema;
+ddicttestuser2 has no more the PROCESS privilege and can only see own connects
+####################################################################################
+SHOW GRANTS;
+Grants for ddicttestuser2@localhost
+GRANT USAGE ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser2`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE SUPER,PROCESS,GRANT OPTION ON *.* FROM 'ddicttestuser1'@'localhost';
+####################################################################################
+11.3 New connection con107 (ddicttestuser1)
+connect con107,localhost,ddicttestuser1,ddictpass,information_schema;
+ddicttestuser1 has no more the PROCESS privilege and can only see own connects
+He is also unable to GRANT the PROCESS privilege to ddicttestuser2
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES)
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+12 Revoke the SELECT privilege from user ddicttestuser1
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE SELECT ON *.* FROM 'ddicttestuser1'@'localhost';
+####################################################################################
+12.1 New connection con108 (ddicttestuser1)
+connect con108,localhost,ddicttestuser1,ddictpass,information_schema;
+ddicttestuser1 has neither PROCESS nor SELECT privilege
+Manual says: Each MySQL user has the right to access these tables, but can see
+only the rows ...
+Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST.
+####################################################################################
+SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+Grants for ddicttestuser1@localhost
+GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE TEMPORARY TABLES, CREATE VIEW ON `test`.* TO `ddicttestuser1`@`localhost`
+SHOW processlist;
+Id User Host db Command Time State Info Progress
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
+SELECT * FROM information_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
+####################################################################################
+12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
+connection default (user=root)
+####################################################################################
+connection default;
+REVOKE SELECT ON information_schema.* FROM 'ddicttestuser3'@'localhost';
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+####################################################################################
+connection default (user=root)
+Cleanup: close connections, DROP USER etc.
+####################################################################################
+connection default;
+disconnect con100;
+disconnect con101;
+disconnect con102;
+disconnect con103;
+disconnect con104;
+disconnect con105;
+disconnect con106;
+disconnect con107;
+disconnect con108;
+disconnect con200;
+disconnect con201;
+disconnect anonymous1;
+disconnect anonymous2;
+DROP USER ddicttestuser1@'localhost';
+DROP USER ddicttestuser2@'localhost';
+REVOKE USAGE ON *.* FROM ''@'localhost';
+DROP USER ''@'localhost';
diff --git a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
new file mode 100644
index 00000000..dba8de65
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
@@ -0,0 +1,250 @@
+DROP USER test_user@'localhost';
+CREATE USER test_user@'localhost';
+GRANT ALL ON *.* TO test_user@'localhost';
+REVOKE PROCESS ON *.* FROM test_user@'localhost';
+SET PASSWORD FOR test_user@'localhost' = PASSWORD('ddictpass');
+DROP TABLE IF EXISTS test.t1;
+CREATE TABLE test.t1 (f1 BIGINT);
+USE test;
+# Show the definition of the PROCESSLIST table
+#--------------------------------------------------------------------------
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST;
+Table Create Table
+PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
+ `ID` bigint(4) NOT NULL,
+ `USER` varchar(128) NOT NULL,
+ `HOST` varchar(64) NOT NULL,
+ `DB` varchar(64),
+ `COMMAND` varchar(16) NOT NULL,
+ `TIME` int(7) NOT NULL,
+ `STATE` varchar(64),
+ `INFO` longtext,
+ `TIME_MS` decimal(22,3) NOT NULL,
+ `STAGE` tinyint(2) NOT NULL,
+ `MAX_STAGE` tinyint(2) NOT NULL,
+ `PROGRESS` decimal(7,3) NOT NULL,
+ `MEMORY_USED` bigint(7) NOT NULL,
+ `MAX_MEMORY_USED` bigint(7) NOT NULL,
+ `EXAMINED_ROWS` int(7) NOT NULL,
+ `QUERY_ID` bigint(4) NOT NULL,
+ `INFO_BINARY` blob,
+ `TID` bigint(4) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+# Ensure that the information about the own connection is correct.
+#--------------------------------------------------------------------------
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> root <HOST_NAME> test Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> test Query <TIME> starting SHOW FULL PROCESSLIST <TIME_MS>
+SET @default_id = CONNECTION_ID();
+SELECT COUNT(*) = 1 AS "Expect exact one connection with this id"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id;
+Expect exact one connection with this id
+1
+SELECT COUNT(*) = 1 AS "Expect 1"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id
+AND USER = 'root' AND DB = 'test' AND Command IN('Query','Execute')
+AND State = 'Filling schema table';
+Expect 1
+1
+USE information_schema;
+SELECT COUNT(*) = 1 AS "Is the DB correct?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id AND DB = 'information_schema';
+Is the DB correct?
+1
+SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id;
+@my_info := INFO
+SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id
+SELECT @my_info = 'SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id'
+ AS 'Is the content of PROCESSLIST.INFO correct?';
+Is the content of PROCESSLIST.INFO correct?
+1
+SELECT COUNT(*) = 1 AS "Has TIME a reasonable value?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id AND 0 <= TIME < 10 AND 0 <= TIME_MS < 10000;
+Has TIME a reasonable value?
+1
+# Ensure that the information about an inactive connection is correct.
+#--------------------------------------------------------------------------
+
+connect con1,localhost,test_user,ddictpass,information_schema;
+connection default;
+# Poll till the connection con1 is in state COMMAND = 'Sleep'.
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> <STATE> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+<ID> root <HOST_NAME> information_schema Query <TIME> <STATE> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
+SELECT ID,TIME INTO @test_user_con1_id,@time FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE COMMAND = 'Sleep' AND USER = 'test_user';
+SELECT @test_user_con1_id = @default_id + 1
+AS "Did we got the next higher PROCESSLIST ID?";
+Did we got the next higher PROCESSLIST ID?
+1
+SELECT 0 <= @time < 10 AS "Has TIME a reasonable value?";
+Has TIME a reasonable value?
+1
+SELECT COUNT(*) = 2 AS "Is HOST LIKE 'localhost%'?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE HOST LIKE 'localhost%';
+Is HOST LIKE 'localhost%'?
+1
+SELECT COUNT(*) = 1 AS "Expect 1"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @test_user_con1_id
+AND USER = 'test_user' AND DB = 'information_schema'
+ AND Command = 'Sleep' AND State = '' AND INFO IS NULL;
+Expect 1
+1
+# Ensure that the user test_user sees only connections with his username
+# because he has not the PROCESS privilege.
+#----------------------------------------------------------------------------
+
+connection con1;
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> test_user <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
+# Ensure that the user test_user sees all connections with his username.
+#----------------------------------------------------------------------------
+
+connect con2,localhost,test_user,ddictpass,information_schema;
+connection default;
+# Poll till all connections of 'test_user' are in a state with COMMAND = 'Sleep'
+
+connection con2;
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
+<ID> test_user <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
+connection default;
+SELECT ID INTO @test_user_con2_id FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID <> @test_user_con1_id
+AND USER = 'test_user' AND DB = 'information_schema';
+# Ensure we get correct information about a connection during work
+#----------------------------------------------------------------------------
+
+connection con2;
+# Send a long enough running statement to the server, but do not
+# wait till the result comes back.
+
+SELECT sleep(10), 17;
+connection default;
+# Poll till connection con2 is in state 'User sleep'.
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17 <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT sleep(10), 17 <TID>
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+<ID> root <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
+<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17 0.000
+SELECT STATE, TIME, INFO INTO @state, @time, @info
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @test_user_con2_id;
+SELECT 0 <= @time < 10 AS "Has TIME a reasonable value?";
+Has TIME a reasonable value?
+1
+SELECT @state = 'User sleep' AS "Has STATE the expected value?";
+Has STATE the expected value?
+1
+SELECT @info = 'SELECT sleep(10), 17' AS "Has INFO the expected value?";
+Has INFO the expected value?
+1
+connection con2;
+# Pull("reap") the result set from the statement executed with "send".
+
+sleep(10) 17
+0 17
+connection default;
+# Poll till all connections of 'test_user' are in a state with COMMAND = 'Sleep'
+
+# Ensure that we see that a connection "hangs" when colliding with a
+# WRITE TABLE LOCK
+#----------------------------------------------------------------------------
+
+LOCK TABLE test.t1 WRITE;
+connection con2;
+# Send a statement to the server, but do not wait till the result
+# comes back. We will pull this later.
+
+SELECT COUNT(*) FROM test.t1;
+connection default;
+# Poll till INFO is no more NULL and State = 'Waiting for table metadata lock'.
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Query <TIME> Waiting for table metadata lock SELECT COUNT(*) FROM test.t1 <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT COUNT(*) FROM test.t1 <TID>
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+<ID> root <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+UNLOCK TABLES;
+connection con2;
+# Pull("reap") the result set from the statement executed with "send".
+
+COUNT(*)
+0
+# Ensure that SHOW/SELECT processlist can handle extreme long commands
+#----------------------------------------------------------------------------
+
+connection default;
+LOCK TABLE test.t1 WRITE;
+connection con2;
+# Send a long (~20 KB code) statement to the server, but do not wait
+# till the result comes back. We will pull this later.
+
+SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1;
+connection default;
+# Poll till INFO is no more NULL and State = 'Waiting for table metadata lock'.
+
+# Expect result:
+# Statement Content of INFO
+# SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST Complete statement
+# SHOW FULL PROCESSLIST Complete statement
+# SHOW PROCESSLIST statement truncated after 100 char
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1 <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1 <TID>
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+<ID> root <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> NULL 0.000
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1 0.000
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SHOW PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> NULL 0.000
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representativ 0.000
+UNLOCK TABLES;
+connection con2;
+# Pull("reap") the result set from the monster statement executed with "send".
+
+count(*) Long string
+0 BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END
+connection default;
+disconnect con1;
+disconnect con2;
+DROP USER test_user@'localhost';
+DROP TABLE test.t1;
diff --git a/mysql-test/suite/funcs_1/r/processlist_val_ps.result b/mysql-test/suite/funcs_1/r/processlist_val_ps.result
new file mode 100644
index 00000000..0806f00f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/processlist_val_ps.result
@@ -0,0 +1,250 @@
+DROP USER test_user@'localhost';
+CREATE USER test_user@'localhost';
+GRANT ALL ON *.* TO test_user@'localhost';
+REVOKE PROCESS ON *.* FROM test_user@'localhost';
+SET PASSWORD FOR test_user@'localhost' = PASSWORD('ddictpass');
+DROP TABLE IF EXISTS test.t1;
+CREATE TABLE test.t1 (f1 BIGINT);
+USE test;
+# Show the definition of the PROCESSLIST table
+#--------------------------------------------------------------------------
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST;
+Table Create Table
+PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
+ `ID` bigint(4) NOT NULL,
+ `USER` varchar(128) NOT NULL,
+ `HOST` varchar(64) NOT NULL,
+ `DB` varchar(64),
+ `COMMAND` varchar(16) NOT NULL,
+ `TIME` int(7) NOT NULL,
+ `STATE` varchar(64),
+ `INFO` longtext,
+ `TIME_MS` decimal(22,3) NOT NULL,
+ `STAGE` tinyint(2) NOT NULL,
+ `MAX_STAGE` tinyint(2) NOT NULL,
+ `PROGRESS` decimal(7,3) NOT NULL,
+ `MEMORY_USED` bigint(7) NOT NULL,
+ `MAX_MEMORY_USED` bigint(7) NOT NULL,
+ `EXAMINED_ROWS` int(7) NOT NULL,
+ `QUERY_ID` bigint(4) NOT NULL,
+ `INFO_BINARY` blob,
+ `TID` bigint(4) NOT NULL
+) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
+# Ensure that the information about the own connection is correct.
+#--------------------------------------------------------------------------
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> root <HOST_NAME> test Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> test Query <TIME> starting SHOW FULL PROCESSLIST <TIME_MS>
+SET @default_id = CONNECTION_ID();
+SELECT COUNT(*) = 1 AS "Expect exact one connection with this id"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id;
+Expect exact one connection with this id
+1
+SELECT COUNT(*) = 1 AS "Expect 1"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id
+AND USER = 'root' AND DB = 'test' AND Command IN('Query','Execute')
+AND State = 'Filling schema table';
+Expect 1
+1
+USE information_schema;
+SELECT COUNT(*) = 1 AS "Is the DB correct?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id AND DB = 'information_schema';
+Is the DB correct?
+1
+SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id;
+@my_info := INFO
+SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id
+SELECT @my_info = 'SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id'
+ AS 'Is the content of PROCESSLIST.INFO correct?';
+Is the content of PROCESSLIST.INFO correct?
+1
+SELECT COUNT(*) = 1 AS "Has TIME a reasonable value?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id AND 0 <= TIME < 10 AND 0 <= TIME_MS < 10000;
+Has TIME a reasonable value?
+1
+# Ensure that the information about an inactive connection is correct.
+#--------------------------------------------------------------------------
+
+connect con1,localhost,test_user,ddictpass,information_schema;
+connection default;
+# Poll till the connection con1 is in state COMMAND = 'Sleep'.
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> <STATE> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+<ID> root <HOST_NAME> information_schema Execute <TIME> <STATE> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
+SELECT ID,TIME INTO @test_user_con1_id,@time FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE COMMAND = 'Sleep' AND USER = 'test_user';
+SELECT @test_user_con1_id = @default_id + 1
+AS "Did we got the next higher PROCESSLIST ID?";
+Did we got the next higher PROCESSLIST ID?
+1
+SELECT 0 <= @time < 10 AS "Has TIME a reasonable value?";
+Has TIME a reasonable value?
+1
+SELECT COUNT(*) = 2 AS "Is HOST LIKE 'localhost%'?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE HOST LIKE 'localhost%';
+Is HOST LIKE 'localhost%'?
+1
+SELECT COUNT(*) = 1 AS "Expect 1"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @test_user_con1_id
+AND USER = 'test_user' AND DB = 'information_schema'
+ AND Command = 'Sleep' AND State = '' AND INFO IS NULL;
+Expect 1
+1
+# Ensure that the user test_user sees only connections with his username
+# because he has not the PROCESS privilege.
+#----------------------------------------------------------------------------
+
+connection con1;
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> test_user <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
+# Ensure that the user test_user sees all connections with his username.
+#----------------------------------------------------------------------------
+
+connect con2,localhost,test_user,ddictpass,information_schema;
+connection default;
+# Poll till all connections of 'test_user' are in a state with COMMAND = 'Sleep'
+
+connection con2;
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
+<ID> test_user <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
+connection default;
+SELECT ID INTO @test_user_con2_id FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID <> @test_user_con1_id
+AND USER = 'test_user' AND DB = 'information_schema';
+# Ensure we get correct information about a connection during work
+#----------------------------------------------------------------------------
+
+connection con2;
+# Send a long enough running statement to the server, but do not
+# wait till the result comes back.
+
+SELECT sleep(10), 17;
+connection default;
+# Poll till connection con2 is in state 'User sleep'.
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17 <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT sleep(10), 17 <TID>
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+<ID> root <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
+<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17 0.000
+SELECT STATE, TIME, INFO INTO @state, @time, @info
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @test_user_con2_id;
+SELECT 0 <= @time < 10 AS "Has TIME a reasonable value?";
+Has TIME a reasonable value?
+1
+SELECT @state = 'User sleep' AS "Has STATE the expected value?";
+Has STATE the expected value?
+1
+SELECT @info = 'SELECT sleep(10), 17' AS "Has INFO the expected value?";
+Has INFO the expected value?
+1
+connection con2;
+# Pull("reap") the result set from the statement executed with "send".
+
+sleep(10) 17
+0 17
+connection default;
+# Poll till all connections of 'test_user' are in a state with COMMAND = 'Sleep'
+
+# Ensure that we see that a connection "hangs" when colliding with a
+# WRITE TABLE LOCK
+#----------------------------------------------------------------------------
+
+LOCK TABLE test.t1 WRITE;
+connection con2;
+# Send a statement to the server, but do not wait till the result
+# comes back. We will pull this later.
+
+SELECT COUNT(*) FROM test.t1;
+connection default;
+# Poll till INFO is no more NULL and State = 'Waiting for table metadata lock'.
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema Query <TIME> Waiting for table metadata lock SELECT COUNT(*) FROM test.t1 <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT COUNT(*) FROM test.t1 <TID>
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+<ID> root <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+UNLOCK TABLES;
+connection con2;
+# Pull("reap") the result set from the statement executed with "send".
+
+COUNT(*)
+0
+# Ensure that SHOW/SELECT processlist can handle extreme long commands
+#----------------------------------------------------------------------------
+
+connection default;
+LOCK TABLE test.t1 WRITE;
+connection con2;
+# Send a long (~20 KB code) statement to the server, but do not wait
+# till the result comes back. We will pull this later.
+
+SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1;
+connection default;
+# Poll till INFO is no more NULL and State = 'Waiting for table metadata lock'.
+
+# Expect result:
+# Statement Content of INFO
+# SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST Complete statement
+# SHOW FULL PROCESSLIST Complete statement
+# SHOW PROCESSLIST statement truncated after 100 char
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1 <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1 <TID>
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> NULL <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> NULL <TID>
+<ID> root <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> NULL 0.000
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1 0.000
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info Progress
+<ID> root <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SHOW PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> NULL 0.000
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representativ 0.000
+UNLOCK TABLES;
+connection con2;
+# Pull("reap") the result set from the monster statement executed with "send".
+
+count(*) Long string
+0 BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END
+connection default;
+disconnect con1;
+disconnect con2;
+DROP USER test_user@'localhost';
+DROP TABLE test.t1;
diff --git a/mysql-test/suite/funcs_1/r/row_count_func.result b/mysql-test/suite/funcs_1/r/row_count_func.result
new file mode 100644
index 00000000..ffc0e8e3
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/row_count_func.result
@@ -0,0 +1,79 @@
+
+# --
+# -- Test case for Bug#21818.
+# --
+
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+
+# -- Check 1.
+SELECT * FROM t1 INTO OUTFILE "MYSQL_TMP_DIR/bug21818.txt";
+affected rows: 3
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+3
+
+# -- Check 2.
+SELECT a FROM t1 LIMIT 1 INTO @a;
+affected rows: 1
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+1
+
+# -- Check 3.
+DROP DATABASE IF EXISTS mysqltest1;
+CREATE DATABASE mysqltest1;
+affected rows: 1
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+1
+DROP DATABASE mysqltest1;
+
+# -- Check 4.
+DELETE FROM t1;
+LOAD DATA INFILE 'MYSQL_TMP_DIR/bug21818.txt' INTO TABLE t1(a);
+affected rows: 3
+info: Records: 3 Deleted: 0 Skipped: 0 Warnings: 0
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+3
+
+# -- Check 5.
+ALTER TABLE t1 ADD COLUMN b VARCHAR(255);
+affected rows: 3
+info: Records: 3 Duplicates: 0 Warnings: 0
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+3
+
+DROP TABLE t1;
+
+# -- Check 6.
+DROP TABLE IF EXISTS t2;
+CREATE TABLE t1(a INT);
+CREATE TABLE t2(a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t2 VALUES (ROW_COUNT());
+SELECT * FROM t2;
+a
+3
+DROP TABLE t1;
+DROP TABLE t2;
+
+# -- Check 7 (check that SQL errors reset row_count to -1).
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+SELECT f1();
+ERROR 42000: FUNCTION test.f1 does not exist
+SELECT ROW_COUNT();
+ROW_COUNT()
+-1
+DROP TABLE t1;
+
+# -- End of test case for Bug#21818.
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
new file mode 100644
index 00000000..6b103847
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -0,0 +1,23311 @@
+set sql_mode="";
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+--------------------------------------------------------------------------------
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+USE db_storedproc;
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t1;
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t2;
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t3.txt' into table t3;
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t4;
+USE db_storedproc_1;
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+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' 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
+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
+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' 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
+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
+create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' into table t9;
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t10;
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = <engine_to_be_tested>;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t11;
+
+Section 3.1.1 - Syntax checks for the CREATE PROCEDURE, CREATE
+FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW
+CREATE PROCEDURE, SHOW CREATE FUNCTION, SHOW CREATE PROCEDURE STATUS, SHOW
+CREATE FUNCTION STATUS, and CALL statements:
+--------------------------------------------------------------------------------
+
+Testcase 4.1.1:
+---------------
+Ensure that all clauses that should be supported are supported
+CREATE PROCEDURE
+--------------------------------------------------------------------------------
+USE db_storedproc;
+DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934;
+ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long
+CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934 (f1 char(20) )
+SELECT * from t1 where f2 = f1;
+ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long
+CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934('aaaa');
+ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long
+DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde;
+ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long
+CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( f1 TINYTEXT )
+LANGUAGE SQL DETERMINISTIC SQL SECURITY DEFINER COMMENT 'this is simple'
+BEGIN
+SET @v1 = f1;
+SELECT @v1, @v1;
+END//
+ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long
+CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' );
+ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 BINARY )
+LANGUAGE SQL DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SET @v1 = f1;
+SELECT @v1;
+END//
+CALL sp1( 34 );
+@v1
+3
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 0
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 BLOB )
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+set @v1 = f1;
+SELECT @v1;
+END//
+CALL sp1( 34 );
+@v1
+34
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 INT )
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SET @v1 = f1;
+SELECT @v1;
+END//
+CALL sp1( 34 );
+@v1
+34
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 DECIMAL(256, 30) )
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SET @v1 = f1;
+SELECT @v1;
+END//
+ERROR 42000: Too big precision specified for 'f1'. Maximum is 65
+DROP PROCEDURE IF EXISTS sp1//
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( f1 DECIMAL(66, 30) )
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SET @v1 = f1;
+SELECT @v1;
+END//
+ERROR 42000: Too big precision specified for 'f1'. Maximum is 65
+DROP PROCEDURE IF EXISTS sp1//
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+DROP TABLE IF EXISTS t1_aux;
+DROP PROCEDURE IF EXISTS sproc_1;
+DROP FUNCTION IF EXISTS func_1;
+CREATE TABLE t1_aux ( f1 DECIMAL(65, 30) );
+INSERT INTO t1_aux SET f1 = NULL;
+CREATE PROCEDURE sproc_1(f1 DECIMAL(65, 30), OUT f2 DECIMAL(65, 30))
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SET f2 = NULL;
+SET f2 = f1;
+SET @v2_proc = f1;
+END//
+CREATE FUNCTION func_1(f1 DECIMAL(65, 30)) RETURNS DECIMAL(65,30)
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+RETURN f1;
+END//
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sproc_1 PROCEDURE root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW FUNCTION STATUS WHERE db = 'db_storedproc';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc func_1 FUNCTION root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 1.7976931348623157493578e+308;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(1.7976931348623157493578e+308, @v1_proc);
+SET @v1_func = func_1(1.7976931348623157493578e+308);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+100;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+100, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+100);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+99;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+99, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+99);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+98;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+98, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+98);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+97;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+97, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+97);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+96;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+96, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+96);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+95;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+95, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+95);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+94;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+94, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+94);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+93;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+93, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+93);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+92;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+92, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+92);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+91;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+91, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+91);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+90;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+90, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+90);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+89;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+89, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+89);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+88;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+88, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+88);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+87;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+87, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+87);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+86;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+86, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+86);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+85;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+85, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+85);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+84;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+84, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+84);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+83;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+83, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+83);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+82;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+82, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+82);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+81;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+81, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+81);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+80;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+80, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+80);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+79;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+79, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+79);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+78;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+78, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+78);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+77;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+77, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+77);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+76;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+76, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+76);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+75;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+75, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+75);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+74;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+74, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+74);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+73;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+73, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+73);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+72;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+72, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+72);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+71;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+71, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+71);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+70;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+70, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+70);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+69;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+69, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+69);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+68;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+68, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+68);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+67;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+67, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+67);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+66;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+66, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+66);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+65;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+65, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+65);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+64;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+64, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+64);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+63;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+63, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+63);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+62;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+62, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+62);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+61;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+61, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+61);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+60;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+60, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+60);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+59;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+59, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+59);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+58;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+58, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+58);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+57;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+57, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+57);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+56;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+56, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+56);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+55;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+55, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+55);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+54;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+54, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+54);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+53;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+53, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+53);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+52;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+52, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+52);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+51;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+51, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+51);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+50;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+50, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+50);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+49;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+49, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+49);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+48;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+48, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+48);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+47;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+47, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+47);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+46;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+46, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+46);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+45;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+45, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+45);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+44;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+44, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+44);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+43;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+43, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+43);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+42;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+42, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+42);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+41;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+41, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+41);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+40;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+40, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+40);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+39;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+39, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+39);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+38;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+38, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+38);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+37;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+37, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+37);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+36;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+36, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+36);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+35;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+35, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+35);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+34;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+34, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+34);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+33;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+33, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+33);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+32;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+32, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+32);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+31;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+31, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+31);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+30;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+30, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+30);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+29;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+29, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+29);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+28;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+28, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+28);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+27;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+27, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+27);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+26;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+26, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+26);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+25;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+25, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+25);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+24;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+24, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+24);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+23;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+23, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+23);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+22;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+22, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+22);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+21;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+21, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+21);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+20;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+20, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+20);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+19;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+19, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+19);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+18;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+18, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+18);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+17;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+17, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+17);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+16;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+16, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+16);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+15;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+15, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+15);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+14;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+14, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+14);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+13;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+13, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+13);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+12;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+12, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+12);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+11;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+11, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+11);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+10;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+10, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+10);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+9;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+9, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+9);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+8;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+8, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+8);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+7;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+7, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+7);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+6;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+6, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+6);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+5;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+5, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+5);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+4;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+4, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+4);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+3;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+3, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+3);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+2;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+2, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+2);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+1;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+1, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+1);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e+0;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e+0, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e+0);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-100;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-100, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-100);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-99;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-99, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-99);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-98;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-98, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-98);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-97;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-97, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-97);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-96;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-96, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-96);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-95;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-95, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-95);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-94;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-94, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-94);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-93;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-93, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-93);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-92;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-92, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-92);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-91;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-91, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-91);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-90;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-90, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-90);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-89;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-89, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-89);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-88;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-88, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-88);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-87;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-87, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-87);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-86;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-86, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-86);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-85;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-85, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-85);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-84;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-84, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-84);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-83;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-83, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-83);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-82;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-82, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-82);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-81;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-81, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-81);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-80;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-80, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-80);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-79;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-79, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-79);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-78;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-78, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-78);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-77;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-77, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-77);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-76;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-76, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-76);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-75;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-75, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-75);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-74;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-74, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-74);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-73;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-73, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-73);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-72;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-72, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-72);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-71;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-71, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-71);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-70;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-70, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-70);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-69;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-69, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-69);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-68;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-68, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-68);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-67;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-67, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-67);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-66;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-66, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-66);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-65;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-65, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-65);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-64;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-64, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-64);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-63;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-63, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-63);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-62;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-62, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-62);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-61;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-61, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-61);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-60;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-60, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-60);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-59;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-59, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-59);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-58;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-58, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-58);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-57;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-57, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-57);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-56;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-56, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-56);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-55;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-55, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-55);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-54;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-54, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-54);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-53;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-53, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-53);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-52;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-52, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-52);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-51;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-51, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-51);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-50;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-50, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-50);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-49;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-49, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-49);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-48;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-48, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-48);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-47;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-47, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-47);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-46;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-46, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-46);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-45;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-45, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-45);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-44;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-44, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-44);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-43;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-43, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-43);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-42;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-42, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-42);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-41;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-41, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-41);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-40;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-40, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-40);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-39;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-39, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-39);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-38;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-38, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-38);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-37;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-37, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-37);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-36;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-36, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-36);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-35;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-35, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-35);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-34;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-34, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-34);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-33;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-33, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-33);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-32;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-32, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-32);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-31;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-31, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-31);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-30;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-30, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-30);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-29;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-29, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-29);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-28;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-28, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-28);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-27;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-27, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-27);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-26;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-26, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-26);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-25;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-25, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-25);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-24;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-24, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-24);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-23;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-23, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-23);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-22;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-22, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-22);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-21;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-21, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-21);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-20;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-20, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-20);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-19;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-19, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-19);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-18;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-18, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-18);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-17;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-17, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-17);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-16;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-16, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-16);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-15;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-15, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-15);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-14;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-14, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-14);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-13;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-13, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-13);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-12;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-12, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-12);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-11;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-11, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-11);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-10;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-10, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-10);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-9;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-9, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-9);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-8;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-8, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-8);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-7;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-7, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-7);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-6;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-6, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-6);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-5;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-5, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-5);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-4;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-4, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-4);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-3;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-3, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-3);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-2;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-2, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-2);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-1;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-1, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-1);
+UPDATE t1_aux SET f1 = NULL;
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+UPDATE t1_aux SET f1 = 0.1234567890987654321e-0;
+SELECT f1 INTO @v1_tab FROM t1_aux;
+CALL sproc_1(0.1234567890987654321e-0, @v1_proc);
+SET @v1_func = func_1(0.1234567890987654321e-0);
+DROP PROCEDURE sproc_1;
+DROP FUNCTION func_1;
+DROP TABLE t1_aux;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 ENUM("value1", "value1") )
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SELECT f1;
+END//
+Warnings:
+Note 1291 Column 'f1' has duplicated value 'value1' in ENUM
+CALL sp1( "value1" );
+f1
+value1
+Warnings:
+Note 1291 Column 'f1' has duplicated value 'value1' in ENUM
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 SET("value1", "value1") )
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SELECT f1;
+END//
+Warnings:
+Note 1291 Column 'f1' has duplicated value 'value1' in SET
+CALL sp1( "value1, value1" );
+f1
+value1
+Warnings:
+Note 1291 Column 'f1' has duplicated value 'value1' in SET
+Warning 1265 Data truncated for column 'f1' at row 0
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 ENUM("value1", "value1") )
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SELECT f1;
+END//
+Warnings:
+Note 1291 Column 'f1' has duplicated value 'value1' in ENUM
+CALL sp1( "value1" );
+f1
+value1
+Warnings:
+Note 1291 Column 'f1' has duplicated value 'value1' in ENUM
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 TEXT ) LANGUAGE SQL SELECT f1;
+CALL sp1( 'abc' );
+f1
+abc
+SHOW PROCEDURE STATUS LIKE 'sp1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 text ) deterministic SELECT f1;
+CALL sp1( 'abc' );
+f1
+abc
+SHOW PROCEDURE STATUS LIKE 'sp1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 TEXT ) NOT DETERMINISTIC SELECT f1;
+CALL sp1( 'abc' );
+f1
+abc
+SHOW PROCEDURE STATUS LIKE 'sp1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 TEXT ) SQL SECURITY DEFINER SELECT f1;
+CALL sp1( 'abc' );
+f1
+abc
+SHOW PROCEDURE STATUS LIKE 'sp1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 TEXT ) SQL SECURITY INVOKER SELECT f1;
+CALL sp1( 'abc' );
+f1
+abc
+SHOW PROCEDURE STATUS LIKE 'sp1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 TEXT ) COMMENT 'this is simple' SELECT f1;
+CALL sp1( 'abc' );
+f1
+abc
+SHOW PROCEDURE STATUS LIKE 'sp1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp1 PROCEDURE root@localhost <modified> <created> DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934;
+ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long
+DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde;
+ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long
+DROP PROCEDURE sp1;
+
+Testcase 4.1.2:
+---------------
+Ensure that all clauses that should be supported are supported
+CREATE FUNCTION
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (s CHAR(20)) RETURNS CHAR(50)
+RETURN CONCAT('hello, ', s, '!');
+SELECT fn1('world');
+fn1('world')
+hello, world!
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 MEDIUMTEXT ) RETURNS MEDIUMTEXT
+LANGUAGE SQL DETERMINISTIC SQL SECURITY DEFINER COMMENT 'this is simple'
+BEGIN
+SET @v1 = 'hello';
+SET f1 = CONCAT( @v1, f1 );
+RETURN f1;
+END//
+SELECT fn1( ' world');
+fn1( ' world')
+hello world
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SET f1 = 1 + f1;
+RETURN f1;
+END//
+SELECT fn1( 126 );
+fn1( 126 )
+127
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 DECIMAL(63, 61) ) RETURNS DECIMAL(63, 61)
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SET f1 = 1000000 + f1;
+RETURN f1;
+END//
+ERROR 42000: Too big scale specified for 'f1'. Maximum is 38
+SELECT fn1( 1.3326e+8 );
+ERROR 42000: FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1( f1 DECIMAL(63, 30) ) RETURNS DECIMAL(63, 30)
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+SET f1 = 1000000 + f1;
+RETURN f1;
+END//
+SELECT fn1( 1.3326e+8 );
+fn1( 1.3326e+8 )
+134260000.000000000000000000000000000000
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 ENUM("value1", "value1") ) RETURNS DECIMAL(63, 30)
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+RETURN f1;
+END//
+Warnings:
+Note 1291 Column 'f1' has duplicated value 'value1' in ENUM
+SELECT fn1( "value1" );
+fn1( "value1" )
+1.000000000000000000000000000000
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 SET("value1", "value1") ) RETURNS DECIMAL(63, 30)
+LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+RETURN f1;
+END//
+Warnings:
+Note 1291 Column 'f1' has duplicated value 'value1' in SET
+SELECT fn1( "value1, value1" );
+fn1( "value1, value1" )
+1.000000000000000000000000000000
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT LANGUAGE SQL
+BEGIN
+SET f1 = 1 + f1;
+RETURN f1;
+END//
+SELECT fn1( 126 );
+fn1( 126 )
+127
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT DETERMINISTIC
+BEGIN
+SET f1 = 1 + f1;
+RETURN f1;
+END//
+SELECT fn1( 126 );
+fn1( 126 )
+127
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT NOT DETERMINISTIC
+BEGIN
+SET f1 = 1 + f1;
+RETURN f1;
+END//
+SELECT fn1( 126 );
+fn1( 126 )
+127
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT SQL SECURITY DEFINER
+BEGIN
+SET f1 = 1 + f1;
+RETURN f1;
+END//
+SELECT fn1( 126 );
+fn1( 126 )
+127
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT SQL SECURITY INVOKER
+BEGIN
+SET f1 = 1 + f1;
+RETURN f1;
+END//
+SELECT fn1( 126 );
+fn1( 126 )
+127
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT COMMENT 'this is simple'
+BEGIN
+SET f1 = 1 + f1;
+RETURN f1;
+END//
+SELECT fn1( 126 );
+fn1( 126 )
+127
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION fn1;
+
+Testcase 4.1.3:
+---------------
+Ensure that all clauses that should be supported are supported
+SHOW CREATE PROC
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 (f1 char(20) )
+SELECT * from t1 where f2 = f1;
+show CREATE PROCEDURE sp1;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(f1 char(20) )
+SELECT * from t1 where f2 = f1 latin1 <modified> <created>
+DROP PROCEDURE sp1;
+
+Testcase 4.1.4:
+---------------
+show create function
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (s char(20)) returns char(50)
+return concat('hello, ', s, '!');
+show CREATE FUNCTION fn1;
+Function sql_mode Create Function character_set_client collation_connection Database Collation
+fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(s char(20)) RETURNS char(50) CHARSET latin1 COLLATE latin1_swedish_ci
+return concat('hello, ', s, '!') latin1 <modified> <created>
+DROP FUNCTION fn1;
+
+Testcase 4.1.5:
+---------------
+SHOW PROCEDURE status
+--------------------------------------------------------------------------------
+CREATE PROCEDURE sp5()
+SELECT * from t1;
+SHOW PROCEDURE status like 'sp5';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp5 PROCEDURE root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE sp5;
+
+Testcase 4.1.6:
+---------------
+show function status
+--------------------------------------------------------------------------------
+CREATE FUNCTION fn5(a int) returns int
+BEGIN
+set @b = 0.9 * a;
+return @b;
+END//
+SHOW FUNCTION STATUS LIKE 'fn5';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn5 FUNCTION root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION fn5;
+
+Testcase 4.1.7:
+---------------
+CALL procedure
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp7a;
+DROP PROCEDURE IF EXISTS sp7b;
+DROP PROCEDURE IF EXISTS sp7c;
+CREATE PROCEDURE sp7a(a char(20))
+SELECT * from t1 where t1.f2 = a;
+CALL sp7a( 'xyz' );
+f1 f2 f3 f4 f5 f6
+CREATE PROCEDURE sp7b (a char (20), out b char(20))
+SELECT f1 into b from t1 where t1.f2= a;
+CALL sp7b('xyz', @out_param);
+Warnings:
+Warning 1329 No data - zero rows fetched, selected, or processed
+SELECT @out_param;
+@out_param
+NULL
+CREATE PROCEDURE sp7c (a char (20), out b char(20), inout c int)
+BEGIN
+SELECT f1 into b from t1 where t1.f2=a;
+update t1 set t1.f2=999 where t1.f4=c;
+SELECT f2 into c from t1 where t1.f2=999;
+END//
+set @c=1;
+CALL sp7c('xyz', @out_param, @c);
+SELECT @out_param;
+@out_param
+NULL
+SELECT @c;
+@c
+1
+DROP PROCEDURE sp7a;
+DROP PROCEDURE sp7b;
+DROP PROCEDURE sp7c;
+
+Testcase 4.1.8:
+---------------
+calling function
+--------------------------------------------------------------------------------
+CREATE FUNCTION fn8(a char(20)) returns char(50)
+return concat('hello, ', a, '!');
+SELECT fn8('world');
+fn8('world')
+hello, world!
+DROP FUNCTION fn8;
+
+Testcase 4.1.9:
+---------------
+drop procedure
+--------------------------------------------------------------------------------
+SELECT * from mysql.proc where specific_name='sp9';
+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 aggregate
+DROP PROCEDURE IF EXISTS sp9;
+SELECT * from mysql.proc where specific_name='sp9';
+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 aggregate
+CREATE PROCEDURE sp9()SELECT * from t1;
+SELECT * from mysql.proc where specific_name='sp9';
+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 aggregate
+db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 NONE
+DROP PROCEDURE sp9;
+SELECT * from mysql.proc where specific_name='sp9';
+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 aggregate
+CREATE PROCEDURE sp9()SELECT * from t1;
+SELECT * from mysql.proc where specific_name='sp9';
+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 aggregate
+db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 NONE
+DROP PROCEDURE IF EXISTS sp9;
+SELECT * from mysql.proc where specific_name='sp9';
+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 aggregate
+
+Testcase 4.1.10:
+----------------
+DROP FUNCTION
+--------------------------------------------------------------------------------
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+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 aggregate
+DROP FUNCTION IF EXISTS fn10;
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+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 aggregate
+CREATE FUNCTION fn10() returns int return 100;
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+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 aggregate
+db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 NONE
+DROP FUNCTION fn10;
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+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 aggregate
+CREATE FUNCTION fn10() returns int return 100;
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+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 aggregate
+db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 NONE
+DROP FUNCTION IF EXISTS fn10;
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+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 aggregate
+
+Testcase 4.1.11:
+----------------
+alter proc
+--------------------------------------------------------------------------------
+create user 'user_1'@'localhost';
+grant execute on db_storedproc.* to 'user_1'@'localhost';
+flush privileges;
+drop table IF EXISTS mysql.t1;
+Warnings:
+Note 1051 Unknown table 'mysql.t1'
+create table mysql.t1( f1 char );
+DROP PROCEDURE IF EXISTS sp11;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp11 does not exist
+CREATE PROCEDURE sp11() insert into mysql.t1 values('a');
+SELECT security_type from mysql.proc where specific_name='sp11';
+security_type
+DEFINER
+connect u_1, localhost, user_1, , db_storedproc;
+
+user_1@localhost db_storedproc
+CALL sp11();
+connection default;
+USE db_storedproc;
+
+root@localhost db_storedproc
+alter procedure sp11 sql security invoker;
+SELECT security_type from mysql.proc where specific_name='sp11';
+security_type
+INVOKER
+connection u_1;
+
+user_1@localhost db_storedproc
+USE db_storedproc;
+CALL sp11();
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `mysql`.`t1`
+commit work;
+disconnect u_1;
+connection default;
+
+root@localhost db_storedproc
+alter procedure sp11 sql security DEFINER;
+SELECT security_type from mysql.proc where specific_name='sp11';
+security_type
+DEFINER
+CALL sp11();
+DROP USER 'user_1'@'localhost';
+DROP PROCEDURE sp11;
+drop table mysql.t1;
+
+Testcase 4.1.12:
+----------------
+alter function
+--------------------------------------------------------------------------------
+CREATE FUNCTION fn12() returns int
+return 100;
+SELECT security_type from mysql.proc where specific_name='fn12';
+security_type
+DEFINER
+SELECT fn12();
+fn12()
+100
+alter function fn12 sql security invoker;
+SELECT security_type from mysql.proc where specific_name='fn12';
+security_type
+INVOKER
+SELECT fn12();
+fn12()
+100
+alter function fn12 sql security DEFINER;
+SELECT security_type from mysql.proc where specific_name='fn12';
+security_type
+DEFINER
+SELECT fn12();
+fn12()
+100
+DROP FUNCTION fn12;
+
+Testcase 4.1.13:
+----------------
+alter proc
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp11;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp11 does not exist
+CREATE PROCEDURE sp11()
+SELECT * from t1;
+SELECT comment from mysql.proc where specific_name='sp11';
+comment
+
+alter procedure sp11 comment 'this is simple';
+SELECT comment from mysql.proc where specific_name='sp11';
+comment
+this is simple
+DROP PROCEDURE sp11;
+
+Testcase 4.1.14:
+----------------
+alter function
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn12;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn12 does not exist
+CREATE FUNCTION fn12() returns int
+return 100;
+SELECT comment from mysql.proc where specific_name='fn12';
+comment
+
+alter function fn12 comment 'this is simple';
+SELECT comment from mysql.proc where specific_name='fn12';
+comment
+this is simple
+DROP FUNCTION fn12;
+
+Testcase 4.1.15:
+----------------
+Ensure that any invalid stored procedure name is never accepted, and that an
+appropriate error message is returned when the name is rejected
+--------------------------------------------------------------------------------
+CREATE PROCEDURE sp1()
+DROP PROCEDURE sp1;
+ERROR HY000: Can't drop or alter a PROCEDURE from within another stored routine
+CREATE PROCEDURE !_sp1( f1 char(20) )
+SELECT * from t1 where f2 = f1;
+ERROR 42000: 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 '!_sp1( f1 char(20) )
+SELECT * from t1 where f2 = f1' at line 1
+CREATE PROCEDURE function()
+SELECT * from t1 where f2=f1;
+DROP PROCEDURE function;
+CREATE PROCEDURE accessible()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'accessible()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE add()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'add()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE all()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'all()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE alter()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'alter()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE analyze()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'analyze()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE and()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'and()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE as()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'as()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE asc()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'asc()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE asensitive()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'asensitive()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE before()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'before()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE between()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'between()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE bigint()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'bigint()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE binary()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'binary()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE blob()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'blob()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE both()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'both()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE by()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'by()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE call()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'call()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE cascade()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'cascade()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE case()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'case()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE change()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'change()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE char()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'char()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE character()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'character()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE check()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'check()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE collate()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'collate()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE column()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'column()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE condition()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'condition()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE constraint()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'constraint()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE continue()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'continue()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE convert()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'convert()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE create()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'create()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE cross()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'cross()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE current_date()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'current_date()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE current_time()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'current_time()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE current_timestamp()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'current_timestamp()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE current_user()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'current_user()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE cursor()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'cursor()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE database()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'database()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE databases()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'databases()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE day_hour()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'day_hour()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE day_microsecond()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'day_microsecond()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE day_minute()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'day_minute()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE day_second()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'day_second()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE dec()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'dec()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE decimal()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'decimal()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE declare()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'declare()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE default()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'default()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE delayed()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'delayed()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE delete()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'delete()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE desc()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'desc()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE describe()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'describe()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE deterministic()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'deterministic()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE distinct()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'distinct()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE distinctrow()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'distinctrow()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE div()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'div()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE double()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'double()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE drop()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'drop()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE dual()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'dual()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE each()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'each()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE else()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'else()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE elseif()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'elseif()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE enclosed()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'enclosed()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE escaped()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'escaped()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE exists()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'exists()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE exit()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'exit()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE explain()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'explain()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE false()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'false()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE fetch()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'fetch()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE fields()
+SELECT * from t1 where f2=f1;
+DROP PROCEDURE fields;
+CREATE PROCEDURE float()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'float()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE for()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'for()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE force()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'force()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE foreign()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'foreign()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE from()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'from()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE fulltext()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'fulltext()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE grant()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'grant()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE group()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'group()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE having()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'having()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE high_priority()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'high_priority()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE hour_microsecond()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'hour_microsecond()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE hour_minute()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'hour_minute()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE hour_second()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'hour_second()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE if()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 '()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE ignore()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'ignore()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE in()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'in()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE index()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'index()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE infile()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'infile()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE inner()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'inner()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE inout()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'inout()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE insensitive()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'insensitive()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE insert()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'insert()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE int()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'int()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE int1()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'int1()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE int2()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'int2()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE int3()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'int3()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE int4()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'int4()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE int8()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'int8()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE integer()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'integer()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE interval()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'interval()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE into()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'into()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE is()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'is()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE iterate()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'iterate()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE join()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'join()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE key()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'key()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE keys()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'keys()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE kill()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'kill()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE leading()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'leading()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE leave()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'leave()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE left()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'left()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE like()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'like()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE limit()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'limit()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE linear()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'linear()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE lines()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'lines()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE load()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'load()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE localtime()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'localtime()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE localtimestamp()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'localtimestamp()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE lock()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'lock()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE long()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'long()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE longblob()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'longblob()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE longtext()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'longtext()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE loop()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'loop()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE low_priority()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'low_priority()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE master_ssl_verify_server_cert()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'master_ssl_verify_server_cert()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE match()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'match()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE mediumblob()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'mediumblob()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE mediumint()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'mediumint()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE mediumtext()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'mediumtext()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE middleint()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'middleint()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE minute_microsecond()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'minute_microsecond()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE minute_second()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'minute_second()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE mod()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'mod()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE modifies()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'modifies()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE natural()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'natural()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE not()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'not()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE no_write_to_binlog()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'no_write_to_binlog()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE null()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'null()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE numeric()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'numeric()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE on()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'on()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE optimize()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'optimize()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE option()
+SELECT * from t1 where f2=f1;
+DROP PROCEDURE option;
+CREATE PROCEDURE optionally()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'optionally()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE or()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'or()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE order()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'order()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE out()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'out()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE outer()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'outer()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE outfile()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'outfile()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE precision()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'precision()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE primary()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'primary()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE procedure()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'procedure()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE purge()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'purge()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE range()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'range()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE read()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'read()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE reads()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'reads()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE real()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'real()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE references()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'references()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE regexp()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'regexp()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE release()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'release()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE rename()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'rename()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE repeat()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'repeat()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE replace()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'replace()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE require()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'require()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE restrict()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'restrict()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE return()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'return()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE revoke()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'revoke()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE right()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'right()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE rlike()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'rlike()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE schema()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'schema()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE schemas()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'schemas()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE second_microsecond()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'second_microsecond()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE select()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'select()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE sensitive()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'sensitive()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE separator()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'separator()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE set()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'set()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE show()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'show()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE smallint()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'smallint()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE spatial()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'spatial()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE specific()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'specific()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE sql()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'sql()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE sqlexception()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'sqlexception()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE sqlstate()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'sqlstate()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE sqlwarning()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'sqlwarning()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE sql_big_result()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'sql_big_result()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE sql_calc_found_rows()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'sql_calc_found_rows()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE sql_small_result()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'sql_small_result()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE ssl()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'ssl()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE starting()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'starting()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE straight_join()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'straight_join()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE table()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'table()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE terminated()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'terminated()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE then()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'then()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE tinyblob()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'tinyblob()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE tinyint()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'tinyint()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE tinytext()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'tinytext()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE to()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'to()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE trailing()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'trailing()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE trigger()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'trigger()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE true()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'true()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE undo()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'undo()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE union()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'union()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE unique()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'unique()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE unlock()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'unlock()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE unsigned()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'unsigned()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE update()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'update()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE usage()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'usage()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE use()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'use()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE using()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'using()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE utc_date()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'utc_date()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE utc_time()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'utc_time()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE utc_timestamp()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'utc_timestamp()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE values()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE varbinary()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'varbinary()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE varchar()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'varchar()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE varcharacter()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'varcharacter()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE varying()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'varying()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE when()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'when()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE where()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'where()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE while()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'while()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE with()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'with()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE write()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'write()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE xor()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'xor()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE year_month()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'year_month()
+SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE zerofill()
+SELECT * from t1 where f2=f1;
+ERROR 42000: 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 'zerofill()
+SELECT * from t1 where f2=f1' at line 1
+
+Testcase 4.1.15:
+----------------
+Ensure that any invalid function name is never accepted, and that an appropriate
+error message is returned when the name is rejected
+--------------------------------------------------------------------------------
+CREATE FUNCTION !_fn1(f1 char) returns char
+return f1;
+ERROR 42000: 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 '!_fn1(f1 char) returns char
+return f1' at line 1
+CREATE FUNCTION char(f1 char) returns char
+return f1;
+ERROR 42000: 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 'char(f1 char) returns char
+return f1' at line 1
+CREATE FUNCTION char binary(f1 char binary) returns char binary
+return f1;
+ERROR 42000: 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 'char binary(f1 char binary) returns char binary
+return f1' at line 1
+CREATE FUNCTION char ascii(f1 char ascii) returns char ascii
+return f1;
+ERROR 42000: 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 'char ascii(f1 char ascii) returns char ascii
+return f1' at line 1
+CREATE FUNCTION char not null(f1 char not null) returns char not null
+return f1;
+ERROR 42000: 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 'char not null(f1 char not null) returns char not null
+return f1' at line 1
+CREATE FUNCTION char binary not null(f1 char binary not null) returns char binary not null
+return f1;
+ERROR 42000: 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 'char binary not null(f1 char binary not null) returns char binary not null
+re...' at line 1
+CREATE FUNCTION char ascii not null(f1 char ascii not null) returns char ascii not null
+return f1;
+ERROR 42000: 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 'char ascii not null(f1 char ascii not null) returns char ascii not null
+retur...' at line 1
+CREATE FUNCTION tinytext(f1 tinytext) returns tinytext
+return f1;
+ERROR 42000: 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 'tinytext(f1 tinytext) returns tinytext
+return f1' at line 1
+CREATE FUNCTION text(f1 text) returns text
+return f1;
+DROP FUNCTION text;
+CREATE FUNCTION mediumtext(f1 mediumtext) returns mediumtext
+return f1;
+ERROR 42000: 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 'mediumtext(f1 mediumtext) returns mediumtext
+return f1' at line 1
+CREATE FUNCTION longtext(f1 longtext) returns longtext
+return f1;
+ERROR 42000: 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 'longtext(f1 longtext) returns longtext
+return f1' at line 1
+CREATE FUNCTION tinytext not null(f1 tinytext not null) returns tinytext not null
+return f1;
+ERROR 42000: 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 'tinytext not null(f1 tinytext not null) returns tinytext not null
+return f1' at line 1
+CREATE FUNCTION text not null(f1 text not null) returns text not null
+return f1;
+ERROR 42000: 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 'not null(f1 text not null) returns text not null
+return f1' at line 1
+CREATE FUNCTION mediumtext not null(f1 mediumtext not null) returns mediumtext not null
+return f1;
+ERROR 42000: 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 'mediumtext not null(f1 mediumtext not null) returns mediumtext not null
+retur...' at line 1
+CREATE FUNCTION longtext not null(f1 longtext not null) returns longtext not null
+return f1;
+ERROR 42000: 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 'longtext not null(f1 longtext not null) returns longtext not null
+return f1' at line 1
+CREATE FUNCTION tinyblob(f1 tinyblob) returns tinyblob
+return f1;
+ERROR 42000: 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 'tinyblob(f1 tinyblob) returns tinyblob
+return f1' at line 1
+CREATE FUNCTION blob(f1 blob) returns blob
+return f1;
+ERROR 42000: 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 'blob(f1 blob) returns blob
+return f1' at line 1
+CREATE FUNCTION mediumblob(f1 mediumblob) returns mediumblob
+return f1;
+ERROR 42000: 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 'mediumblob(f1 mediumblob) returns mediumblob
+return f1' at line 1
+CREATE FUNCTION longblob(f1 longblob) returns longblob
+return f1;
+ERROR 42000: 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 'longblob(f1 longblob) returns longblob
+return f1' at line 1
+CREATE FUNCTION tinyblob not null(f1 tinyblob not null) returns tinyblob not null
+return f1;
+ERROR 42000: 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 'tinyblob not null(f1 tinyblob not null) returns tinyblob not null
+return f1' at line 1
+CREATE FUNCTION blob not null(f1 blob not null) returns blob not null
+return f1;
+ERROR 42000: 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 'blob not null(f1 blob not null) returns blob not null
+return f1' at line 1
+CREATE FUNCTION mediumblob not null(f1 mediumblob not null) returns mediumblob not null
+return f1;
+ERROR 42000: 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 'mediumblob not null(f1 mediumblob not null) returns mediumblob not null
+retur...' at line 1
+CREATE FUNCTION longblob not null(f1 longblob not null) returns longblob not null
+return f1;
+ERROR 42000: 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 'longblob not null(f1 longblob not null) returns longblob not null
+return f1' at line 1
+CREATE FUNCTION binary(f1 binary) returns binary
+return f1;
+ERROR 42000: 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 'binary(f1 binary) returns binary
+return f1' at line 1
+CREATE FUNCTION binary not null(f1 binary not null) returns binary not null
+return f1;
+ERROR 42000: 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 'binary not null(f1 binary not null) returns binary not null
+return f1' at line 1
+CREATE FUNCTION tinyint(f1 tinyint) returns tinyint
+return f1;
+ERROR 42000: 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 'tinyint(f1 tinyint) returns tinyint
+return f1' at line 1
+CREATE FUNCTION tinyint unsigned(f1 tinyint unsigned) returns tinyint unsigned
+return f1;
+ERROR 42000: 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 'tinyint unsigned(f1 tinyint unsigned) returns tinyint unsigned
+return f1' at line 1
+CREATE FUNCTION tinyint zerofill(f1 tinyint zerofill) returns tinyint zerofill
+return f1;
+ERROR 42000: 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 'tinyint zerofill(f1 tinyint zerofill) returns tinyint zerofill
+return f1' at line 1
+CREATE FUNCTION tinyint unsigned zerofill(f1 tinyint unsigned zerofill) returns tinyint unsigned zerofill
+return f1;
+ERROR 42000: 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 'tinyint unsigned zerofill(f1 tinyint unsigned zerofill) returns tinyint unsig...' at line 1
+CREATE FUNCTION smallint(f1 smallint) returns smallint
+return f1;
+ERROR 42000: 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 'smallint(f1 smallint) returns smallint
+return f1' at line 1
+CREATE FUNCTION smallint unsigned(f1 smallint unsigned) returns smallint unsigned
+return f1;
+ERROR 42000: 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 'smallint unsigned(f1 smallint unsigned) returns smallint unsigned
+return f1' at line 1
+CREATE FUNCTION smallint zerofill(f1 smallint zerofill) returns smallint zerofill
+return f1;
+ERROR 42000: 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 'smallint zerofill(f1 smallint zerofill) returns smallint zerofill
+return f1' at line 1
+CREATE FUNCTION smallint unsigned zerofill(f1 smallint unsigned zerofill) returns smallint unsigned zerofill
+return f1;
+ERROR 42000: 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 'smallint unsigned zerofill(f1 smallint unsigned zerofill) returns smallint un...' at line 1
+CREATE FUNCTION mediumint(f1 mediumint) returns mediumint
+return f1;
+ERROR 42000: 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 'mediumint(f1 mediumint) returns mediumint
+return f1' at line 1
+CREATE FUNCTION mediumint unsigned(f1 mediumint unsigned) returns mediumint unsigned
+return f1;
+ERROR 42000: 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 'mediumint unsigned(f1 mediumint unsigned) returns mediumint unsigned
+return f1' at line 1
+CREATE FUNCTION mediumint zerofill(f1 mediumint zerofill) returns mediumint zerofill
+return f1;
+ERROR 42000: 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 'mediumint zerofill(f1 mediumint zerofill) returns mediumint zerofill
+return f1' at line 1
+CREATE FUNCTION mediumint unsigned zerofill(f1 mediumint unsigned zerofill) returns mediumint unsigned zerofill
+return f1;
+ERROR 42000: 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 'mediumint unsigned zerofill(f1 mediumint unsigned zerofill) returns mediumint...' at line 1
+CREATE FUNCTION int(f1 int) returns int
+return f1;
+ERROR 42000: 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 'int(f1 int) returns int
+return f1' at line 1
+CREATE FUNCTION int1(f1 int1) returns int1
+return f1;
+ERROR 42000: 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 'int1(f1 int1) returns int1
+return f1' at line 1
+CREATE FUNCTION int2(f1 int2) returns int2
+return f1;
+ERROR 42000: 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 'int2(f1 int2) returns int2
+return f1' at line 1
+CREATE FUNCTION int3(f1 int3) returns int3
+return f1;
+ERROR 42000: 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 'int3(f1 int3) returns int3
+return f1' at line 1
+CREATE FUNCTION int4(f1 int4) returns int4
+return f1;
+ERROR 42000: 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 'int4(f1 int4) returns int4
+return f1' at line 1
+CREATE FUNCTION int8(f1 int8) returns int8
+return f1;
+ERROR 42000: 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 'int8(f1 int8) returns int8
+return f1' at line 1
+CREATE FUNCTION int unsigned(f1 int unsigned) returns int unsigned
+return f1;
+ERROR 42000: 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 'int unsigned(f1 int unsigned) returns int unsigned
+return f1' at line 1
+CREATE FUNCTION int zerofill(f1 int zerofill) returns int zerofill
+return f1;
+ERROR 42000: 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 'int zerofill(f1 int zerofill) returns int zerofill
+return f1' at line 1
+CREATE FUNCTION int unsigned zerofill(f1 int unsigned zerofill) returns int unsigned zerofill
+return f1;
+ERROR 42000: 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 'int unsigned zerofill(f1 int unsigned zerofill) returns int unsigned zerofill...' at line 1
+CREATE FUNCTION bigint(f1 bigint) returns bigint
+return f1;
+ERROR 42000: 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 'bigint(f1 bigint) returns bigint
+return f1' at line 1
+CREATE FUNCTION bigint unsigned(f1 bigint unsigned) returns bigint unsigned
+return f1;
+ERROR 42000: 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 'bigint unsigned(f1 bigint unsigned) returns bigint unsigned
+return f1' at line 1
+CREATE FUNCTION bigint zerofill(f1 bigint zerofill) returns bigint zerofill
+return f1;
+ERROR 42000: 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 'bigint zerofill(f1 bigint zerofill) returns bigint zerofill
+return f1' at line 1
+CREATE FUNCTION bigint unsigned zerofill(f1 bigint unsigned zerofill) returns bigint unsigned zerofill
+return f1;
+ERROR 42000: 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 'bigint unsigned zerofill(f1 bigint unsigned zerofill) returns bigint unsigned...' at line 1
+CREATE FUNCTION decimal(f1 decimal) returns decimal
+return f1;
+ERROR 42000: 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 'decimal(f1 decimal) returns decimal
+return f1' at line 1
+CREATE FUNCTION decimal unsigned(f1 decimal unsigned) returns decimal unsigned
+return f1;
+ERROR 42000: 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 'decimal unsigned(f1 decimal unsigned) returns decimal unsigned
+return f1' at line 1
+CREATE FUNCTION decimal zerofill(f1 decimal zerofill) returns decimal zerofill
+return f1;
+ERROR 42000: 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 'decimal zerofill(f1 decimal zerofill) returns decimal zerofill
+return f1' at line 1
+CREATE FUNCTION decimal unsigned zerofill(f1 decimal unsigned zerofill) returns decimal unsigned zerofill
+return f1;
+ERROR 42000: 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 'decimal unsigned zerofill(f1 decimal unsigned zerofill) returns decimal unsig...' at line 1
+CREATE FUNCTION numeric(f1 numeric) returns numeric
+return f1;
+ERROR 42000: 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 'numeric(f1 numeric) returns numeric
+return f1' at line 1
+CREATE FUNCTION numeric unsigned(f1 numeric unsigned) returns numeric unsigned
+return f1;
+ERROR 42000: 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 'numeric unsigned(f1 numeric unsigned) returns numeric unsigned
+return f1' at line 1
+CREATE FUNCTION numeric zerofill(f1 numeric zerofill) returns numeric zerofill
+return f1;
+ERROR 42000: 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 'numeric zerofill(f1 numeric zerofill) returns numeric zerofill
+return f1' at line 1
+CREATE FUNCTION numeric unsigned zerofill(f1 numeric unsigned zerofill) returns numeric unsigned zerofill
+return f1;
+ERROR 42000: 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 'numeric unsigned zerofill(f1 numeric unsigned zerofill) returns numeric unsig...' at line 1
+CREATE FUNCTION real(f1 real) returns real
+return f1;
+ERROR 42000: 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 'real(f1 real) returns real
+return f1' at line 1
+CREATE FUNCTION real unsigned(f1 real unsigned) returns real unsigned
+return f1;
+ERROR 42000: 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 'real unsigned(f1 real unsigned) returns real unsigned
+return f1' at line 1
+CREATE FUNCTION real zerofill(f1 real zerofill) returns real zerofill
+return f1;
+ERROR 42000: 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 'real zerofill(f1 real zerofill) returns real zerofill
+return f1' at line 1
+CREATE FUNCTION real unsigned zerofill(f1 real unsigned zerofill) returns real unsigned zerofill
+return f1;
+ERROR 42000: 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 'real unsigned zerofill(f1 real unsigned zerofill) returns real unsigned zerof...' at line 1
+CREATE FUNCTION float(f1 float) returns float
+return f1;
+ERROR 42000: 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 'float(f1 float) returns float
+return f1' at line 1
+CREATE FUNCTION float unsigned(f1 float unsigned) returns float unsigned
+return f1;
+ERROR 42000: 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 'float unsigned(f1 float unsigned) returns float unsigned
+return f1' at line 1
+CREATE FUNCTION float zerofill(f1 float zerofill) returns float zerofill
+return f1;
+ERROR 42000: 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 'float zerofill(f1 float zerofill) returns float zerofill
+return f1' at line 1
+CREATE FUNCTION float unsigned zerofill(f1 float unsigned zerofill) returns float unsigned zerofill
+return f1;
+ERROR 42000: 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 'float unsigned zerofill(f1 float unsigned zerofill) returns float unsigned ze...' at line 1
+CREATE FUNCTION date(f1 date) returns date
+return f1;
+DROP FUNCTION date;
+CREATE FUNCTION time(f1 time) returns time
+return f1;
+DROP FUNCTION time;
+CREATE FUNCTION datetime(f1 datetime) returns datetime
+return f1;
+DROP FUNCTION datetime;
+CREATE FUNCTION timestamp(f1 timestamp) returns timestamp
+return f1;
+DROP FUNCTION timestamp;
+CREATE FUNCTION year(f1 year) returns year
+return f1;
+DROP FUNCTION year;
+CREATE FUNCTION year(3)(f1 year(3)) returns year(3)
+return f1;
+ERROR 42000: 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 '3)(f1 year(3)) returns year(3)
+return f1' at line 1
+CREATE FUNCTION year(4)(f1 year(4)) returns year(4)
+return f1;
+ERROR 42000: 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 '4)(f1 year(4)) returns year(4)
+return f1' at line 1
+CREATE FUNCTION enum("1enum", "2enum")(f1 enum("1enum", "2enum")) returns enum("1enum", "2enum")
+return f1;
+ERROR 42000: 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 '"1enum", "2enum")(f1 enum("1enum", "2enum")) returns enum("1enum", "2enum")
+r...' at line 1
+CREATE FUNCTION set("1set", "2set")(f1 set("1set", "2set")) returns set("1set", "2set")
+return f1;
+ERROR 42000: 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 'set("1set", "2set")(f1 set("1set", "2set")) returns set("1set", "2set")
+retur...' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 char ) returns char
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 char binary ) returns char binary
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 char ascii ) returns char ascii
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 char not null ) returns char not null
+return f1;
+ERROR 42000: 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 'not null ) returns char not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 char binary not null ) returns char binary not null
+return f1;
+ERROR 42000: 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 'not null ) returns char binary not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 char ascii not null ) returns char ascii not null
+return f1;
+ERROR 42000: 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 'not null ) returns char ascii not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 tinytext ) returns tinytext
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 text ) returns text
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumtext ) returns mediumtext
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 longtext ) returns longtext
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinytext not null ) returns tinytext not null
+return f1;
+ERROR 42000: 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 'not null ) returns tinytext not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 text not null ) returns text not null
+return f1;
+ERROR 42000: 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 'not null ) returns text not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 mediumtext not null ) returns mediumtext not null
+return f1;
+ERROR 42000: 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 'not null ) returns mediumtext not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 longtext not null ) returns longtext not null
+return f1;
+ERROR 42000: 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 'not null ) returns longtext not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 tinyblob ) returns tinyblob
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 blob ) returns blob
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumblob ) returns mediumblob
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 longblob ) returns longblob
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinyblob not null ) returns tinyblob not null
+return f1;
+ERROR 42000: 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 'not null ) returns tinyblob not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 blob not null ) returns blob not null
+return f1;
+ERROR 42000: 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 'not null ) returns blob not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 mediumblob not null ) returns mediumblob not null
+return f1;
+ERROR 42000: 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 'not null ) returns mediumblob not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 longblob not null ) returns longblob not null
+return f1;
+ERROR 42000: 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 'not null ) returns longblob not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 binary ) returns binary
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 binary not null ) returns binary not null
+return f1;
+ERROR 42000: 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 'not null ) returns binary not null
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 tinyint ) returns tinyint
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinyint unsigned ) returns tinyint unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinyint zerofill ) returns tinyint zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinyint unsigned zerofill ) returns tinyint unsigned zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 smallint ) returns smallint
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 smallint unsigned ) returns smallint unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 smallint zerofill ) returns smallint zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 smallint unsigned zerofill ) returns smallint unsigned zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumint ) returns mediumint
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumint unsigned ) returns mediumint unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumint zerofill ) returns mediumint zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumint unsigned zerofill ) returns mediumint unsigned zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int ) returns int
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int unsigned ) returns int unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int1 unsigned ) returns int1 unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int2 unsigned ) returns int2 unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int3 unsigned ) returns int3 unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int4 unsigned ) returns int4 unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int8 unsigned ) returns int8 unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int zerofill ) returns int zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int unsigned zerofill ) returns int unsigned zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 bigint ) returns bigint
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 bigint unsigned ) returns bigint unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 bigint zerofill ) returns bigint zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 bigint unsigned zerofill ) returns bigint unsigned zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 decimal ) returns decimal
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 decimal unsigned ) returns decimal unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 decimal zerofill ) returns decimal zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 decimal unsigned zerofill ) returns decimal unsigned zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 numeric ) returns numeric
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 numeric unsigned ) returns numeric unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 numeric zerofill ) returns numeric zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 numeric unsigned zerofill ) returns numeric unsigned zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 real ) returns real
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 real unsigned ) returns real unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 real zerofill ) returns real zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 real unsigned zerofill ) returns real unsigned zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 float ) returns float
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 float unsigned ) returns float unsigned
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 float zerofill ) returns float zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 float unsigned zerofill ) returns float unsigned zerofill
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 date ) returns date
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 time ) returns time
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 datetime ) returns datetime
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 timestamp ) returns timestamp
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 year ) returns year
+return f1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3)
+return f1;
+ERROR 42000: 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 'f1 3) ) returns year(3)
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4)
+return f1;
+ERROR 42000: 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 'f1 4) ) returns year(4)
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 enum(f1 "1enum", "2enum") ) returns enum("1enum", "2enum")
+return f1;
+ERROR 42000: 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 'f1 "1enum", "2enum") ) returns enum("1enum", "2enum")
+return f1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(f1 set(f1 "1set", "2set") ) returns set("1set", "2set")
+return f1;
+ERROR 42000: 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 'f1 "1set", "2set") ) returns set("1set", "2set")
+return f1' at line 1
+
+Testcase 4.1.16:
+----------------
+Ensure that a reference to a non-existent stored procedure is rejected with an
+appropriate error message
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp16;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp16 does not exist
+CALL sp16( 'xyz' );
+ERROR 42000: PROCEDURE db_storedproc.sp16 does not exist
+CREATE DATABASE db1;
+USE db1;
+CREATE PROCEDURE sp16()
+BEGIN
+set @var1 = 1;
+SELECT @var1;
+END//
+CALL db_storedproc.sp16();
+ERROR 42000: PROCEDURE db_storedproc.sp16 does not exist
+USE db_storedproc;
+DROP PROCEDURE db1.sp16;
+DROP DATABASE db1;
+
+Testcase 4.1.17:
+----------------
+Ensure that it is possible to drop, create and CALL/execute a procedure and a
+function with the same name, even in the same database
+--------------------------------------------------------------------------------
+USE db_storedproc;
+DROP FUNCTION IF EXISTS sp1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.sp1 does not exist
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1 ()
+BEGIN
+declare x enum( 'db1', 'test' ) default 'test';
+SELECT x;
+END//
+CALL sp1();
+x
+test
+CREATE FUNCTION sp1 (y char) returns char return y;
+SELECT sp1( 'a' );
+sp1( 'a' )
+a
+DROP DATABASE IF EXISTS db1;
+Warnings:
+Note 1008 Can't drop database 'db1'; database doesn't exist
+CREATE DATABASE db1;
+USE db1;
+CALL db_storedproc.sp1( );
+x
+test
+SELECT db_storedproc.sp1( 'a' );
+db_storedproc.sp1( 'a' )
+a
+DROP FUNCTION db_storedproc.sp1;
+USE db_storedproc;
+SELECT sp1('a');
+ERROR 42000: FUNCTION db_storedproc.sp1 does not exist
+DROP PROCEDURE sp1;
+CALL sp1();
+ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
+SELECT sp1('a');
+ERROR 42000: FUNCTION db_storedproc.sp1 does not exist
+USE db_storedproc;
+DROP DATABASE db1;
+
+Testcase 4.1.18:
+----------------
+Ensure that it is possible to alter a procedure and
+a function with the same name, in the same database
+--------------------------------------------------------------------------------
+USE db_storedproc;
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+DROP FUNCTION IF EXISTS sp1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.sp1 does not exist
+set @x=null;
+set @y=null;
+CREATE PROCEDURE sp1()
+BEGIN
+set @x= 1;
+SELECT @x;
+END//
+CREATE FUNCTION sp1 () returns int return 2.2;
+CALL db_storedproc.sp1();
+@x
+1
+SELECT db_storedproc.sp1();
+db_storedproc.sp1()
+2
+DROP DATABASE IF EXISTS db1;
+Warnings:
+Note 1008 Can't drop database 'db1'; database doesn't exist
+CREATE DATABASE db1;
+USE db1;
+alter procedure db_storedproc.sp1 sql security invoker;
+SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1';
+name type security_type
+sp1 FUNCTION DEFINER
+sp1 PROCEDURE INVOKER
+alter function db_storedproc.sp1 sql security invoker;
+SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1';
+name type security_type
+sp1 FUNCTION INVOKER
+sp1 PROCEDURE INVOKER
+CALL db_storedproc.sp1();
+@x
+1
+SELECT db_storedproc.sp1();
+db_storedproc.sp1()
+2
+USE db_storedproc;
+alter procedure sp1 sql security DEFINER;
+CALL db_storedproc.sp1();
+@x
+1
+SELECT db_storedproc.sp1();
+db_storedproc.sp1()
+2
+alter function sp1 sql security DEFINER;
+SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1';
+name type security_type
+sp1 FUNCTION DEFINER
+sp1 PROCEDURE DEFINER
+CALL db_storedproc.sp1();
+@x
+1
+SELECT db_storedproc.sp1();
+db_storedproc.sp1()
+2
+USE db_storedproc;
+DROP DATABASE db1;
+DROP PROCEDURE db_storedproc.sp1;
+DROP FUNCTION db_storedproc.sp1;
+
+Testcase 4.1.19:
+----------------
+verify altering procedure and function with the same name, does not affect
+properties of a procedure and a function with the same name in the different
+database.
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc_3122;
+CREATE DATABASE db_storedproc_3122;
+USE db_storedproc;
+SET @x = NULL;
+SET @y = NULL;
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+DROP FUNCTION IF EXISTS sp1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.sp1 does not exist
+DROP PROCEDURE IF EXISTS db_storedproc_3122.sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc_3122.sp1 does not exist
+DROP FUNCTION IF EXISTS db_storedproc_3122.sp1;
+Warnings:
+Note 1305 FUNCTION db_storedproc_3122.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+SET @x = 1;
+SELECT @x;
+END//
+CREATE FUNCTION db_storedproc_3122.sp1() RETURNS DOUBLE RETURN 2.2;
+CALL sp1();
+@x
+1
+SELECT db_storedproc_3122.sp1();
+db_storedproc_3122.sp1()
+2.2
+USE db_storedproc_3122;
+CREATE PROCEDURE sp1 ()
+BEGIN
+SET @x = 3;
+SELECT @x;
+END//
+CREATE FUNCTION db_storedproc.sp1() RETURNS DOUBLE RETURN 4.4;
+CALL sp1();
+@x
+3
+SELECT db_storedproc.sp1();
+db_storedproc.sp1()
+4.4
+ALTER PROCEDURE db_storedproc_3122.sp1 SQL SECURITY INVOKER;
+ALTER FUNCTION sp1 SQL SECURITY INVOKER;
+SELECT db, name, type, security_type FROM mysql.proc WHERE db LIKE 'db_storedproc%' AND specific_name='sp1';
+db name type security_type
+db_storedproc sp1 FUNCTION DEFINER
+db_storedproc sp1 PROCEDURE DEFINER
+db_storedproc_3122 sp1 FUNCTION INVOKER
+db_storedproc_3122 sp1 PROCEDURE INVOKER
+CALL db_storedproc.sp1();
+@x
+1
+SELECT db_storedproc.sp1();
+db_storedproc.sp1()
+4.4
+CALL db_storedproc_3122.sp1();
+@x
+3
+SELECT db_storedproc_3122.sp1();
+db_storedproc_3122.sp1()
+2.2
+USE db_storedproc;
+DROP DATABASE db_storedproc_3122;
+DROP FUNCTION db_storedproc.sp1;
+DROP PROCEDURE db_storedproc.sp1;
+
+Testcase 4.1.20:
+----------------
+Ensure that it is possible to alter the comment of a procedure
+and a function with the same name, even in the same database
+--------------------------------------------------------------------------------
+USE db_storedproc;
+set @x=null;
+DROP PROCEDURE IF EXISTS sp1;
+DROP FUNCTION IF EXISTS sp1;
+CREATE PROCEDURE sp1 () set @x= 1;
+CREATE FUNCTION sp1 () returns int return 2;
+DROP DATABASE IF EXISTS db_storedproc_3122;
+Warnings:
+Note 1008 Can't drop database 'db_storedproc_3122'; database doesn't exist
+CREATE DATABASE db_storedproc_3122;
+USE db_storedproc_3122;
+CREATE PROCEDURE sp1 () set @x= 3;
+CREATE FUNCTION sp1 () returns int return 4;
+alter procedure sp1 sql security invoker comment 'this is a procedure';
+alter function sp1 sql security invoker comment 'this is a function';
+alter procedure sp1 sql security DEFINER;
+alter function sp1 sql security DEFINER;
+show CREATE PROCEDURE sp1;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
+ COMMENT 'this is a procedure'
+set @x= 3 latin1 <modified> <created>
+show CREATE FUNCTION sp1;
+Function sql_mode Create Function character_set_client collation_connection Database Collation
+sp1 CREATE DEFINER=`root`@`localhost` FUNCTION `sp1`() RETURNS int(11)
+ COMMENT 'this is a function'
+return 4 latin1 <modified> <created>
+USE db_storedproc;
+DROP DATABASE db_storedproc_3122;
+DROP FUNCTION db_storedproc.sp1;
+DROP PROCEDURE db_storedproc.sp1;
+
+Testcase 4.1.21:
+----------------
+Ensure that it is not possible to create two procedures with same name
+in same database
+--------------------------------------------------------------------------------
+USE db_storedproc;
+set @x=null;
+set @y=null;
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1 () set @x=1;
+CREATE PROCEDURE sp1 () set @x=2;
+ERROR 42000: PROCEDURE sp1 already exists
+CALL sp1();
+SELECT @x;
+@x
+1
+USE db1;
+CREATE PROCEDURE db_storedproc.sp1 () set @x=3;
+ERROR 42000: PROCEDURE sp1 already exists
+CALL db_storedproc.sp1();
+SELECT @x;
+@x
+1
+DROP PROCEDURE IF EXISTS db_storedproc.sp1;
+CREATE PROCEDURE db_storedproc.sp1 () set @x=1;
+CREATE PROCEDURE db_storedproc.sp1 () set @x=2;
+ERROR 42000: PROCEDURE sp1 already exists
+CALL db_storedproc.sp1();
+SELECT @x;
+@x
+1
+USE db_storedproc;
+DROP DATABASE db1;
+DROP PROCEDURE db_storedproc.sp1;
+
+Testcase 4.1.22:
+----------------
+Ensure that it is not possible to create two functions with same name in the
+same database
+--------------------------------------------------------------------------------
+USE db_storedproc;
+DROP DATABASE IF EXISTS db1;
+Warnings:
+Note 1008 Can't drop database 'db1'; database doesn't exist
+CREATE DATABASE db1;
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1 () returns int return 1;
+CREATE FUNCTION fn1 () returns int return 2;
+ERROR 42000: FUNCTION fn1 already exists
+SELECT fn1();
+fn1()
+1
+USE db1;
+CREATE FUNCTION db_storedproc.fn1 () returns int return 3;
+ERROR 42000: FUNCTION fn1 already exists
+SELECT db_storedproc.fn1();
+db_storedproc.fn1()
+1
+DROP FUNCTION IF EXISTS db_storedproc.fn1;
+CREATE FUNCTION db_storedproc.fn1 () returns int return 1;
+CREATE FUNCTION db_storedproc.fn1 () returns int return 2;
+ERROR 42000: FUNCTION fn1 already exists
+SELECT db_storedproc.fn1();
+db_storedproc.fn1()
+1
+USE db_storedproc;
+DROP DATABASE db1;
+DROP FUNCTION db_storedproc.fn1;
+
+Testcase 4.1.23:
+----------------
+Ensure that it is possible to create two or more procedures with the same name,
+providing each resides in different databases
+--------------------------------------------------------------------------------
+USE db_storedproc;
+set @x=null;
+set @y=null;
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1 () set @x= 1;
+DROP DATABASE IF EXISTS test3124;
+Warnings:
+Note 1008 Can't drop database 'test3124'; database doesn't exist
+CREATE DATABASE test3124;
+USE test3124;
+CREATE PROCEDURE sp1 () set @y= 2;
+CALL sp1();
+SELECT @x, @y;
+@x @y
+NULL 2
+USE db_storedproc;
+CALL sp1();
+SELECT @x, @y;
+@x @y
+1 2
+USE db_storedproc;
+DROP DATABASE test3124;
+DROP PROCEDURE db_storedproc.sp1;
+
+Testcase 4.1.24:
+----------------
+Ensure that it is possible to create two or more functions with the same name,
+providing each resides in different databases.
+--------------------------------------------------------------------------------
+USE db_storedproc;
+DROP FUNCTION IF EXISTS f1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.f1 does not exist
+CREATE FUNCTION f1 () returns int return 1;
+DROP DATABASE IF EXISTS test3125;
+Warnings:
+Note 1008 Can't drop database 'test3125'; database doesn't exist
+CREATE DATABASE test3125;
+USE test3125;
+CREATE FUNCTION f1 () returns int return 2;
+SELECT f1();
+f1()
+2
+USE db_storedproc;
+SELECT f1();
+f1()
+1
+USE db_storedproc;
+DROP DATABASE test3125;
+DROP FUNCTION db_storedproc.f1;
+
+Testcase 4.1.25:
+----------------
+Ensure that any invalid function name is never accepted, and that an appropriate
+error message is returned when the name is rejected. (invalid func name)
+--------------------------------------------------------------------------------
+CREATE FUNCTION !_fn1( f1 char(20) ) returns int
+BEGIN
+SELECT * from t1 where f2 = f1;
+return 1;
+END//
+ERROR 42000: 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 '!_fn1( f1 char(20) ) returns int
+BEGIN
+SELECT * from t1 where f2 = f1;
+return...' at line 1
+CREATE FUNCTION fn1( f1 char(20) ) return int
+BEGIN
+SELECT * from t1 where f2 = f1;
+return 1;
+END//
+ERROR 42000: 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 'return int
+BEGIN
+SELECT * from t1 where f2 = f1;
+return 1;
+END' at line 1
+CREATE FUNCTION fn1() returns int
+return 'a';
+CREATE FUNCTION procedure() returns int
+return 1;
+ERROR 42000: 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 'procedure() returns int
+return 1' at line 1
+CREATE FUNCTION fn1(a char) returns int lang sql return 1;
+ERROR 42000: 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 'sql return 1' at line 1
+CREATE FUNCTION fn1(a char) returns int deterministic( return 1);
+ERROR 42000: 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 '( return 1)' at line 1
+CREATE FUNCTION fn1(a char) returns int non deterministic return 1;
+ERROR 42000: 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 'deterministic return 1' at line 1
+CREATE FUNCTION fn1(a char) returns int not deterministic comment 'abc' language sql sql security refiner return 1;
+ERROR 42000: 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 'refiner return 1' at line 1
+DROP FUNCTION IF EXISTS fn1;
+
+Testcase 4.1.1:
+---------------
+Ensure that all clauses that should be supported are supported.
+CREATE PROCEDURE
+--------------------------------------------------------------------------------
+USE db_storedproc;
+set @count = 0;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1(cnt int(20))
+BEGIN
+SELECT count(*) into cnt from t2;
+set @count = cnt;
+END//
+CALL sp1( 10 );
+SELECT @count;
+@count
+10
+DROP PROCEDURE sp1;
+
+Testcase 4.2.2:
+BEGINend
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( cnt int(20) )
+BEGIN
+SELECT count(*) into cnt from t2;
+set @count = cnt;
+SELECT @count;
+END//
+CALL sp1( 10 );
+@count
+10
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( cnt int(20) )
+SELECT count(*) into cnt from t2;
+set @count = cnt;
+SELECT @count;
+END//
+ERROR 42S22: Unknown column 'cnt' in 'field list'
+CALL sp1( 10 );
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1( cnt int(20) )
+END
+SELECT count(*) into cnt from t2;
+set @count = cnt;
+SELECT @count;
+BEGIN//
+ERROR 42000: 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 'END
+SELECT count(*) into cnt from t2;
+set @count = cnt;
+SELECT @count;
+BEGIN' at line 2
+CALL sp1( 10 );
+ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( cnt int(20) )
+BEGIN
+SELECT count(*) into cnt from t2;
+BEGIN
+BEGIN END;
+BEGIN
+END;
+set @count = cnt;
+SELECT @count;
+END//
+ERROR 42000: 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 10
+
+Testcase 4.2.4:
+---------------
+Ensure that every BEGIN statement is coupled with a terminating END statement.
+(BEGIN with no END)
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1;
+END//
+
+Testcase ....:
+--------------
+
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+accessible:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'accessible:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+add:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'add:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+all:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'all:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+alter:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+analyze:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+and:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'and:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+as:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'as:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+asc:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'asc:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+asensitive:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'asensitive:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+before:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'before:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+between:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'between:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+bigint:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'bigint:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+binary:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'binary:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+blob:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'blob:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+both:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'both:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+by:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'by:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+call:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+cascade:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'cascade:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+case:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+change:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+char:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'char:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+character:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'character:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+check:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+collate:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'collate:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+column:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'column:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+condition:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'condition:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+constraint:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'constraint:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+continue:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'continue:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+convert:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'convert:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+create:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+cross:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'cross:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+current_date:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'current_date:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+current_time:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'current_time:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+current_timestamp:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'current_timestamp:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+current_user:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'current_user:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+cursor:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'cursor:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+database:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'database:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+databases:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'databases:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+day_hour:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'day_hour:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+day_microsecond:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'day_microsecond:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+day_minute:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'day_minute:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+day_second:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'day_second:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+dec:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'dec:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+decimal:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'decimal:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+declare:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'declare:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+default:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'default:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+delayed:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'delayed:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+delete:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+desc:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+describe:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+deterministic:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+distinct:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'distinct:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+distinctrow:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'distinctrow:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+div:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'div:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+double:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'double:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+drop:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+dual:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'dual:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+each:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'each:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+else:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'else:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+elseif:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'elseif:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+enclosed:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'enclosed:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+escaped:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'escaped:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+exists:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'exists:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+exit:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'exit:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+explain:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+false:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'false:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+fetch:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+float:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'float:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+float4:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'float4:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+float8:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'float8:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+for:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+force:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'force:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+foreign:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'foreign:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+from:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'from:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+fulltext:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'fulltext:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+grant:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+group:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'group:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+having:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'having:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+high_priority:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'high_priority:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+hour_microsecond:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'hour_microsecond:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+hour_minute:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'hour_minute:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+hour_second:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'hour_second:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+if:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+ignore:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'ignore:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+in:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'in:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+index:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'index:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+infile:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'infile:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+inner:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'inner:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+inout:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'inout:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+insensitive:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'insensitive:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+insert:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+int:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'int:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+int1:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'int1:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+int2:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'int2:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+int3:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'int3:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+int4:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'int4:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+int8:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'int8:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+integer:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'integer:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+interval:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'interval:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+into:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'into:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+is:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'is:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+iterate:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+join:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'join:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+key:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'key:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+keys:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'keys:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+kill:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+leading:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'leading:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+leave:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+left:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'left:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+like:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'like:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+limit:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'limit:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+linear:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'linear:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+lines:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'lines:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+load:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+localtime:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'localtime:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+localtimestamp:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'localtimestamp:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+lock:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+long:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'long:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+longblob:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'longblob:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+longtext:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'longtext:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+loop:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+low_priority:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'low_priority:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+master_ssl_verify_server_cert:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'master_ssl_verify_server_cert:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+match:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'match:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+mediumblob:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'mediumblob:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+mediumint:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'mediumint:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+mediumtext:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'mediumtext:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+middleint:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'middleint:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+minute_microsecond:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'minute_microsecond:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+minute_second:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'minute_second:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+mod:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'mod:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+modifies:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+natural:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'natural:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+not:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+no_write_to_binlog:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'no_write_to_binlog:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+null:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'null:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+numeric:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'numeric:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+on:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'on:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+optimize:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+option:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'option:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+optionally:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'optionally:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+or:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'or:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+order:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'order:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+out:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'out:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+outer:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'outer:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+outfile:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'outfile:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+precision:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'precision:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+primary:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'primary:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+procedure:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'procedure:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+purge:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+range:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'range:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+read:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'read:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+reads:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+read_write:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'read_write:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+real:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'real:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+references:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'references:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+regexp:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'regexp:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+release:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+rename:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+repeat:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+replace:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+require:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'require:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+restrict:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'restrict:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+return:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+revoke:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+right:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'right:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+rlike:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'rlike:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+schema:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'schema:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+schemas:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'schemas:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+second_microsecond:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'second_microsecond:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+select:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+sensitive:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'sensitive:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+separator:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'separator:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+set:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+show:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+smallint:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'smallint:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+spatial:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'spatial:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+specific:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'specific:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+sql:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+sqlexception:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'sqlexception:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+sqlstate:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'sqlstate:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+sqlwarning:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'sqlwarning:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+sql_big_result:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'sql_big_result:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+sql_calc_found_rows:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'sql_calc_found_rows:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+sql_small_result:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'sql_small_result:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+ssl:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'ssl:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+starting:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'starting:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+straight_join:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'straight_join:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+table:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'table:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+terminated:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'terminated:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+then:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'then:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+tinyblob:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'tinyblob:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+tinyint:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'tinyint:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+tinytext:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'tinytext:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+to:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'to:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+trailing:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'trailing:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+trigger:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'trigger:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+true:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'true:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+undo:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'undo:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+union:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'union:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+unique:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'unique:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+unlock:BEGIN
+SELECT @x;
+END//
+ERROR 0A000: UNLOCK is not allowed in stored procedures
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+unsigned:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'unsigned:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+update:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+usage:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'usage:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+use:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+using:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'using:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+utc_date:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'utc_date:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+utc_time:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'utc_time:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+utc_timestamp:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'utc_timestamp:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+values:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+varbinary:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'varbinary:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+varchar:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'varchar:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+varcharacter:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'varcharacter:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+varying:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'varying:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+when:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'when:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+where:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'where:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+while:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+with:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 ':BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+write:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'write:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+xor:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'xor:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+year_month:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'year_month:BEGIN
+SELECT @x;
+END' at line 2
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+zerofill:BEGIN
+SELECT @x;
+END//
+ERROR 42000: 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 'zerofill:BEGIN
+SELECT @x;
+END' at line 2
+
+Testcase 4.2.6:
+---------------
+Ensure that the labels for multiple BEGIN an END work properly
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+begin_label: BEGIN
+declare x char;
+declare y char;
+set x = '1';
+set y = '2';
+label1: BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1;
+END label1;
+set @v1 = x;
+set @v2 = y;
+SELECT @v1, @v2;
+END begin_label//
+CALL sp1();
+@v1 @v2
+1 2
+Warnings:
+Warning 1265 Data truncated for column 'x' at row 1
+Warning 1265 Data truncated for column 'y' at row 1
+DROP PROCEDURE sp1;
+
+Testcase 4.2.7:
+---------------
+Ensure that the labels enclosing each BEGIN/END compound statement must match.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+begin1_label: BEGIN
+declare x char;
+declare y char;
+SELECT lf1, f1 into x, y from t2 limit 1;
+begin2_label: BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1;
+END begin2_changed;
+END begin1_changed//
+ERROR 42000: End-label begin2_changed without match
+
+Testcase 4.2.8:
+---------------
+Ensure that it is possible to put a beginning label at the start of a
+BEGIN/END compound statement without also requiring an ending label
+at the END of the same statement.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+begin_label: BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1;
+END//
+CALL sp1();
+Warnings:
+Warning 1265 Data truncated for column 'x' at row 1
+Warning 1265 Data truncated for column 'y' at row 1
+DROP PROCEDURE sp1;
+
+Testcase 4.2.9:
+---------------
+Ensure that it is not possible to put an ending label at the END of
+a BEGIN/END compound statement without also requiring a matching
+beginning label at the start of the same statement
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1;
+END begin_label//
+ERROR 42000: 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 'begin_label' at line 6
+
+Testcase 4.2.10:
+----------------
+Ensure that every beginning label must END with a colon(:)
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+begin_label BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1;
+END begin_label//
+ERROR 42000: 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 'BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1...' at line 2
+
+Testcase 4.2.11:
+----------------
+Ensure that every beginning label with the same scope must be unique. (same label names)
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+begin_samelabel: BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1;
+begin_samelabel: BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1;
+END begin_samelabel;
+begin_samelabel: BEGIN
+declare x char;
+declare y char;
+SELECT f1, f2 into x, y from t2 limit 1;
+END begin_samelabel;
+END begin_samelabel//
+ERROR 42000: Redefining label begin_samelabel
+
+Testcase 4.2.12:
+----------------
+Ensure that the variables, cursors, conditions, and handlers declared for
+a stored procedure (with the declare statement) may only be properly defined
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare x char default 'a';
+declare y integer default 1;
+declare z float default 1.1;
+declare a enum("value1", "value2") default 'value1';
+declare b decimal(255, 255) default 1.2e+12;
+declare c mediumtext default 'mediumtext';
+declare d datetime default '2005-02-02 12:12:12';
+declare e char default 'b';
+declare cur1 cursor for SELECT f1 from db_storedproc.t2;
+declare continue handler for sqlstate '02000' set @x2 = 1;
+open cur1;
+fetch cur1 into e;
+SELECT x, y, z, a, b, c, d, e;
+close cur1;
+END//
+ERROR 42000: Too big scale specified for 'b'. Maximum is 38
+CALL sp6();
+ERROR 42000: PROCEDURE db_storedproc.sp6 does not exist
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare x12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 char default '0';
+SELECT x12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567;
+END//
+CALL sp6();
+x12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
+0
+DROP PROCEDURE sp6;
+
+Testcase 4.2.13:
+----------------
+Ensure that the variables declared for a stored procedure (with the declare
+statement) may only be defined in the correct order.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare x default '0' char;
+SELECT x;
+END//
+ERROR HY000: Unknown data type: 'default'
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare x char, integer default '0';
+SELECT x;
+END//
+ERROR 42000: 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 ' integer default '0';
+SELECT x;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare x1, x2 char, integer default '0', 1;
+SELECT x;
+END//
+ERROR 42000: 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 ' integer default '0', 1;
+SELECT x;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare char x;
+declare char y;
+SELECT f1, f2 into x, y from t2 limit 1;
+END//
+ERROR 42000: 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 'char x;
+declare char y;
+SELECT f1, f2 into x, y from t2 limit 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare char x, y1 integer default 0;
+declare char y;
+SELECT f1, f2 into x, y from t2 limit 1;
+END//
+ERROR 42000: 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 'char x, y1 integer default 0;
+declare char y;
+SELECT f1, f2 into x, y from t2...' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare x default 'a' char;
+END//
+ERROR HY000: Unknown data type: 'default'
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare condition notable for sqlstate '42s22';
+END//
+ERROR 42000: 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 'condition notable for sqlstate '42s22';
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare condition for notable sqlstate '42s22';
+END//
+ERROR 42000: 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 'condition for notable sqlstate '42s22';
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare condition for sqlstate notable '42s22';
+END//
+ERROR 42000: 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 'condition for sqlstate notable '42s22';
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare condition for sqlstate '42s22' notable;
+END//
+ERROR 42000: 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 'condition for sqlstate '42s22' notable;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare cursor cur1 for SELECT f1 from db_storedproc.t2;
+END//
+ERROR 42000: 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 'cursor cur1 for SELECT f1 from db_storedproc.t2;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare cursor for cur1 SELECT f1 from db_storedproc.t2;
+END//
+ERROR 42000: 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 'cursor for cur1 SELECT f1 from db_storedproc.t2;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare cursor for SELECT cur1 f1 from db_storedproc.t2;
+END//
+ERROR 42000: 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 'cursor for SELECT cur1 f1 from db_storedproc.t2;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare handler continue for sqlstate '02000' set @x2 = 1;
+END//
+ERROR HY000: Unknown data type: 'continue'
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare handler exit for sqlstate '02000' set @x2 = 1;
+END//
+ERROR 42000: 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 'exit for sqlstate '02000' set @x2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare handler undo for sqlstate '02000' set @x2 = 1;
+END//
+ERROR HY000: Unknown data type: 'undo'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare char x;
+SELECT f1 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'char x;
+SELECT f1 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare char binary x;
+SELECT f2 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'char binary x;
+SELECT f2 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare char ascii x;
+SELECT f3 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'char ascii x;
+SELECT f3 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinytext x;
+SELECT f4 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'tinytext x;
+SELECT f4 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x;
+SELECT f5 text into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 ';
+SELECT f5 text into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumtext x;
+SELECT f6 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'mediumtext x;
+SELECT f6 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare longtext x;
+SELECT f7 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'longtext x;
+SELECT f7 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinyblob x;
+SELECT f8 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'tinyblob x;
+SELECT f8 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare blob x;
+SELECT f9 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'blob x;
+SELECT f9 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumblob x;
+SELECT f10 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'mediumblob x;
+SELECT f10 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare longblob x;
+SELECT f11 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'longblob x;
+SELECT f11 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare binary x;
+SELECT f12 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'binary x;
+SELECT f12 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinyint x;
+SELECT f13 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'tinyint x;
+SELECT f13 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinyint unsigned x;
+SELECT f14 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'tinyint unsigned x;
+SELECT f14 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinyint zerofill x;
+SELECT f15 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'tinyint zerofill x;
+SELECT f15 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinyint unsigned zerofill x;
+SELECT f16 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'tinyint unsigned zerofill x;
+SELECT f16 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare smallint x;
+SELECT f17 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'smallint x;
+SELECT f17 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare smallint unsigned x;
+SELECT f18 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'smallint unsigned x;
+SELECT f18 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare smallint zerofill x;
+SELECT f19 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'smallint zerofill x;
+SELECT f19 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare smallint unsigned zerofill x;
+SELECT f20 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'smallint unsigned zerofill x;
+SELECT f20 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumint x;
+SELECT f21 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'mediumint x;
+SELECT f21 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumint unsigned x;
+SELECT f22 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'mediumint unsigned x;
+SELECT f22 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumint zerofill x;
+SELECT f23 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'mediumint zerofill x;
+SELECT f23 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumint unsigned zerofill x;
+SELECT f24 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'mediumint unsigned zerofill x;
+SELECT f24 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int x;
+SELECT f25 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'int x;
+SELECT f25 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int unsigned x;
+SELECT f26 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'int unsigned x;
+SELECT f26 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int zerofill x;
+SELECT f27 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'int zerofill x;
+SELECT f27 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int unsigned zerofill x;
+SELECT f28 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'int unsigned zerofill x;
+SELECT f28 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare bigint x;
+SELECT f29 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'bigint x;
+SELECT f29 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare bigint unsigned x;
+elect f30 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'bigint unsigned x;
+elect f30 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare bigint zerofill x;
+SELECT f31 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'bigint zerofill x;
+SELECT f31 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare bigint unsigned zerofill x;
+SELECT f32 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'bigint unsigned zerofill x;
+SELECT f32 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal x;
+SELECT f33 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal x;
+SELECT f33 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal unsigned x;
+SELECT f34 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal unsigned x;
+SELECT f34 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal zerofill x;
+SELECT f35 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal zerofill x;
+SELECT f35 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal unsigned zerofill not null x;
+SELECT f36 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal unsigned zerofill not null x;
+SELECT f36 into x from tb1 limit 9998,...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (0) not null x;
+SELECT f37 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (0) not null x;
+SELECT f37 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (64) not null x;
+SELECT f38 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (64) not null x;
+SELECT f38 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (0) unsigned not null x;
+SELECT f39 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (0) unsigned not null x;
+SELECT f39 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (64) unsigned not null x;
+SELECT f40 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (64) unsigned not null x;
+SELECT f40 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (0) zerofill not null x;
+SELECT f41 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (0) zerofill not null x;
+SELECT f41 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (64) zerofill not null x;
+SELECT f42 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (64) zerofill not null x;
+SELECT f42 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (0) unsigned zerofill not null x;
+SELECT f43 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (0) unsigned zerofill not null x;
+SELECT f43 into x from tb1 limit 9...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (64) unsigned zerofill not null x;
+SELECT f44 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (64) unsigned zerofill not null x;
+SELECT f44 into x from tb1 limit ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (00) not null x;
+SELECT f45 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (00) not null x;
+SELECT f45 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (63, 30) not null x;
+SELECT f46 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (63, 30) not null x;
+SELECT f46 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (00) unsigned not null x;
+SELECT f47 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (00) unsigned not null x;
+SELECT f47 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (63, 30) unsigned not null x;
+SELECT f48 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (63, 30) unsigned not null x;
+SELECT f48 into x from tb1 limit 9998,...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (00) zerofill not null x;
+SELECT f49 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (00) zerofill not null x;
+SELECT f49 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (63, 30) zerofill not null x;
+SELECT f50 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (63, 30) zerofill not null x;
+SELECT f50 into x from tb1 limit 9998,...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (00) unsigned zerofill not null x;
+SELECT f51 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (00) unsigned zerofill not null x;
+SELECT f51 into x from tb1 limit ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal (63, 30) unsigned zerofill not null x;
+SELECT f52 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'decimal (63, 30) unsigned zerofill not null x;
+SELECT f52 into x from tb1 li...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric not null x;
+SELECT f53 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric not null x;
+SELECT f53 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric unsigned not null x;
+SELECT f54 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric unsigned not null x;
+SELECT f54 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric zerofill not null x;
+SELECT f55 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric zerofill not null x;
+SELECT f55 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric unsigned zerofill not null x;
+SELECT f56 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric unsigned zerofill not null x;
+SELECT f56 into x from tb1 limit 9998,...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (0) not null x;
+SELECT f57 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (0) not null x;
+SELECT f57 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (64) not nul x;
+SELECT f58 into x from tb1 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (64) not nul x;
+SELECT f58 into x from tb1 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (0) unsigned x;
+SELECT f59 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (0) unsigned x;
+SELECT f59 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (64) unsigned x;
+SELECT f60 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (64) unsigned x;
+SELECT f60 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (0) zerofill x;
+SELECT f61 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (0) zerofill x;
+SELECT f61 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (64) zerofill x;
+SELECT f62 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (64) zerofill x;
+SELECT f62 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (0) unsigned zerofill x;
+SELECT f63 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (0) unsigned zerofill x;
+SELECT f63 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (64) unsigned zerofill x;
+SELECT f64 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (64) unsigned zerofill x;
+SELECT f64 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (00) x;
+SELECT f65 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (00) x;
+SELECT f65 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (63, 30) x;
+SELECT f66 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (63, 30) x;
+SELECT f66 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (00) unsigned x;
+SELECT f67 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (00) unsigned x;
+SELECT f67 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (63, 30) unsigned x;
+SELECT f68 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (63, 30) unsigned x;
+SELECT f68 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (00) zerofill x;
+SELECT f69 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (00) zerofill x;
+SELECT f69 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (63, 30) zerofill x;
+SELECT f70 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (63, 30) zerofill x;
+SELECT f70 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (00) unsigned zerofill x;
+SELECT f71 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (00) unsigned zerofill x;
+SELECT f71 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric (63, 30) unsigned zerofill x;
+SELECT f72 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'numeric (63, 30) unsigned zerofill x;
+SELECT f72 into x from tb2 limit 9998,...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare real x;
+SELECT f73 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'real x;
+SELECT f73 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare real unsigned x;
+SELECT f74 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'real unsigned x;
+SELECT f74 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare real zerofill x;
+SELECT f75 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'real zerofill x;
+SELECT f75 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare real unsigned zerofill x;
+SELECT f76 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'real unsigned zerofill x;
+SELECT f76 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare double x;
+SELECT f77 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'double x;
+SELECT f77 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare double unsigned x;
+SELECT f78 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'double unsigned x;
+SELECT f78 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare double zerofill x;
+SELECT f79 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'double zerofill x;
+SELECT f79 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare double unsigned zerofill x;
+SELECT f80 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'double unsigned zerofill x;
+SELECT f80 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float not null x;
+SELECT f81 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float not null x;
+SELECT f81 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float unsigned not null x;
+SELECT f82 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float unsigned not null x;
+SELECT f82 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float zerofill not null x;
+SELECT f83 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float zerofill not null x;
+SELECT f83 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float unsigned zerofill not null x;
+SELECT f84 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float unsigned zerofill not null x;
+SELECT f84 into x from tb2 limit 9998, 1...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(0) not null x;
+SELECT f85 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(0) not null x;
+SELECT f85 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(23) not null x;
+SELECT f86 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(23) not null x;
+SELECT f86 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(0) unsigned not null x;
+SELECT f87 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(0) unsigned not null x;
+SELECT f87 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(23) unsigned not null x;
+SELECT f88 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(23) unsigned not null x;
+SELECT f88 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(0) zerofill not null x;
+SELECT f89 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(0) zerofill not null x;
+SELECT f89 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(23) zerofill not null x;
+SELECT f90 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(23) zerofill not null x;
+SELECT f90 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(0) unsigned zerofill not null x;
+SELECT f91 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(0) unsigned zerofill not null x;
+SELECT f91 into x from tb2 limit 9998...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(23) unsigned zerofill not null x;
+SELECT f92 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(23) unsigned zerofill not null x;
+SELECT f92 into x from tb2 limit 999...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(24) not null x;
+SELECT f93 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(24) not null x;
+SELECT f93 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(53) not null x;
+SELECT f94 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(53) not null x;
+SELECT f94 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(24) unsigned not null x;
+SELECT f95 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(24) unsigned not null x;
+SELECT f95 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(53) unsigned not null x;
+SELECT f96 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(53) unsigned not null x;
+SELECT f96 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(24) zerofill not null x;
+SELECT f97 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(24) zerofill not null x;
+SELECT f97 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(53) zerofill not null x;
+SELECT f98 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(53) zerofill not null x;
+SELECT f98 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(24) unsigned zerofill not null x;
+SELECT f99 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(24) unsigned zerofill not null x;
+SELECT f99 into x from tb2 limit 999...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float(53) unsigned zerofill not null x;
+SELECT f100 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'float(53) unsigned zerofill not null x;
+SELECT f100 into x from tb2 limit 99...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare date not null x;
+SELECT f101 into x from tb2 limit 9998, 1;
+END//
+ERROR HY000: Unknown data type: 'not'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare time not null x;
+SELECT f102 into x from tb2 limit 9998, 1;
+END//
+ERROR HY000: Unknown data type: 'not'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare datetime not null x;
+SELECT f103 into x from tb2 limit 9998, 1;
+END//
+ERROR HY000: Unknown data type: 'not'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare timestamp not null x;
+SELECT f104 into x from tb2 limit 9998, 1;
+END//
+ERROR HY000: Unknown data type: 'not'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare year not null x;
+SELECT f105 into x from tb2 limit 9998, 1;
+END//
+ERROR HY000: Unknown data type: 'not'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare year(3) not null x;
+SELECT f106 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 '(3) not null x;
+SELECT f106 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare year(4) not null x;
+SELECT f107 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 '(4) not null x;
+SELECT f107 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare enum("1enum", "2enum") not null x;
+SELECT f108 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 '("1enum", "2enum") not null x;
+SELECT f108 into x from tb2 limit 9998, 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare set("1set", "2set") not nul x;
+SELECT f109 into x from tb2 limit 9998, 1;
+END//
+ERROR 42000: 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 'set("1set", "2set") not nul x;
+SELECT f109 into x from tb2 limit 9998, 1;
+END' at line 3
+
+Testcase 4.2.14:
+----------------
+Ensure that the handlers declared for a stored procedure (with the declare
+statement) may only be defined in the correct order
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '23000' set @x2 = 1;
+declare x char;
+END//
+ERROR 42000: Variable or condition declaration after cursor or handler declaration
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare cursor1 cursor for SELECT f1 from tb1;
+declare x char;
+END//
+ERROR 42000: Variable or condition declaration after cursor or handler declaration
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare cursor1 cursor for SELECT f1 from tb1;
+declare sqlcondition condition for sqlstate '02000';
+END//
+ERROR 42000: Variable or condition declaration after cursor or handler declaration
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare sqlcondition condition for sqlstate '02000';
+declare continue handler for sqlcondition set @x=1;
+declare cursor1 cursor for SELECT f1 from tb1;
+END//
+ERROR 42000: Cursor declaration after handler declaration
+
+Testcase 4.2.15:
+----------------
+Ensure that the declare statement can declare multiple variables both separately
+and all at once from a variable list. (multiple declaration)
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+DECLARE x1 CHAR(100) DEFAULT 'outer';
+BEGIN
+DECLARE x1 CHAR(100) DEFAULT x1;
+END;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z char default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z char ascii default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z tinytext default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z text default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z mediumtext default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z longtext default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z tinyblob default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z blob default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z mediumblob default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z longblob default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z binary default null;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+NULL NULL NULL
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z tinyint default -126;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+-126 -126 -126
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z tinyint unsigned default 253;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+253 253 253
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z tinyint zerofill default -1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+000 000 000
+Warnings:
+Warning 1264 Out of range value for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z tinyint unsigned zerofill default 1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+001 001 001
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z smallint default -32768;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+-32768 -32768 -32768
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z smallint unsigned default 65535;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+65535 65535 65535
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z smallint zerofill default -1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+00000 00000 00000
+Warnings:
+Warning 1264 Out of range value for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z smallint unsigned zerofill default 1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+00001 00001 00001
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z mediumint default -8388608;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+-8388608 -8388608 -8388608
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z mediumint unsigned default 16777215;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+16777215 16777215 16777215
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z mediumint zerofill default -1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+00000000 00000000 00000000
+Warnings:
+Warning 1264 Out of range value for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z mediumint unsigned zerofill default 1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+00000001 00000001 00000001
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z int default -2147483648;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+-2147483648 -2147483648 -2147483648
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z int unsigned default 4294967295;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+4294967295 4294967295 4294967295
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z int zerofill default -1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+0000000000 0000000000 0000000000
+Warnings:
+Warning 1264 Out of range value for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z int unsigned zerofill default 1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+0000000001 0000000001 0000000001
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z bigint default -9223372036854775808;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+-9223372036854775808 -9223372036854775808 -9223372036854775808
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z bigint unsigned default 18446744073709551615;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+18446744073709551615 18446744073709551615 18446744073709551615
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z bigint zerofill default -1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+00000000000000000000 00000000000000000000 00000000000000000000
+Warnings:
+Warning 1264 Out of range value for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z bigint unsigned zerofill default 1;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+00000000000000000001 00000000000000000001 00000000000000000001
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z decimal default -34028234660123456789012345678901234567;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+-9999999999 -9999999999 -9999999999
+Warnings:
+Warning 1264 Out of range value for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z decimal unsigned default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+0 0 0
+Warnings:
+Note 1265 Data truncated for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z decimal zerofill default -34028234660123456789012345678901234567;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+0000000000 0000000000 0000000000
+Warnings:
+Warning 1264 Out of range value for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z decimal unsigned zerofill default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+0000000000 0000000000 0000000000
+Warnings:
+Note 1265 Data truncated for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z numeric default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+0 0 0
+Warnings:
+Note 1265 Data truncated for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z numeric unsigned default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+0 0 0
+Warnings:
+Note 1265 Data truncated for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z numeric zerofill default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+0000000000 0000000000 0000000000
+Warnings:
+Note 1265 Data truncated for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z numeric unsigned zerofill default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+0000000000 0000000000 0000000000
+Warnings:
+Note 1265 Data truncated for column 'x' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z real default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+1.175494351e-38 1.175494351e-38 1.175494351e-38
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z real unsigned default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+1.175494351e-38 1.175494351e-38 1.175494351e-38
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z real zerofill default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z real unsigned zerofill default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z float default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+1.17549e-38 1.17549e-38 1.17549e-38
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z float unsigned default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+1.17549e-38 1.17549e-38 1.17549e-38
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z float zerofill default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+01.17549e-38 01.17549e-38 01.17549e-38
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z float unsigned zerofill default 1.175494351e-38;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+01.17549e-38 01.17549e-38 01.17549e-38
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z date default '2005-02-02';
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+2005-02-02 2005-02-02 2005-02-02
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z time default '12:20:12';
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+12:20:12 12:20:12 12:20:12
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z datetime default '2005-02-02 12:20:12';
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+2005-02-02 12:20:12 2005-02-02 12:20:12 2005-02-02 12:20:12
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z timestamp default '20050202122012';
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+2005-02-02 12:20:12 2005-02-02 12:20:12 2005-02-02 12:20:12
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z year default 2005;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+2005 2005 2005
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z year(3) default 2005;
+SELECT x, y, z;
+END//
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+CALL sp1();
+x y z
+2005 2005 2005
+Warnings:
+Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z year(4) default 2005;
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+2005 2005 2005
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z enum("1enum", "2enum") default "2enum";
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+2enum 2enum 2enum
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x, y, z set("1set", "2set") default "2set";
+SELECT x, y, z;
+END//
+CALL sp1();
+x y z
+2set 2set 2set
+DROP PROCEDURE sp1;
+
+Testcase 4.2.16:
+----------------
+Ensure that the declare statement can declare multiple variables both separately
+and all at once from a variable list. (multiple declaration).
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( )
+BEGIN
+declare a, b char default '2';
+declare c, d float default 1.3;
+declare e, f text default 'text';
+declare g, h enum("value1", "value2" ) default 'value1';
+declare i, j datetime default '2005-02-02 12:12:12';
+declare k, l blob default 'blob';
+SELECT a, b, c, d, e, f, g, h, k, l;
+END//
+CALL sp6();
+a b c d e f g h k l
+2 2 1.3 1.3 text text value1 value1 blob blob
+DROP PROCEDURE sp6;
+
+Testcase 4.2.17:
+----------------
+Ensure that the invalid variable declarations are rejected, with an appropriate
+error message.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare @x char;
+SELECT f2 into x from t2 limit 1;
+END//
+ERROR 42000: 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 '@x char;
+SELECT f2 into x from t2 limit 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare accessible char;
+END//
+ERROR 42000: 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 'accessible char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare add char;
+END//
+ERROR 42000: 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 'add char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare all char;
+END//
+ERROR 42000: 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 'all char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare alter char;
+END//
+ERROR 42000: 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 'alter char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare analyze char;
+END//
+ERROR 42000: 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 'analyze char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare and char;
+END//
+ERROR 42000: 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 'and char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare as char;
+END//
+ERROR 42000: 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 'as char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare asc char;
+END//
+ERROR 42000: 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 'asc char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare asensitive char;
+END//
+ERROR 42000: 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 'asensitive char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare before char;
+END//
+ERROR 42000: 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 'before char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare between char;
+END//
+ERROR 42000: 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 'between char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare bigint char;
+END//
+ERROR 42000: 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 'bigint char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare binary char;
+END//
+ERROR 42000: 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 'binary char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare blob char;
+END//
+ERROR 42000: 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 'blob char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare both char;
+END//
+ERROR 42000: 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 'both char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare by char;
+END//
+ERROR 42000: 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 'by char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare call char;
+END//
+ERROR 42000: 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 'call char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cascade char;
+END//
+ERROR 42000: 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 'cascade char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare case char;
+END//
+ERROR 42000: 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 'case char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare change char;
+END//
+ERROR 42000: 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 'change char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare char char;
+END//
+ERROR 42000: 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 'char char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare character char;
+END//
+ERROR 42000: 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 'character char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare check char;
+END//
+ERROR 42000: 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 'check char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare collate char;
+END//
+ERROR 42000: 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 'collate char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare column char;
+END//
+ERROR 42000: 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 'column char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare condition char;
+END//
+ERROR 42000: 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 'condition char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare constraint char;
+END//
+ERROR 42000: 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 'constraint char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue char;
+END//
+ERROR 42000: 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 'char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare convert char;
+END//
+ERROR 42000: 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 'convert char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare create char;
+END//
+ERROR 42000: 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 'create char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cross char;
+END//
+ERROR 42000: 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 'cross char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare current_date char;
+END//
+ERROR 42000: 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 'current_date char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare current_time char;
+END//
+ERROR 42000: 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 'current_time char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare current_timestamp char;
+END//
+ERROR 42000: 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 'current_timestamp char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare current_user char;
+END//
+ERROR 42000: 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 'current_user char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cursor char;
+END//
+ERROR 42000: 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 'cursor char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare database char;
+END//
+ERROR 42000: 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 'database char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare databases char;
+END//
+ERROR 42000: 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 'databases char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare day_hour char;
+END//
+ERROR 42000: 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 'day_hour char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare day_microsecond char;
+END//
+ERROR 42000: 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 'day_microsecond char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare day_minute char;
+END//
+ERROR 42000: 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 'day_minute char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare day_second char;
+END//
+ERROR 42000: 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 'day_second char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare dec char;
+END//
+ERROR 42000: 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 'dec char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare decimal char;
+END//
+ERROR 42000: 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 'decimal char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare declare char;
+END//
+ERROR 42000: 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 'declare char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare default char;
+END//
+ERROR 42000: 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 'default char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare delayed char;
+END//
+ERROR 42000: 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 'delayed char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare delete char;
+END//
+ERROR 42000: 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 'delete char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare desc char;
+END//
+ERROR 42000: 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 'desc char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare describe char;
+END//
+ERROR 42000: 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 'describe char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare deterministic char;
+END//
+ERROR 42000: 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 'deterministic char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare distinct char;
+END//
+ERROR 42000: 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 'distinct char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare distinctrow char;
+END//
+ERROR 42000: 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 'distinctrow char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare div char;
+END//
+ERROR 42000: 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 'div char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare double char;
+END//
+ERROR 42000: 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 'double char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare drop char;
+END//
+ERROR 42000: 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 'drop char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare dual char;
+END//
+ERROR 42000: 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 'dual char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare each char;
+END//
+ERROR 42000: 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 'each char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare else char;
+END//
+ERROR 42000: 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 'else char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare elseif char;
+END//
+ERROR 42000: 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 'elseif char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare enclosed char;
+END//
+ERROR 42000: 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 'enclosed char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare escaped char;
+END//
+ERROR 42000: 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 'escaped char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare exists char;
+END//
+ERROR 42000: 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 'exists char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare exit char;
+END//
+ERROR 42000: 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 'char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare explain char;
+END//
+ERROR 42000: 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 'explain char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare false char;
+END//
+ERROR 42000: 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 'false char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare fetch char;
+END//
+ERROR 42000: 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 'fetch char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare float char;
+END//
+ERROR 42000: 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 'float char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare float4 char;
+END//
+ERROR 42000: 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 'float4 char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare float8 char;
+END//
+ERROR 42000: 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 'float8 char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare for char;
+END//
+ERROR 42000: 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 'for char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare force char;
+END//
+ERROR 42000: 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 'force char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare foreign char;
+END//
+ERROR 42000: 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 'foreign char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare from char;
+END//
+ERROR 42000: 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 'from char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare fulltext char;
+END//
+ERROR 42000: 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 'fulltext char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare grant char;
+END//
+ERROR 42000: 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 'grant char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare group char;
+END//
+ERROR 42000: 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 'group char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare having char;
+END//
+ERROR 42000: 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 'having char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare high_priority char;
+END//
+ERROR 42000: 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 'high_priority char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare hour_microsecond char;
+END//
+ERROR 42000: 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 'hour_microsecond char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare hour_minute char;
+END//
+ERROR 42000: 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 'hour_minute char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare hour_second char;
+END//
+ERROR 42000: 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 'hour_second char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare if char;
+END//
+ERROR 42000: 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 'if char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare ignore char;
+END//
+ERROR 42000: 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 'ignore char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare in char;
+END//
+ERROR 42000: 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 'in char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare index char;
+END//
+ERROR 42000: 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 'index char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare infile char;
+END//
+ERROR 42000: 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 'infile char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare inner char;
+END//
+ERROR 42000: 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 'inner char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare inout char;
+END//
+ERROR 42000: 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 'inout char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare insensitive char;
+END//
+ERROR 42000: 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 'insensitive char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare insert char;
+END//
+ERROR 42000: 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 'insert char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare int char;
+END//
+ERROR 42000: 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 'int char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare int1 char;
+END//
+ERROR 42000: 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 'int1 char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare int2 char;
+END//
+ERROR 42000: 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 'int2 char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare int3 char;
+END//
+ERROR 42000: 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 'int3 char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare int4 char;
+END//
+ERROR 42000: 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 'int4 char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare int8 char;
+END//
+ERROR 42000: 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 'int8 char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare integer char;
+END//
+ERROR 42000: 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 'integer char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare interval char;
+END//
+ERROR 42000: 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 'interval char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare into char;
+END//
+ERROR 42000: 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 'into char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare is char;
+END//
+ERROR 42000: 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 'is char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare iterate char;
+END//
+ERROR 42000: 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 'iterate char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare join char;
+END//
+ERROR 42000: 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 'join char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare key char;
+END//
+ERROR 42000: 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 'key char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare keys char;
+END//
+ERROR 42000: 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 'keys char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare kill char;
+END//
+ERROR 42000: 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 'kill char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare leading char;
+END//
+ERROR 42000: 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 'leading char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare leave char;
+END//
+ERROR 42000: 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 'leave char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare left char;
+END//
+ERROR 42000: 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 'left char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare like char;
+END//
+ERROR 42000: 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 'like char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare limit char;
+END//
+ERROR 42000: 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 'limit char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare linear char;
+END//
+ERROR 42000: 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 'linear char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare lines char;
+END//
+ERROR 42000: 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 'lines char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare load char;
+END//
+ERROR 42000: 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 'load char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare localtime char;
+END//
+ERROR 42000: 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 'localtime char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare localtimestamp char;
+END//
+ERROR 42000: 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 'localtimestamp char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare lock char;
+END//
+ERROR 42000: 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 'lock char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare long char;
+END//
+ERROR 42000: 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 'long char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare longblob char;
+END//
+ERROR 42000: 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 'longblob char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare longtext char;
+END//
+ERROR 42000: 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 'longtext char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare loop char;
+END//
+ERROR 42000: 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 'loop char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare low_priority char;
+END//
+ERROR 42000: 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 'low_priority char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare master_ssl_verify_server_cert char;
+END//
+ERROR 42000: 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 'master_ssl_verify_server_cert char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare match char;
+END//
+ERROR 42000: 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 'match char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare mediumblob char;
+END//
+ERROR 42000: 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 'mediumblob char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare mediumint char;
+END//
+ERROR 42000: 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 'mediumint char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare mediumtext char;
+END//
+ERROR 42000: 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 'mediumtext char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare middleint char;
+END//
+ERROR 42000: 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 'middleint char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare minute_microsecond char;
+END//
+ERROR 42000: 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 'minute_microsecond char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare minute_second char;
+END//
+ERROR 42000: 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 'minute_second char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare mod char;
+END//
+ERROR 42000: 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 'mod char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare modifies char;
+END//
+ERROR 42000: 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 'modifies char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare natural char;
+END//
+ERROR 42000: 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 'natural char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare not char;
+END//
+ERROR 42000: 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 'not char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare no_write_to_binlog char;
+END//
+ERROR 42000: 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 'no_write_to_binlog char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare null char;
+END//
+ERROR 42000: 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 'null char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare numeric char;
+END//
+ERROR 42000: 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 'numeric char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare on char;
+END//
+ERROR 42000: 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 'on char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare optimize char;
+END//
+ERROR 42000: 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 'optimize char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare option char;
+END//
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare optionally char;
+END//
+ERROR 42000: 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 'optionally char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare or char;
+END//
+ERROR 42000: 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 'or char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare order char;
+END//
+ERROR 42000: 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 'order char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare out char;
+END//
+ERROR 42000: 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 'out char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare outer char;
+END//
+ERROR 42000: 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 'outer char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare outfile char;
+END//
+ERROR 42000: 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 'outfile char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare precision char;
+END//
+ERROR 42000: 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 'precision char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare primary char;
+END//
+ERROR 42000: 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 'primary char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare procedure char;
+END//
+ERROR 42000: 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 'procedure char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare purge char;
+END//
+ERROR 42000: 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 'purge char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare range char;
+END//
+ERROR 42000: 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 'range char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare read char;
+END//
+ERROR 42000: 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 'read char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare reads char;
+END//
+ERROR 42000: 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 'reads char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare read_only char;
+END//
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare read_write char;
+END//
+ERROR 42000: 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 'read_write char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare real char;
+END//
+ERROR 42000: 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 'real char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare references char;
+END//
+ERROR 42000: 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 'references char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare regexp char;
+END//
+ERROR 42000: 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 'regexp char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare release char;
+END//
+ERROR 42000: 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 'release char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare rename char;
+END//
+ERROR 42000: 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 'rename char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare repeat char;
+END//
+ERROR 42000: 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 'repeat char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare replace char;
+END//
+ERROR 42000: 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 'replace char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare require char;
+END//
+ERROR 42000: 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 'require char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare restrict char;
+END//
+ERROR 42000: 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 'restrict char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare return char;
+END//
+ERROR 42000: 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 'return char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare revoke char;
+END//
+ERROR 42000: 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 'revoke char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare right char;
+END//
+ERROR 42000: 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 'right char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare rlike char;
+END//
+ERROR 42000: 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 'rlike char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare schema char;
+END//
+ERROR 42000: 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 'schema char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare schemas char;
+END//
+ERROR 42000: 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 'schemas char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare second_microsecond char;
+END//
+ERROR 42000: 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 'second_microsecond char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare SELECT char;
+END//
+ERROR 42000: 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 'SELECT char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare sensitive char;
+END//
+ERROR 42000: 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 'sensitive char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare separator char;
+END//
+ERROR 42000: 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 'separator char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare set char;
+END//
+ERROR 42000: 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 'set char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare show char;
+END//
+ERROR 42000: 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 'show char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare smallint char;
+END//
+ERROR 42000: 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 'smallint char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare spatial char;
+END//
+ERROR 42000: 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 'spatial char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare specific char;
+END//
+ERROR 42000: 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 'specific char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare sql char;
+END//
+ERROR 42000: 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 'sql char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare sqlexception char;
+END//
+ERROR 42000: 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 'sqlexception char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare sqlstate char;
+END//
+ERROR 42000: 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 'sqlstate char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare sqlwarning char;
+END//
+ERROR 42000: 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 'sqlwarning char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare sql_big_result char;
+END//
+ERROR 42000: 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 'sql_big_result char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare sql_calc_found_rows char;
+END//
+ERROR 42000: 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 'sql_calc_found_rows char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare sql_small_result char;
+END//
+ERROR 42000: 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 'sql_small_result char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare ssl char;
+END//
+ERROR 42000: 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 'ssl char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare starting char;
+END//
+ERROR 42000: 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 'starting char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare straight_join char;
+END//
+ERROR 42000: 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 'straight_join char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare table char;
+END//
+ERROR 42000: 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 'table char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare terminated char;
+END//
+ERROR 42000: 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 'terminated char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare then char;
+END//
+ERROR 42000: 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 'then char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare tinyblob char;
+END//
+ERROR 42000: 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 'tinyblob char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare tinyint char;
+END//
+ERROR 42000: 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 'tinyint char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare tinytext char;
+END//
+ERROR 42000: 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 'tinytext char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare to char;
+END//
+ERROR 42000: 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 'to char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare trailing char;
+END//
+ERROR 42000: 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 'trailing char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare trigger char;
+END//
+ERROR 42000: 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 'trigger char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare true char;
+END//
+ERROR 42000: 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 'true char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare undo char;
+END//
+ERROR 42000: 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 'undo char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare union char;
+END//
+ERROR 42000: 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 'union char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare unique char;
+END//
+ERROR 42000: 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 'unique char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare unlock char;
+END//
+ERROR 42000: 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 'unlock char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare unsigned char;
+END//
+ERROR 42000: 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 'unsigned char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare update char;
+END//
+ERROR 42000: 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 'update char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare usage char;
+END//
+ERROR 42000: 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 'usage char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare use char;
+END//
+ERROR 42000: 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 'use char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare using char;
+END//
+ERROR 42000: 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 'using char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare utc_date char;
+END//
+ERROR 42000: 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 'utc_date char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare utc_time char;
+END//
+ERROR 42000: 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 'utc_time char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare utc_timestamp char;
+END//
+ERROR 42000: 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 'utc_timestamp char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare values char;
+END//
+ERROR 42000: 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 char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare varbinary char;
+END//
+ERROR 42000: 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 'varbinary char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare varchar char;
+END//
+ERROR 42000: 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 'varchar char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare varcharacter char;
+END//
+ERROR 42000: 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 'varcharacter char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare varying char;
+END//
+ERROR 42000: 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 'varying char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare when char;
+END//
+ERROR 42000: 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 'when char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare where char;
+END//
+ERROR 42000: 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 'where char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare while char;
+END//
+ERROR 42000: 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 'while char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare with char;
+END//
+ERROR 42000: 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 'with char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare write char;
+END//
+ERROR 42000: 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 'write char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare xor char;
+END//
+ERROR 42000: 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 'xor char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare year_month char;
+END//
+ERROR 42000: 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 'year_month char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare zerofill char;
+END//
+ERROR 42000: 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 'zerofill char;
+END' at line 3
+
+Testcase :
+----------
+Ensure that every possible type of condition may be declared for a stored procedure
+( covered in more detail in handlers section.)
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate 'HY000';
+declare cond2 condition for sqlstate '23000';
+declare cond3 condition for sqlstate 'HY001';
+declare cond4 condition for sqlstate '08004';
+declare cond5 condition for sqlstate '08S01';
+declare cond6 condition for sqlstate '42000';
+declare cond7 condition for sqlstate '28000';
+declare cond8 condition for sqlstate '3D000';
+declare cond9 condition for sqlstate '42S01';
+declare cond10 condition for sqlstate '42S02';
+declare cond11 condition for sqlstate '42S22';
+declare cond12 condition for sqlstate '21S01';
+declare cond13 condition for sqlstate '42S21';
+declare cond14 condition for sqlstate '42S12';
+declare cond15 condition for sqlstate '22004';
+declare cond16 condition for sqlstate '25000';
+declare cond17 condition for sqlstate '40001';
+declare cond18 condition for sqlstate '21000';
+declare cond19 condition for sqlstate '01000';
+declare cond20 condition for sqlstate '22003';
+declare cond21 condition for sqlstate '22007';
+declare cond22 condition for sqlstate '0A000';
+declare cond23 condition for sqlstate '70100';
+declare cond24 condition for sqlstate '2F005';
+declare cond25 condition for sqlstate '24000';
+declare cond26 condition for sqlstate '02000';
+declare continue handler for cond2 set @x2 = 1;
+declare continue handler for cond1 set @x2 = 1;
+declare continue handler for cond3 set @x2 = 1;
+declare continue handler for cond4 set @x2 = 1;
+declare continue handler for cond5 set @x2 = 1;
+declare continue handler for cond7 set @x2 = 1;
+declare continue handler for cond6 set @x2 = 1;
+declare continue handler for cond8 set @x2 = 1;
+declare continue handler for cond9 set @x2 = 1;
+declare continue handler for cond10 set @x2 = 1;
+declare continue handler for cond11 set @x2 = 1;
+declare continue handler for cond12 set @x2 = 1;
+declare continue handler for cond13 set @x2 = 1;
+declare continue handler for cond14 set @x2 = 1;
+declare continue handler for cond15 set @x2 = 1;
+declare continue handler for cond16 set @x2 = 1;
+declare continue handler for cond17 set @x2 = 1;
+declare continue handler for cond18 set @x2 = 1;
+declare continue handler for cond19 set @x2 = 1;
+declare continue handler for cond20 set @x2 = 1;
+declare continue handler for cond21 set @x2 = 1;
+declare continue handler for cond22 set @x2 = 1;
+declare continue handler for cond23 set @x2 = 1;
+declare continue handler for cond24 set @x2 = 1;
+declare continue handler for cond25 set @x2 = 1;
+declare continue handler for cond26 set @x2 = 1;
+set @x = 1;
+insert into t2 values (1);
+set @x = 2;
+insert into t2 values (1);
+set @x = 3;
+END//
+CALL sp1();
+DROP PROCEDURE sp1;
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare @x char;
+END//
+ERROR 42000: 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 '@x char;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x char1;
+END//
+ERROR HY000: Unknown data type: 'char1'
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare accessible condition for sqlstate '02000';
+declare exit handler for add set @var2 = 1;
+END//
+ERROR 42000: 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 'accessible condition for sqlstate '02000';
+declare exit handler for add set @...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare add condition for sqlstate '02000';
+declare exit handler for add set @var2 = 1;
+END//
+ERROR 42000: 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 'add condition for sqlstate '02000';
+declare exit handler for add set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare all condition for sqlstate '02000';
+declare exit handler for all set @var2 = 1;
+END//
+ERROR 42000: 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 'all condition for sqlstate '02000';
+declare exit handler for all set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare alter condition for sqlstate '02000';
+declare exit handler for alter set @var2 = 1;
+END//
+ERROR 42000: 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 'alter condition for sqlstate '02000';
+declare exit handler for alter set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare analyze condition for sqlstate '02000';
+declare exit handler for analyze set @var2 = 1;
+END//
+ERROR 42000: 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 'analyze condition for sqlstate '02000';
+declare exit handler for analyze set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare and condition for sqlstate '02000';
+declare exit handler for and set @var2 = 1;
+END//
+ERROR 42000: 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 'and condition for sqlstate '02000';
+declare exit handler for and set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare as condition for sqlstate '02000';
+declare exit handler for as set @var2 = 1;
+END//
+ERROR 42000: 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 'as condition for sqlstate '02000';
+declare exit handler for as set @var2 = 1;...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare asc condition for sqlstate '02000';
+declare exit handler for asc set @var2 = 1;
+END//
+ERROR 42000: 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 'asc condition for sqlstate '02000';
+declare exit handler for asc set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare asensitive condition for sqlstate '02000';
+declare exit handler for asensitive set @var2 = 1;
+END//
+ERROR 42000: 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 'asensitive condition for sqlstate '02000';
+declare exit handler for asensitiv...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare before condition for sqlstate '02000';
+declare exit handler for before set @var2 = 1;
+END//
+ERROR 42000: 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 'before condition for sqlstate '02000';
+declare exit handler for before set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare between condition for sqlstate '02000';
+declare exit handler for between set @var2 = 1;
+END//
+ERROR 42000: 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 'between condition for sqlstate '02000';
+declare exit handler for between set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare bigint condition for sqlstate '02000';
+declare exit handler for bigint set @var2 = 1;
+END//
+ERROR 42000: 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 'bigint condition for sqlstate '02000';
+declare exit handler for bigint set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare binary condition for sqlstate '02000';
+declare exit handler for binary set @var2 = 1;
+END//
+ERROR 42000: 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 'binary condition for sqlstate '02000';
+declare exit handler for binary set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare blob condition for sqlstate '02000';
+declare exit handler for blob set @var2 = 1;
+END//
+ERROR 42000: 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 'blob condition for sqlstate '02000';
+declare exit handler for blob set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare both condition for sqlstate '02000';
+declare exit handler for both set @var2 = 1;
+END//
+ERROR 42000: 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 'both condition for sqlstate '02000';
+declare exit handler for both set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare by condition for sqlstate '02000';
+declare exit handler for by set @var2 = 1;
+END//
+ERROR 42000: 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 'by condition for sqlstate '02000';
+declare exit handler for by set @var2 = 1;...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare call condition for sqlstate '02000';
+declare exit handler for CALL set @var2 = 1;
+END//
+ERROR 42000: 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 'call condition for sqlstate '02000';
+declare exit handler for CALL set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare cascade condition for sqlstate '02000';
+declare exit handler for cascade set @var2 = 1;
+END//
+ERROR 42000: 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 'cascade condition for sqlstate '02000';
+declare exit handler for cascade set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare case condition for sqlstate '02000';
+declare exit handler for case set @var2 = 1;
+END//
+ERROR 42000: 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 'case condition for sqlstate '02000';
+declare exit handler for case set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare change condition for sqlstate '02000';
+declare exit handler for change set @var2 = 1;
+END//
+ERROR 42000: 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 'change condition for sqlstate '02000';
+declare exit handler for change set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare char condition for sqlstate '02000';
+declare exit handler for char set @var2 = 1;
+END//
+ERROR 42000: 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 'char condition for sqlstate '02000';
+declare exit handler for char set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare character condition for sqlstate '02000';
+declare exit handler for character set @var2 = 1;
+END//
+ERROR 42000: 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 'character condition for sqlstate '02000';
+declare exit handler for character ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare check condition for sqlstate '02000';
+declare exit handler for check set @var2 = 1;
+END//
+ERROR 42000: 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 'check condition for sqlstate '02000';
+declare exit handler for check set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare collate condition for sqlstate '02000';
+declare exit handler for collate set @var2 = 1;
+END//
+ERROR 42000: 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 'collate condition for sqlstate '02000';
+declare exit handler for collate set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare column condition for sqlstate '02000';
+declare exit handler for column set @var2 = 1;
+END//
+ERROR 42000: 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 'column condition for sqlstate '02000';
+declare exit handler for column set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare condition condition for sqlstate '02000';
+declare exit handler for condition set @var2 = 1;
+END//
+ERROR 42000: 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 'condition condition for sqlstate '02000';
+declare exit handler for condition ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare connection condition for sqlstate '02000';
+declare exit handler for connection set @var2 = 1;
+END//
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare constraint condition for sqlstate '02000';
+declare exit handler for constraint set @var2 = 1;
+END//
+ERROR 42000: 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 'constraint condition for sqlstate '02000';
+declare exit handler for constrain...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare continue condition for sqlstate '02000';
+declare exit handler for continue set @var2 = 1;
+END//
+ERROR 42000: 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 'condition for sqlstate '02000';
+declare exit handler for continue set @var2 =...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare convert condition for sqlstate '02000';
+declare exit handler for convert set @var2 = 1;
+END//
+ERROR 42000: 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 'convert condition for sqlstate '02000';
+declare exit handler for convert set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare create condition for sqlstate '02000';
+declare exit handler for create set @var2 = 1;
+END//
+ERROR 42000: 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 'create condition for sqlstate '02000';
+declare exit handler for create set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare cross condition for sqlstate '02000';
+declare exit handler for cross set @var2 = 1;
+END//
+ERROR 42000: 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 'cross condition for sqlstate '02000';
+declare exit handler for cross set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare current_date condition for sqlstate '02000';
+declare exit handler for current_date set @var2 = 1;
+END//
+ERROR 42000: 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 'current_date condition for sqlstate '02000';
+declare exit handler for current...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare current_time condition for sqlstate '02000';
+declare exit handler for current_time set @var2 = 1;
+END//
+ERROR 42000: 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 'current_time condition for sqlstate '02000';
+declare exit handler for current...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare current_timestamp condition for sqlstate '02000';
+declare exit handler for current_timestamp set @var2 = 1;
+END//
+ERROR 42000: 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 'current_timestamp condition for sqlstate '02000';
+declare exit handler for cu...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare current_user condition for sqlstate '02000';
+declare exit handler for current_user set @var2 = 1;
+END//
+ERROR 42000: 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 'current_user condition for sqlstate '02000';
+declare exit handler for current...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare cursor condition for sqlstate '02000';
+declare exit handler for cursor set @var2 = 1;
+END//
+ERROR 42000: 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 'cursor condition for sqlstate '02000';
+declare exit handler for cursor set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare database condition for sqlstate '02000';
+declare exit handler for database set @var2 = 1;
+END//
+ERROR 42000: 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 'database condition for sqlstate '02000';
+declare exit handler for database se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare databases condition for sqlstate '02000';
+declare exit handler for databases set @var2 = 1;
+END//
+ERROR 42000: 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 'databases condition for sqlstate '02000';
+declare exit handler for databases ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare day_hour condition for sqlstate '02000';
+declare exit handler for day_hour set @var2 = 1;
+END//
+ERROR 42000: 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 'day_hour condition for sqlstate '02000';
+declare exit handler for day_hour se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare day_microsecond condition for sqlstate '02000';
+declare exit handler for day_microsecond set @var2 = 1;
+END//
+ERROR 42000: 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 'day_microsecond condition for sqlstate '02000';
+declare exit handler for day_...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare day_minute condition for sqlstate '02000';
+declare exit handler for day_minute set @var2 = 1;
+END//
+ERROR 42000: 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 'day_minute condition for sqlstate '02000';
+declare exit handler for day_minut...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare day_second condition for sqlstate '02000';
+declare exit handler for day_second set @var2 = 1;
+END//
+ERROR 42000: 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 'day_second condition for sqlstate '02000';
+declare exit handler for day_secon...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare dec condition for sqlstate '02000';
+declare exit handler for dec set @var2 = 1;
+END//
+ERROR 42000: 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 'dec condition for sqlstate '02000';
+declare exit handler for dec set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal condition for sqlstate '02000';
+declare exit handler for decimal set @var2 = 1;
+END//
+ERROR 42000: 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 'decimal condition for sqlstate '02000';
+declare exit handler for decimal set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare declare condition for sqlstate '02000';
+declare exit handler for declare set @var2 = 1;
+END//
+ERROR 42000: 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 'declare condition for sqlstate '02000';
+declare exit handler for declare set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare default condition for sqlstate '02000';
+declare exit handler for default set @var2 = 1;
+END//
+ERROR 42000: 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 'default condition for sqlstate '02000';
+declare exit handler for default set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare delayed condition for sqlstate '02000';
+declare exit handler for delayed set @var2 = 1;
+END//
+ERROR 42000: 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 'delayed condition for sqlstate '02000';
+declare exit handler for delayed set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare delete condition for sqlstate '02000';
+declare exit handler for delete set @var2 = 1;
+END//
+ERROR 42000: 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 'delete condition for sqlstate '02000';
+declare exit handler for delete set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare desc condition for sqlstate '02000';
+declare exit handler for desc set @var2 = 1;
+END//
+ERROR 42000: 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 'desc condition for sqlstate '02000';
+declare exit handler for desc set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare describe condition for sqlstate '02000';
+declare exit handler for describe set @var2 = 1;
+END//
+ERROR 42000: 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 'describe condition for sqlstate '02000';
+declare exit handler for describe se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare deterministic condition for sqlstate '02000';
+declare exit handler for deterministic set @var2 = 1;
+END//
+ERROR 42000: 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 'deterministic condition for sqlstate '02000';
+declare exit handler for determ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare distinct condition for sqlstate '02000';
+declare exit handler for distinct set @var2 = 1;
+END//
+ERROR 42000: 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 'distinct condition for sqlstate '02000';
+declare exit handler for distinct se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare distinctrow condition for sqlstate '02000';
+declare exit handler for distinctrow set @var2 = 1;
+END//
+ERROR 42000: 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 'distinctrow condition for sqlstate '02000';
+declare exit handler for distinct...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare div condition for sqlstate '02000';
+declare exit handler for div set @var2 = 1;
+END//
+ERROR 42000: 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 'div condition for sqlstate '02000';
+declare exit handler for div set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare double condition for sqlstate '02000';
+declare exit handler for double set @var2 = 1;
+END//
+ERROR 42000: 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 'double condition for sqlstate '02000';
+declare exit handler for double set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare drop condition for sqlstate '02000';
+declare exit handler for drop set @var2 = 1;
+END//
+ERROR 42000: 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 'drop condition for sqlstate '02000';
+declare exit handler for drop set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare dual condition for sqlstate '02000';
+declare exit handler for dual set @var2 = 1;
+END//
+ERROR 42000: 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 'dual condition for sqlstate '02000';
+declare exit handler for dual set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare each condition for sqlstate '02000';
+declare exit handler for each set @var2 = 1;
+END//
+ERROR 42000: 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 'each condition for sqlstate '02000';
+declare exit handler for each set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare else condition for sqlstate '02000';
+declare exit handler for else set @var2 = 1;
+END//
+ERROR 42000: 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 'else condition for sqlstate '02000';
+declare exit handler for else set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare elseif condition for sqlstate '02000';
+declare exit handler for elseif set @var2 = 1;
+END//
+ERROR 42000: 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 'elseif condition for sqlstate '02000';
+declare exit handler for elseif set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare enclosed condition for sqlstate '02000';
+declare exit handler for enclosed set @var2 = 1;
+END//
+ERROR 42000: 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 'enclosed condition for sqlstate '02000';
+declare exit handler for enclosed se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare escaped condition for sqlstate '02000';
+declare exit handler for escaped set @var2 = 1;
+END//
+ERROR 42000: 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 'escaped condition for sqlstate '02000';
+declare exit handler for escaped set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare exists condition for sqlstate '02000';
+declare exit handler for exists set @var2 = 1;
+END//
+ERROR 42000: 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 'exists condition for sqlstate '02000';
+declare exit handler for exists set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare exit condition for sqlstate '02000';
+declare exit handler for exit set @var2 = 1;
+END//
+ERROR 42000: 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 'condition for sqlstate '02000';
+declare exit handler for exit set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare explain condition for sqlstate '02000';
+declare exit handler for explain set @var2 = 1;
+END//
+ERROR 42000: 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 'explain condition for sqlstate '02000';
+declare exit handler for explain set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare false condition for sqlstate '02000';
+declare exit handler for false set @var2 = 1;
+END//
+ERROR 42000: 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 'false condition for sqlstate '02000';
+declare exit handler for false set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare fetch condition for sqlstate '02000';
+declare exit handler for fetch set @var2 = 1;
+END//
+ERROR 42000: 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 'fetch condition for sqlstate '02000';
+declare exit handler for fetch set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float condition for sqlstate '02000';
+declare exit handler for float set @var2 = 1;
+END//
+ERROR 42000: 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 'float condition for sqlstate '02000';
+declare exit handler for float set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float4 condition for sqlstate '02000';
+declare exit handler for add set @var2 = 1;
+END//
+ERROR 42000: 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 'float4 condition for sqlstate '02000';
+declare exit handler for add set @var2...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float8 condition for sqlstate '02000';
+declare exit handler for add set @var2 = 1;
+END//
+ERROR 42000: 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 'float8 condition for sqlstate '02000';
+declare exit handler for add set @var2...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare for condition for sqlstate '02000';
+declare exit handler for for set @var2 = 1;
+END//
+ERROR 42000: 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 'for condition for sqlstate '02000';
+declare exit handler for for set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare force condition for sqlstate '02000';
+declare exit handler for force set @var2 = 1;
+END//
+ERROR 42000: 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 'force condition for sqlstate '02000';
+declare exit handler for force set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare foreign condition for sqlstate '02000';
+declare exit handler for foreign set @var2 = 1;
+END//
+ERROR 42000: 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 'foreign condition for sqlstate '02000';
+declare exit handler for foreign set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare from condition for sqlstate '02000';
+declare exit handler for from set @var2 = 1;
+END//
+ERROR 42000: 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 'from condition for sqlstate '02000';
+declare exit handler for from set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare fulltext condition for sqlstate '02000';
+declare exit handler for fulltext set @var2 = 1;
+END//
+ERROR 42000: 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 'fulltext condition for sqlstate '02000';
+declare exit handler for fulltext se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare grant condition for sqlstate '02000';
+declare exit handler for grant set @var2 = 1;
+END//
+ERROR 42000: 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 'grant condition for sqlstate '02000';
+declare exit handler for grant set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare group condition for sqlstate '02000';
+declare exit handler for group set @var2 = 1;
+END//
+ERROR 42000: 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 'group condition for sqlstate '02000';
+declare exit handler for group set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare having condition for sqlstate '02000';
+declare exit handler for having set @var2 = 1;
+END//
+ERROR 42000: 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 'having condition for sqlstate '02000';
+declare exit handler for having set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare high_priority condition for sqlstate '02000';
+declare exit handler for high_priority set @var2 = 1;
+END//
+ERROR 42000: 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 'high_priority condition for sqlstate '02000';
+declare exit handler for high_p...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare hour_microsecond condition for sqlstate '02000';
+declare exit handler for hour_microsecond set @var2 = 1;
+END//
+ERROR 42000: 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 'hour_microsecond condition for sqlstate '02000';
+declare exit handler for hou...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare hour_minute condition for sqlstate '02000';
+declare exit handler for hour_minute set @var2 = 1;
+END//
+ERROR 42000: 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 'hour_minute condition for sqlstate '02000';
+declare exit handler for hour_min...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare hour_second condition for sqlstate '02000';
+declare exit handler for hour_second set @var2 = 1;
+END//
+ERROR 42000: 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 'hour_second condition for sqlstate '02000';
+declare exit handler for hour_sec...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare if condition for sqlstate '02000';
+declare exit handler for if set @var2 = 1;
+END//
+ERROR 42000: 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 'if condition for sqlstate '02000';
+declare exit handler for if set @var2 = 1;...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare ignore condition for sqlstate '02000';
+declare exit handler for ignore set @var2 = 1;
+END//
+ERROR 42000: 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 'ignore condition for sqlstate '02000';
+declare exit handler for ignore set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare in condition for sqlstate '02000';
+declare exit handler for in set @var2 = 1;
+END//
+ERROR 42000: 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 'in condition for sqlstate '02000';
+declare exit handler for in set @var2 = 1;...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare index condition for sqlstate '02000';
+declare exit handler for index set @var2 = 1;
+END//
+ERROR 42000: 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 'index condition for sqlstate '02000';
+declare exit handler for index set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare infile condition for sqlstate '02000';
+declare exit handler for infile set @var2 = 1;
+END//
+ERROR 42000: 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 'infile condition for sqlstate '02000';
+declare exit handler for infile set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare inner condition for sqlstate '02000';
+declare exit handler for inner set @var2 = 1;
+END//
+ERROR 42000: 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 'inner condition for sqlstate '02000';
+declare exit handler for inner set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare inout condition for sqlstate '02000';
+declare exit handler for inout set @var2 = 1;
+END//
+ERROR 42000: 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 'inout condition for sqlstate '02000';
+declare exit handler for inout set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare insensitive condition for sqlstate '02000';
+declare exit handler for insensitive set @var2 = 1;
+END//
+ERROR 42000: 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 'insensitive condition for sqlstate '02000';
+declare exit handler for insensit...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare insert condition for sqlstate '02000';
+declare exit handler for insert set @var2 = 1;
+END//
+ERROR 42000: 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 'insert condition for sqlstate '02000';
+declare exit handler for insert set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'int condition for sqlstate '02000';
+declare exit handler for int set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int1 condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'int1 condition for sqlstate '02000';
+declare exit handler for int set @var2 =...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int2 condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'int2 condition for sqlstate '02000';
+declare exit handler for int set @var2 =...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int3 condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'int3 condition for sqlstate '02000';
+declare exit handler for int set @var2 =...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int4 condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'int4 condition for sqlstate '02000';
+declare exit handler for int set @var2 =...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int8 condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'int8 condition for sqlstate '02000';
+declare exit handler for int set @var2 =...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare integer condition for sqlstate '02000';
+declare exit handler for integer set @var2 = 1;
+END//
+ERROR 42000: 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 'integer condition for sqlstate '02000';
+declare exit handler for integer set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare interval condition for sqlstate '02000';
+declare exit handler for interval set @var2 = 1;
+END//
+ERROR 42000: 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 'interval condition for sqlstate '02000';
+declare exit handler for interval se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare into condition for sqlstate '02000';
+declare exit handler for into set @var2 = 1;
+END//
+ERROR 42000: 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 'into condition for sqlstate '02000';
+declare exit handler for into set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare is condition for sqlstate '02000';
+declare exit handler for is set @var2 = 1;
+END//
+ERROR 42000: 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 'is condition for sqlstate '02000';
+declare exit handler for is set @var2 = 1;...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare iterate condition for sqlstate '02000';
+declare exit handler for iterate set @var2 = 1;
+END//
+ERROR 42000: 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 'iterate condition for sqlstate '02000';
+declare exit handler for iterate set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare join condition for sqlstate '02000';
+declare exit handler for join set @var2 = 1;
+END//
+ERROR 42000: 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 'join condition for sqlstate '02000';
+declare exit handler for join set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare key condition for sqlstate '02000';
+declare exit handler for key set @var2 = 1;
+END//
+ERROR 42000: 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 'key condition for sqlstate '02000';
+declare exit handler for key set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare keys condition for sqlstate '02000';
+declare exit handler for keys set @var2 = 1;
+END//
+ERROR 42000: 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 'keys condition for sqlstate '02000';
+declare exit handler for keys set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare kill condition for sqlstate '02000';
+declare exit handler for kill set @var2 = 1;
+END//
+ERROR 42000: 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 'kill condition for sqlstate '02000';
+declare exit handler for kill set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare leading condition for sqlstate '02000';
+declare exit handler for leading set @var2 = 1;
+END//
+ERROR 42000: 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 'leading condition for sqlstate '02000';
+declare exit handler for leading set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare leave condition for sqlstate '02000';
+declare exit handler for leave set @var2 = 1;
+END//
+ERROR 42000: 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 'leave condition for sqlstate '02000';
+declare exit handler for leave set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare left condition for sqlstate '02000';
+declare exit handler for left set @var2 = 1;
+END//
+ERROR 42000: 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 'left condition for sqlstate '02000';
+declare exit handler for left set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare like condition for sqlstate '02000';
+declare exit handler for like set @var2 = 1;
+END//
+ERROR 42000: 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 'like condition for sqlstate '02000';
+declare exit handler for like set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare limit condition for sqlstate '02000';
+declare exit handler for limit set @var2 = 1;
+END//
+ERROR 42000: 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 'limit condition for sqlstate '02000';
+declare exit handler for limit set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare linear condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'linear condition for sqlstate '02000';
+declare exit handler for int set @var2...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare lines condition for sqlstate '02000';
+declare exit handler for lines set @var2 = 1;
+END//
+ERROR 42000: 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 'lines condition for sqlstate '02000';
+declare exit handler for lines set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare load condition for sqlstate '02000';
+declare exit handler for load set @var2 = 1;
+END//
+ERROR 42000: 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 'load condition for sqlstate '02000';
+declare exit handler for load set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare localtime condition for sqlstate '02000';
+declare exit handler for localtime set @var2 = 1;
+END//
+ERROR 42000: 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 'localtime condition for sqlstate '02000';
+declare exit handler for localtime ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare localtimestamp condition for sqlstate '02000';
+declare exit handler for localtimestamp set @var2 = 1;
+END//
+ERROR 42000: 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 'localtimestamp condition for sqlstate '02000';
+declare exit handler for local...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare lock condition for sqlstate '02000';
+declare exit handler for lock set @var2 = 1;
+END//
+ERROR 42000: 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 'lock condition for sqlstate '02000';
+declare exit handler for lock set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare long condition for sqlstate '02000';
+declare exit handler for long set @var2 = 1;
+END//
+ERROR 42000: 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 'long condition for sqlstate '02000';
+declare exit handler for long set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare longblob condition for sqlstate '02000';
+declare exit handler for longblob set @var2 = 1;
+END//
+ERROR 42000: 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 'longblob condition for sqlstate '02000';
+declare exit handler for longblob se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare longtext condition for sqlstate '02000';
+declare exit handler for longtext set @var2 = 1;
+END//
+ERROR 42000: 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 'longtext condition for sqlstate '02000';
+declare exit handler for longtext se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare loop condition for sqlstate '02000';
+declare exit handler for loop set @var2 = 1;
+END//
+ERROR 42000: 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 'loop condition for sqlstate '02000';
+declare exit handler for loop set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare low_priority condition for sqlstate '02000';
+declare exit handler for low_priority set @var2 = 1;
+END//
+ERROR 42000: 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 'low_priority condition for sqlstate '02000';
+declare exit handler for low_pri...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare master_ssl_verify_server_cert condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'master_ssl_verify_server_cert condition for sqlstate '02000';
+declare exit ha...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare match condition for sqlstate '02000';
+declare exit handler for match set @var2 = 1;
+END//
+ERROR 42000: 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 'match condition for sqlstate '02000';
+declare exit handler for match set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumblob condition for sqlstate '02000';
+declare exit handler for mediumblob set @var2 = 1;
+END//
+ERROR 42000: 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 'mediumblob condition for sqlstate '02000';
+declare exit handler for mediumblo...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumint condition for sqlstate '02000';
+declare exit handler for mediumint set @var2 = 1;
+END//
+ERROR 42000: 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 'mediumint condition for sqlstate '02000';
+declare exit handler for mediumint ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumtext condition for sqlstate '02000';
+declare exit handler for mediumtext set @var2 = 1;
+END//
+ERROR 42000: 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 'mediumtext condition for sqlstate '02000';
+declare exit handler for mediumtex...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare middleint condition for sqlstate '02000';
+declare exit handler for middleint set @var2 = 1;
+END//
+ERROR 42000: 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 'middleint condition for sqlstate '02000';
+declare exit handler for middleint ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare minute_microsecond condition for sqlstate '02000';
+declare exit handler for minute_microsecond set @var2 = 1;
+END//
+ERROR 42000: 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 'minute_microsecond condition for sqlstate '02000';
+declare exit handler for m...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare minute_second condition for sqlstate '02000';
+declare exit handler for minute_second set @var2 = 1;
+END//
+ERROR 42000: 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 'minute_second condition for sqlstate '02000';
+declare exit handler for minute...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mod condition for sqlstate '02000';
+declare exit handler for mod set @var2 = 1;
+END//
+ERROR 42000: 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 'mod condition for sqlstate '02000';
+declare exit handler for mod set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare modifies condition for sqlstate '02000';
+declare exit handler for modifies set @var2 = 1;
+END//
+ERROR 42000: 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 'modifies condition for sqlstate '02000';
+declare exit handler for modifies se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare natural condition for sqlstate '02000';
+declare exit handler for natural set @var2 = 1;
+END//
+ERROR 42000: 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 'natural condition for sqlstate '02000';
+declare exit handler for natural set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare not condition for sqlstate '02000';
+declare exit handler for not set @var2 = 1;
+END//
+ERROR 42000: 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 'not condition for sqlstate '02000';
+declare exit handler for not set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare no_write_to_binlog condition for sqlstate '02000';
+declare exit handler for no_write_to_binlog set @var2 = 1;
+END//
+ERROR 42000: 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 'no_write_to_binlog condition for sqlstate '02000';
+declare exit handler for n...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare null condition for sqlstate '02000';
+declare exit handler for null set @var2 = 1;
+END//
+ERROR 42000: 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 'null condition for sqlstate '02000';
+declare exit handler for null set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric condition for sqlstate '02000';
+declare exit handler for numeric set @var2 = 1;
+END//
+ERROR 42000: 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 'numeric condition for sqlstate '02000';
+declare exit handler for numeric set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare on condition for sqlstate '02000';
+declare exit handler for on set @var2 = 1;
+END//
+ERROR 42000: 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 'on condition for sqlstate '02000';
+declare exit handler for on set @var2 = 1;...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare optimize condition for sqlstate '02000';
+declare exit handler for optimize set @var2 = 1;
+END//
+ERROR 42000: 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 'optimize condition for sqlstate '02000';
+declare exit handler for optimize se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare option condition for sqlstate '02000';
+declare exit handler for option set @var2 = 1;
+END//
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare optionally condition for sqlstate '02000';
+declare exit handler for optionally set @var2 = 1;
+END//
+ERROR 42000: 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 'optionally condition for sqlstate '02000';
+declare exit handler for optionall...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare or condition for sqlstate '02000';
+declare exit handler for or set @var2 = 1;
+END//
+ERROR 42000: 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 'or condition for sqlstate '02000';
+declare exit handler for or set @var2 = 1;...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare order condition for sqlstate '02000';
+declare exit handler for order set @var2 = 1;
+END//
+ERROR 42000: 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 'order condition for sqlstate '02000';
+declare exit handler for order set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare out condition for sqlstate '02000';
+declare exit handler for out set @var2 = 1;
+END//
+ERROR 42000: 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 'out condition for sqlstate '02000';
+declare exit handler for out set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare outer condition for sqlstate '02000';
+declare exit handler for outer set @var2 = 1;
+END//
+ERROR 42000: 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 'outer condition for sqlstate '02000';
+declare exit handler for outer set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare outfile condition for sqlstate '02000';
+declare exit handler for outfile set @var2 = 1;
+END//
+ERROR 42000: 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 'outfile condition for sqlstate '02000';
+declare exit handler for outfile set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare precision condition for sqlstate '02000';
+declare exit handler for precision set @var2 = 1;
+END//
+ERROR 42000: 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 'precision condition for sqlstate '02000';
+declare exit handler for precision ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare primary condition for sqlstate '02000';
+declare exit handler for primary set @var2 = 1;
+END//
+ERROR 42000: 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 'primary condition for sqlstate '02000';
+declare exit handler for primary set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare procedure condition for sqlstate '02000';
+declare exit handler for procedure set @var2 = 1;
+END//
+ERROR 42000: 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 'procedure condition for sqlstate '02000';
+declare exit handler for procedure ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare purge condition for sqlstate '02000';
+declare exit handler for purge set @var2 = 1;
+END//
+ERROR 42000: 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 'purge condition for sqlstate '02000';
+declare exit handler for purge set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare range condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'range condition for sqlstate '02000';
+declare exit handler for int set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare read condition for sqlstate '02000';
+declare exit handler for read set @var2 = 1;
+END//
+ERROR 42000: 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 'read condition for sqlstate '02000';
+declare exit handler for read set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare reads condition for sqlstate '02000';
+declare exit handler for reads set @var2 = 1;
+END//
+ERROR 42000: 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 'reads condition for sqlstate '02000';
+declare exit handler for reads set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare read_only condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'int set @var2 = 1;
+END' at line 4
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare read_write condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'read_write condition for sqlstate '02000';
+declare exit handler for int set @...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare real condition for sqlstate '02000';
+declare exit handler for real set @var2 = 1;
+END//
+ERROR 42000: 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 'real condition for sqlstate '02000';
+declare exit handler for real set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare references condition for sqlstate '02000';
+declare exit handler for references set @var2 = 1;
+END//
+ERROR 42000: 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 'references condition for sqlstate '02000';
+declare exit handler for reference...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare regexp condition for sqlstate '02000';
+declare exit handler for regexp set @var2 = 1;
+END//
+ERROR 42000: 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 'regexp condition for sqlstate '02000';
+declare exit handler for regexp set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare release condition for sqlstate '02000';
+declare exit handler for int set @var2 = 1;
+END//
+ERROR 42000: 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 'release condition for sqlstate '02000';
+declare exit handler for int set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare rename condition for sqlstate '02000';
+declare exit handler for rename set @var2 = 1;
+END//
+ERROR 42000: 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 'rename condition for sqlstate '02000';
+declare exit handler for rename set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare repeat condition for sqlstate '02000';
+declare exit handler for repeat set @var2 = 1;
+END//
+ERROR 42000: 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 'repeat condition for sqlstate '02000';
+declare exit handler for repeat set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare replace condition for sqlstate '02000';
+declare exit handler for replace set @var2 = 1;
+END//
+ERROR 42000: 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 'replace condition for sqlstate '02000';
+declare exit handler for replace set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare require condition for sqlstate '02000';
+declare exit handler for require set @var2 = 1;
+END//
+ERROR 42000: 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 'require condition for sqlstate '02000';
+declare exit handler for require set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare restrict condition for sqlstate '02000';
+declare exit handler for restrict set @var2 = 1;
+END//
+ERROR 42000: 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 'restrict condition for sqlstate '02000';
+declare exit handler for restrict se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare return condition for sqlstate '02000';
+declare exit handler for return set @var2 = 1;
+END//
+ERROR 42000: 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 'return condition for sqlstate '02000';
+declare exit handler for return set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare revoke condition for sqlstate '02000';
+declare exit handler for revoke set @var2 = 1;
+END//
+ERROR 42000: 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 'revoke condition for sqlstate '02000';
+declare exit handler for revoke set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare right condition for sqlstate '02000';
+declare exit handler for right set @var2 = 1;
+END//
+ERROR 42000: 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 'right condition for sqlstate '02000';
+declare exit handler for right set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare rlike condition for sqlstate '02000';
+declare exit handler for rlike set @var2 = 1;
+END//
+ERROR 42000: 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 'rlike condition for sqlstate '02000';
+declare exit handler for rlike set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare schema condition for sqlstate '02000';
+declare exit handler for schema set @var2 = 1;
+END//
+ERROR 42000: 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 'schema condition for sqlstate '02000';
+declare exit handler for schema set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare schemas condition for sqlstate '02000';
+declare exit handler for schemas set @var2 = 1;
+END//
+ERROR 42000: 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 'schemas condition for sqlstate '02000';
+declare exit handler for schemas set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare second_microsecond condition for sqlstate '02000';
+declare exit handler for second_microsecond set @var2 = 1;
+END//
+ERROR 42000: 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 'second_microsecond condition for sqlstate '02000';
+declare exit handler for s...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare select condition for sqlstate '02000';
+declare exit handler for SELECT set @var2 = 1;
+END//
+ERROR 42000: 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 'select condition for sqlstate '02000';
+declare exit handler for SELECT set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sensitive condition for sqlstate '02000';
+declare exit handler for sensitive set @var2 = 1;
+END//
+ERROR 42000: 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 'sensitive condition for sqlstate '02000';
+declare exit handler for sensitive ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare separator condition for sqlstate '02000';
+declare exit handler for separator set @var2 = 1;
+END//
+ERROR 42000: 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 'separator condition for sqlstate '02000';
+declare exit handler for separator ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare set condition for sqlstate '02000';
+declare exit handler for set set @var2 = 1;
+END//
+ERROR 42000: 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 'set condition for sqlstate '02000';
+declare exit handler for set set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare show condition for sqlstate '02000';
+declare exit handler for show set @var2 = 1;
+END//
+ERROR 42000: 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 'show condition for sqlstate '02000';
+declare exit handler for show set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare smallint condition for sqlstate '02000';
+declare exit handler for smallint set @var2 = 1;
+END//
+ERROR 42000: 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 'smallint condition for sqlstate '02000';
+declare exit handler for smallint se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare spatial condition for sqlstate '02000';
+declare exit handler for spatial set @var2 = 1;
+END//
+ERROR 42000: 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 'spatial condition for sqlstate '02000';
+declare exit handler for spatial set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare specific condition for sqlstate '02000';
+declare exit handler for specific set @var2 = 1;
+END//
+ERROR 42000: 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 'specific condition for sqlstate '02000';
+declare exit handler for specific se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sql condition for sqlstate '02000';
+declare exit handler for sql set @var2 = 1;
+END//
+ERROR 42000: 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 'sql condition for sqlstate '02000';
+declare exit handler for sql set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sqlexception condition for sqlstate '02000';
+declare exit handler for sqlexception set @var2 = 1;
+END//
+ERROR 42000: 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 'sqlexception condition for sqlstate '02000';
+declare exit handler for sqlexce...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sqlstate condition for sqlstate '02000';
+declare exit handler for sqlstate set @var2 = 1;
+END//
+ERROR 42000: 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 'sqlstate condition for sqlstate '02000';
+declare exit handler for sqlstate se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sqlwarning condition for sqlstate '02000';
+declare exit handler for sqlwarning set @var2 = 1;
+END//
+ERROR 42000: 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 'sqlwarning condition for sqlstate '02000';
+declare exit handler for sqlwarnin...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sql_big_result condition for sqlstate '02000';
+declare exit handler for sql_big_result set @var2 = 1;
+END//
+ERROR 42000: 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 'sql_big_result condition for sqlstate '02000';
+declare exit handler for sql_b...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sql_calc_found_rows condition for sqlstate '02000';
+declare exit handler for sql_calc_found_rows set @var2 = 1;
+END//
+ERROR 42000: 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 'sql_calc_found_rows condition for sqlstate '02000';
+declare exit handler for ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sql_small_result condition for sqlstate '02000';
+declare exit handler for sql_small_result set @var2 = 1;
+END//
+ERROR 42000: 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 'sql_small_result condition for sqlstate '02000';
+declare exit handler for sql...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare ssl condition for sqlstate '02000';
+declare exit handler for ssl set @var2 = 1;
+END//
+ERROR 42000: 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 'ssl condition for sqlstate '02000';
+declare exit handler for ssl set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare starting condition for sqlstate '02000';
+declare exit handler for starting set @var2 = 1;
+END//
+ERROR 42000: 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 'starting condition for sqlstate '02000';
+declare exit handler for starting se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare straight_join condition for sqlstate '02000';
+declare exit handler for straight_join set @var2 = 1;
+END//
+ERROR 42000: 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 'straight_join condition for sqlstate '02000';
+declare exit handler for straig...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare table condition for sqlstate '02000';
+declare exit handler for table set @var2 = 1;
+END//
+ERROR 42000: 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 'table condition for sqlstate '02000';
+declare exit handler for table set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare terminated condition for sqlstate '02000';
+declare exit handler for terminated set @var2 = 1;
+END//
+ERROR 42000: 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 'terminated condition for sqlstate '02000';
+declare exit handler for terminate...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare then condition for sqlstate '02000';
+declare exit handler for then set @var2 = 1;
+END//
+ERROR 42000: 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 'then condition for sqlstate '02000';
+declare exit handler for then set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinyblob condition for sqlstate '02000';
+declare exit handler for tinyblob set @var2 = 1;
+END//
+ERROR 42000: 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 'tinyblob condition for sqlstate '02000';
+declare exit handler for tinyblob se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinyint condition for sqlstate '02000';
+declare exit handler for tinyint set @var2 = 1;
+END//
+ERROR 42000: 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 'tinyint condition for sqlstate '02000';
+declare exit handler for tinyint set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinytext condition for sqlstate '02000';
+declare exit handler for tinytext set @var2 = 1;
+END//
+ERROR 42000: 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 'tinytext condition for sqlstate '02000';
+declare exit handler for tinytext se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare to condition for sqlstate '02000';
+declare exit handler for to set @var2 = 1;
+END//
+ERROR 42000: 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 'to condition for sqlstate '02000';
+declare exit handler for to set @var2 = 1;...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare trailing condition for sqlstate '02000';
+declare exit handler for trailing set @var2 = 1;
+END//
+ERROR 42000: 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 'trailing condition for sqlstate '02000';
+declare exit handler for trailing se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare trigger condition for sqlstate '02000';
+declare exit handler for trigger set @var2 = 1;
+END//
+ERROR 42000: 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 'trigger condition for sqlstate '02000';
+declare exit handler for trigger set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare true condition for sqlstate '02000';
+declare exit handler for true set @var2 = 1;
+END//
+ERROR 42000: 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 'true condition for sqlstate '02000';
+declare exit handler for true set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare undo condition for sqlstate '02000';
+declare exit handler for undo set @var2 = 1;
+END//
+ERROR 42000: 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 'undo condition for sqlstate '02000';
+declare exit handler for undo set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare union condition for sqlstate '02000';
+declare exit handler for union set @var2 = 1;
+END//
+ERROR 42000: 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 'union condition for sqlstate '02000';
+declare exit handler for union set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare unique condition for sqlstate '02000';
+declare exit handler for unique set @var2 = 1;
+END//
+ERROR 42000: 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 'unique condition for sqlstate '02000';
+declare exit handler for unique set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare unlock condition for sqlstate '02000';
+declare exit handler for unlock set @var2 = 1;
+END//
+ERROR 42000: 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 'unlock condition for sqlstate '02000';
+declare exit handler for unlock set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare unsigned condition for sqlstate '02000';
+declare exit handler for unsigned set @var2 = 1;
+END//
+ERROR 42000: 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 'unsigned condition for sqlstate '02000';
+declare exit handler for unsigned se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare update condition for sqlstate '02000';
+declare exit handler for update set @var2 = 1;
+END//
+ERROR 42000: 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 'update condition for sqlstate '02000';
+declare exit handler for update set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare usage condition for sqlstate '02000';
+declare exit handler for usage set @var2 = 1;
+END//
+ERROR 42000: 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 'usage condition for sqlstate '02000';
+declare exit handler for usage set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare use condition for sqlstate '02000';
+declare exit handler for USE set @var2 = 1;
+END//
+ERROR 42000: 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 'use condition for sqlstate '02000';
+declare exit handler for USE set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare using condition for sqlstate '02000';
+declare exit handler for using set @var2 = 1;
+END//
+ERROR 42000: 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 'using condition for sqlstate '02000';
+declare exit handler for using set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare utc_date condition for sqlstate '02000';
+declare exit handler for utc_date set @var2 = 1;
+END//
+ERROR 42000: 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 'utc_date condition for sqlstate '02000';
+declare exit handler for utc_date se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare utc_time condition for sqlstate '02000';
+declare exit handler for utc_time set @var2 = 1;
+END//
+ERROR 42000: 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 'utc_time condition for sqlstate '02000';
+declare exit handler for utc_time se...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare utc_timestamp condition for sqlstate '02000';
+declare exit handler for utc_timestamp set @var2 = 1;
+END//
+ERROR 42000: 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 'utc_timestamp condition for sqlstate '02000';
+declare exit handler for utc_ti...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare values condition for sqlstate '02000';
+declare exit handler for values set @var2 = 1;
+END//
+ERROR 42000: 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 condition for sqlstate '02000';
+declare exit handler for values set @v...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare varbinary condition for sqlstate '02000';
+declare exit handler for varbinary set @var2 = 1;
+END//
+ERROR 42000: 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 'varbinary condition for sqlstate '02000';
+declare exit handler for varbinary ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare varchar condition for sqlstate '02000';
+declare exit handler for varchar set @var2 = 1;
+END//
+ERROR 42000: 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 'varchar condition for sqlstate '02000';
+declare exit handler for varchar set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare varcharacter condition for sqlstate '02000';
+declare exit handler for varcharacter set @var2 = 1;
+END//
+ERROR 42000: 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 'varcharacter condition for sqlstate '02000';
+declare exit handler for varchar...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare varying condition for sqlstate '02000';
+declare exit handler for varying set @var2 = 1;
+END//
+ERROR 42000: 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 'varying condition for sqlstate '02000';
+declare exit handler for varying set ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare when condition for sqlstate '02000';
+declare exit handler for when set @var2 = 1;
+END//
+ERROR 42000: 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 'when condition for sqlstate '02000';
+declare exit handler for when set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare where condition for sqlstate '02000';
+declare exit handler for where set @var2 = 1;
+END//
+ERROR 42000: 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 'where condition for sqlstate '02000';
+declare exit handler for where set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare while condition for sqlstate '02000';
+declare exit handler for while set @var2 = 1;
+END//
+ERROR 42000: 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 'while condition for sqlstate '02000';
+declare exit handler for while set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare with condition for sqlstate '02000';
+declare exit handler for with set @var2 = 1;
+END//
+ERROR 42000: 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 'with condition for sqlstate '02000';
+declare exit handler for with set @var2 ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare write condition for sqlstate '02000';
+declare exit handler for write set @var2 = 1;
+END//
+ERROR 42000: 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 'write condition for sqlstate '02000';
+declare exit handler for write set @var...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare xor condition for sqlstate '02000';
+declare exit handler for xor set @var2 = 1;
+END//
+ERROR 42000: 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 'xor condition for sqlstate '02000';
+declare exit handler for xor set @var2 = ...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare year_month condition for sqlstate '02000';
+declare exit handler for year_month set @var2 = 1;
+END//
+ERROR 42000: 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 'year_month condition for sqlstate '02000';
+declare exit handler for year_mont...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare zerofill condition for sqlstate '02000';
+declare exit handler for zerofill set @var2 = 1;
+END//
+ERROR 42000: 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 'zerofill condition for sqlstate '02000';
+declare exit handler for zerofill se...' at line 3
+
+Testcase :
+----------
+Ensure that every possible type of handler may be declared for
+a stored procedure (continue- handler_type ).
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '23000' set @x2 = 1;
+set @x = 1;
+insert into t2(f1) values (1);
+set @x = 2;
+insert into t2(f1) values (1);
+set @x = 3;
+END//
+CALL sp1();
+DROP PROCEDURE sp1;
+DROP PROCEDURE IF EXISTS handler1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.handler1 does not exist
+CREATE PROCEDURE handler1()
+BEGIN
+declare undo handler for sqlstate '23000' set @x2 = 1;
+set @x = 1;
+insert into t values (1);
+set @x = 2;
+insert into t values (1);
+set @x = 3;
+END//
+ERROR 42000: 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 'undo handler for sqlstate '23000' set @x2 = 1;
+set @x = 1;
+insert into t valu...' at line 3
+DROP PROCEDURE IF EXISTS handler1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.handler1 does not exist
+CREATE PROCEDURE handler1()
+BEGIN
+declare continueinv handler for sqlstate '2300' set @x2 = 1;
+set @x = 1;
+insert into t values (1);
+set @x = 2;
+insert into t values (1);
+set @x = 3;
+END//
+ERROR HY000: Unknown data type: 'handler'
+DROP PROCEDURE IF EXISTS handler1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.handler1 does not exist
+CREATE PROCEDURE handler1()
+BEGIN
+declare undoinv handler for sqlstate '2300' set @x2 = 1;
+set @x = 1;
+insert into t values (1);
+set @x = 2;
+insert into t values (1);
+set @x = 3;
+END//
+ERROR HY000: Unknown data type: 'handler'
+DROP PROCEDURE IF EXISTS handler1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.handler1 does not exist
+CREATE PROCEDURE handler1 ()
+BEGIN
+declare exitinv handler for sqlstate '2300' set @x2 = 1;
+set @x = 1;
+insert into t values (1);
+set @x = 2;
+insert into t values (1);
+set @x = 3;
+END//
+ERROR HY000: Unknown data type: 'handler'
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare accessible handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'accessible handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare add handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'add handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare all handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'all handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare alter handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'alter handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare analyze handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'analyze handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare and handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'and handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare as handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'as handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare asc handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'asc handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare asensitive handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'asensitive handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare before handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'before handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare between handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'between handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare bigint handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'bigint handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare binary handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'binary handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare blob handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'blob handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare both handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'both handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare by handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'by handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare call handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'call handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare cascade handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'cascade handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare case handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'case handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare change handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'change handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare char handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'char handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare character handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'character handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare check handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'check handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare collate handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'collate handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare column handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'column handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare condition handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'condition handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare constraint handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'constraint handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare continue handler for sqlstate '02000' set @var2 = 1;
+END//
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare convert handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'convert handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare create handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'create handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare cross handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'cross handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare current_date handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'current_date handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare current_time handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'current_time handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare current_timestamp handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'current_timestamp handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare current_user handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'current_user handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare cursor handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'cursor handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare database handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'database handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare databases handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'databases handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare day_hour handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'day_hour handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare day_microsecond handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'day_microsecond handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare day_minute handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'day_minute handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare day_second handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'day_second handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare dec handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'dec handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare decimal handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'decimal handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare declare handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'declare handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare default handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'default handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare delayed handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'delayed handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare delete handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'delete handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare desc handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'desc handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare describe handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'describe handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare deterministic handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'deterministic handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare distinct handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'distinct handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare distinctrow handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'distinctrow handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare div handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'div handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare double handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'double handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare drop handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'drop handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare dual handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'dual handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare each handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'each handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare else handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'else handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare elseif handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'elseif handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare enclosed handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'enclosed handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare escaped handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'escaped handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare exists handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'exists handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare exit handler for sqlstate '02000' set @var2 = 1;
+END//
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare explain handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'explain handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare false handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'false handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare fetch handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'fetch handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'float handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float4 handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'float4 handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare float8 handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'float8 handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare for handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'for handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare force handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'force handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare foreign handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'foreign handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare from handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'from handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare fulltext handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'fulltext handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare grant handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'grant handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare group handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'group handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare having handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'having handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare high_priority handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'high_priority handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare hour_microsecond handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'hour_microsecond handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare hour_minute handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'hour_minute handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare hour_second handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'hour_second handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare if handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'if handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare ignore handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'ignore handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare in handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'in handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare index handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'index handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare infile handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'infile handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare inner handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'inner handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare inout handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'inout handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare insensitive handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'insensitive handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare insert handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'insert handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'int handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int1 handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'int1 handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int2 handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'int2 handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int3 handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'int3 handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int4 handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'int4 handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare int8 handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'int8 handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare integer handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'integer handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare interval handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'interval handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare into handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'into handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare is handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'is handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare iterate handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'iterate handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare join handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'join handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare key handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'key handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare keys handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'keys handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare kill handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'kill handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare leading handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'leading handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare leave handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'leave handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare left handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'left handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare like handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'like handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare limit handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'limit handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare linear handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'linear handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare lines handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'lines handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare load handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'load handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare localtime handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'localtime handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare localtimestamp handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'localtimestamp handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare lock handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'lock handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare long handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'long handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare longblob handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'longblob handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare longtext handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'longtext handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare loop handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'loop handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare low_priority handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'low_priority handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare match handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'match handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumblob handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'mediumblob handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumint handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'mediumint handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mediumtext handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'mediumtext handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare middleint handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'middleint handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare minute_microsecond handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'minute_microsecond handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare minute_second handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'minute_second handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare mod handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'mod handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare modifies handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'modifies handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare natural handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'natural handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare not handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'not handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare no_write_to_binlog handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'no_write_to_binlog handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare null handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'null handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare numeric handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'numeric handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare on handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'on handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare optimize handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'optimize handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare option handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR HY000: Unknown data type: 'handler'
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare optionally handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'optionally handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare or handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'or handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare order handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'order handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare out handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'out handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare outer handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'outer handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare outfile handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'outfile handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare precision handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'precision handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare primary handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'primary handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare privileges handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR HY000: Unknown data type: 'handler'
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare procedure handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'procedure handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare purge handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'purge handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare range handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'range handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare read handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'read handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare reads handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'reads handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare read_only handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR HY000: Unknown data type: 'handler'
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare read_write handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'read_write handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare real handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'real handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare references handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'references handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare regexp handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'regexp handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare release handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'release handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare rename handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'rename handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare repeat handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'repeat handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare replace handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'replace handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare require handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'require handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare restrict handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'restrict handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare return handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'return handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare revoke handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'revoke handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare right handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'right handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare rlike handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'rlike handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare schema handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'schema handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare schemas handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'schemas handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare second_microsecond handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'second_microsecond handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare select handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'select handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sensitive handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'sensitive handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare separator handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'separator handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare set handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'set handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare show handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'show handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare smallint handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'smallint handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare spatial handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'spatial handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare specific handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'specific handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sql handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'sql handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sqlexception handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'sqlexception handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sqlstate handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'sqlstate handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sqlwarning handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'sqlwarning handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sql_big_result handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'sql_big_result handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sql_calc_found_rows handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'sql_calc_found_rows handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare sql_small_result handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'sql_small_result handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare ssl handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'ssl handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare starting handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'starting handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare straight_join handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'straight_join handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare table handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'table handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare terminated handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'terminated handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare then handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'then handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinyblob handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'tinyblob handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinyint handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'tinyint handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare tinytext handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'tinytext handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare to handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'to handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare trailing handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'trailing handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare trigger handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'trigger handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare true handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'true handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare undo handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'undo handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare union handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'union handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare unique handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'unique handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare unlock handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'unlock handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare unsigned handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'unsigned handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare update handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'update handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare usage handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'usage handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare use handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'use handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare using handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'using handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare utc_date handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'utc_date handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare utc_time handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'utc_time handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare utc_timestamp handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'utc_timestamp handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare values handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare varbinary handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'varbinary handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare varchar handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'varchar handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare varcharacter handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'varcharacter handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare varying handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'varying handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare when handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'when handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare where handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'where handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare while handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'while handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare with handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'with handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare write handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'write handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare xor handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'xor handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare year_month handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'year_month handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare zerofill handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR 42000: 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 'zerofill handler for sqlstate '02000' set @var2 = 1;
+END' at line 3
+USE db_storedproc;
+
+Testcase 4.2.26:
+--------------------------------------------------------------------------------
+set @v1='0';
+set @v2='0';
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x char;
+declare y char;
+declare cond1 condition for sqlstate '42000';
+declare cur1 cursor for SELECT f1 from t2 limit 1;
+declare continue handler for cond1 set @x = 4;
+set @x = '1';
+set @y = '2';
+BEGIN
+declare x char;
+declare y char;
+declare cur1 cursor for SELECT f1 from t2 limit 2, 1;
+declare continue handler for sqlstate '42000' set @x = 3;
+open cur1;
+fetch cur1 into y;
+close cur1;
+CALL nonsexist();
+SELECT x, y, @x;
+END;
+open cur1;
+fetch cur1 into y;
+close cur1;
+CALL nonsexist();
+set @v1 = @x;
+set @v2 = y;
+END//
+CALL sp1();
+x y @x
+NULL a 3
+SELECT @v1, @v2;
+@v1 @v2
+4 a
+DROP PROCEDURE sp1;
+
+Testcase 4.2.28:
+--------------------------------------------------------------------------------
+SET @x = 0;
+SET @y = 0;
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+SET @start_global_value = @@GLOBAL.sort_buffer_size;
+CREATE PROCEDURE sp1()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '42000' SET @x2 = 1;
+SET SESSION SORT_BUFFER_SIZE = 10 * 1024 * 1024;
+SELECT @@sort_buffer_size;
+SET @x = 4;
+SET @y = 3;
+SET GLOBAL SORT_BUFFER_SIZE = 2 * 1024 * 1024;
+SELECT @@sort_buffer_size;
+SET @@sort_buffer_size = 10 * 1024 * 1024;
+SELECT @@sort_buffer_size;
+END//
+CALL sp1();
+@@sort_buffer_size
+10485760
+@@sort_buffer_size
+10485760
+@@sort_buffer_size
+10485760
+SELECT @x, @y;
+@x @y
+4 3
+SET @@GLOBAL.sort_buffer_size = @start_global_value;
+
+Testcase 4.2.29:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx char default 'x';
+declare xy char default 'y';
+declare xz char default 'z';
+set @xx = xx, @xy = xy;
+set @xz = xz;
+SELECT @xx, @xy, @xz;
+END//
+CALL sp1();
+@xx @xy @xz
+x y z
+DROP PROCEDURE sp1;
+
+Testcase 4.2.30:
+--------------------------------------------------------------------------------
+set @xx=0;
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx int;
+set xx = 'asd';
+set @xx = xx;
+SELECT @xx;
+END//
+CALL sp1();
+@xx
+0
+Warnings:
+Warning 1366 Incorrect integer value: 'asd' for column ``.``.`xx` at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx int;
+set xx = 5;
+set @xx = xx;
+SELECT @xx;
+END//
+CALL sp1();
+@xx
+5
+DROP PROCEDURE sp1;
+
+Testcase 4.2.31 - a:
+--------------------------------------------------------------------------------
+set @xx=0;
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx char;
+set xx = 'temp';
+set @xx = xx;
+END//
+CALL sp1();
+Warnings:
+Warning 1265 Data truncated for column 'xx' at row 0
+SELECT @xx;
+@xx
+t
+DROP PROCEDURE sp1;
+
+Testcase 4.2.31 - b:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx float;
+set xx = 'asd';
+SELECT xx;
+END//
+CALL sp1();
+xx
+0
+Warnings:
+Warning 1366 Incorrect double value: 'asd' for column ``.``.`xx` at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx float;
+set xx = 1.6;
+SELECT xx;
+END//
+CALL sp1();
+xx
+1.6
+DROP PROCEDURE sp1;
+
+Testcase 4.2.31 - c:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx datetime;
+set xx = 'asd';
+SELECT xx;
+END//
+CALL sp1();
+xx
+0000-00-00 00:00:00
+Warnings:
+Warning 1265 Data truncated for column 'xx' at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx datetime;
+set xx = '2006-06-06 01:01:01';
+SELECT xx;
+END//
+CALL sp1();
+xx
+2006-06-06 01:01:01
+DROP PROCEDURE sp1;
+
+Testcase 4.2.31 - d:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx varchar(20);
+set xx = "abcdefghijk";
+SELECT xx;
+END//
+CALL sp1();
+xx
+abcdefghijk
+DROP PROCEDURE sp1;
+
+Testcase 4.2.31 - e:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx tinyint;
+set xx = 'asd';
+SELECT xx;
+END//
+CALL sp1();
+xx
+0
+Warnings:
+Warning 1366 Incorrect integer value: 'asd' for column ``.``.`xx` at row 0
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare xx tinyint;
+set xx = -125;
+SELECT xx;
+END//
+CALL sp1();
+xx
+-125
+DROP PROCEDURE sp1;
+
+Testcase 4.2.37:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare x integer; declare y integer;
+SELECT sal, f2 into x, y from t2 limit 1;
+set @x=x; set @y=y;
+END//
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x char ascii;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+Warnings:
+Warning 1265 Data truncated for column 'x' at row 1
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x tinytext;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x text;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x mediumtext;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x longtext;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x tinyblob;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x blob;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x mediumblob;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x longblob;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x binary;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+Warnings:
+Warning 1265 Data truncated for column 'x' at row 1
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x tinyint;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x tinyint unsigned;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x tinyint zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x tinyint unsigned zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x smallint;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x smallint unsigned;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x smallint zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x smallint unsigned zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x mediumint;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x mediumint unsigned;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x mediumint zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x mediumint unsigned zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x int;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x int unsigned;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x int zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x int unsigned zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x bigint;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x bigint unsigned;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x bigint zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x bigint unsigned zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x decimal;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x decimal unsigned;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x decimal zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x decimal unsigned zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x numeric;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x numeric unsigned;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x numeric zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x numeric unsigned zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x real;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x real unsigned;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x real zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x real unsigned zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x float;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x float unsigned;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x float zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x float unsigned zerofill;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x date;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x time;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x datetime;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x timestamp;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x year;
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x year(3);
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x year(4);
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x enum("1enum", "2enum");
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare x set("1set", "2set");
+SELECT f1 into x from t2 limit 1;
+END//
+CALL sp1();
+DROP PROCEDURE sp1;
+
+Testcase 4.2.38:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare notable condition for sqlstate '42S02';
+declare continue handler for notable set @x2=1;
+set @x = 1;
+insert into t2(f1) values (1);
+set @x = 2;
+insert into t2(f1) values (1);
+set @x = 3;
+END//
+CALL sp1();
+DROP PROCEDURE sp1;
+
+Testcase 4.2.39:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '42000';
+declare cond1 condition for sqlstate '23000';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values(1);
+END//
+ERROR 42000: Duplicate condition: cond1
+
+Testcase 4.2.41:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '1';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: '1'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '12';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: '12'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '123';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: '123'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '1234';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: '1234'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '123456';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: '123456'
+
+Testcase 4.2.42:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate 'abcdefghi';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: 'abcdefghi'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '42000test';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: '42000test'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '00000@#$%^&';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: '00000@#$%^&'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate 'null';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: 'null'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate ' ';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: ' '
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate 1234567890;
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: 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 '1234567890;
+declare continue handler for cond1 set @var2 = 1;
+insert into tnu...' at line 3
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '2005-03-03';
+declare continue handler for cond1 set @var2 = 1;
+insert into tnull values( 1);
+END//
+ERROR 42000: Bad SQLSTATE: '2005-03-03'
+
+Testcase 4.2.43:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+expect failure, SQLSTATE 00000 is not an acceptable value
+for an SP's handler
+CREATE PROCEDURE sp1()
+BEGIN
+declare cond1 condition for sqlstate '00000';
+declare continue handler for cond1 set @var2 = 1;
+set @x=1;
+SELECT @var2;
+END//
+ERROR 42000: Bad SQLSTATE: '00000'
+ensure SP doesn't exist
+CALL sp1();
+ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
+DROP PROCEDURE IF EXISTS sp1;
+
+Testcase 4.2.45:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE handler1 ()
+BEGIN
+declare continue handler for sqlstate '23000' set @varr1 = 5;
+declare continue handler for sqlstate '23000' set @varr3 = 7;
+END//
+ERROR 42000: Duplicate handler declared in the same block
+DROP PROCEDURE IF EXISTS handler1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.handler1 does not exist
+CREATE PROCEDURE handler1 ()
+BEGIN
+declare mycondition condition for sqlstate '23000';
+declare continue handler for mycondition set @varr3 = 7;
+declare continue handler for sqlstate '23000' set @varr3 = 7;
+END//
+ERROR 42000: Duplicate handler declared in the same block
+
+Testcase 4.2.46:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '1' set @var2 = 1;
+END//
+ERROR 42000: Bad SQLSTATE: '1'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '12' set @var2 = 1;
+END//
+ERROR 42000: Bad SQLSTATE: '12'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '123' set @var2 = 1;
+END//
+ERROR 42000: Bad SQLSTATE: '123'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '1234' set @var2 = 1;
+END//
+ERROR 42000: Bad SQLSTATE: '1234'
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '123456' set @var2 = 1;
+END//
+ERROR 42000: Bad SQLSTATE: '123456'
+
+Testcase 4.2.47:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '42s0200test' set @var2 = 1;
+insert into tnull values( 1);
+SELECT @var2;
+END//
+ERROR 42000: Bad SQLSTATE: '42s0200test'
+
+Testcase 4.2.48:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+This creation should fail, SQLSTATE 00000 is unacceptable
+CREATE PROCEDURE sp1()
+BEGIN
+declare continue handler for sqlstate '00000' set @var2 = 1;
+set @x=1;
+SELECT @var2;
+END//
+ERROR 42000: Bad SQLSTATE: '00000'
+Verify SP wasn't created
+CALL sp1();
+ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
+DROP PROCEDURE IF EXISTSsp1;
+ERROR 42000: 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 'EXISTSsp1' at line 1
+
+Testcase 4.2.52:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+declare cur1 cursor for SELECT f1, f2 from t2;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur1;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newlf1, newf3, newsal;
+set count = count - 1;
+END while;
+close cur1;
+END;
+END//
+ERROR 42000: Duplicate cursor: cur1
+
+Testcase 4.2.53:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, lf1, f3, f4 into @w, @x, @y, @z from t2;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur1;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newlf1, newf3, newsal;
+set count = count - 1;
+END while;
+close cur1;
+END;
+END//
+ERROR 42000: Cursor SELECT must not have INTO
+
+Testcase 4.2.54:
+--------------------------------------------------------------------------------
+
+Testcase 4.2.55:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur1;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf3;
+set count = count - 1;
+END while;
+close cur1;
+END;
+END//
+ERROR 42000: Undefined CURSOR: cur1
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 0;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur1;
+BEGIN
+open cur1;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf3, newf4;
+set count = count - 1;
+END while;
+END;
+close cur1;
+END;
+END//
+CALL sp1();
+ERROR 24000: Cursor is already open
+
+Testcase 4.2.56:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur1;
+open cur1;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf3;
+set count = count - 1;
+END while;
+close cur1;
+END;
+END//
+CALL sp1();
+ERROR 24000: Cursor is already open
+DROP PROCEDURE sp1;
+
+Testcase 4.2.57:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2;
+declare cur2 cursor for SELECT f1, f2 from t2;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur2;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf3;
+set count = count - 1;
+END while;
+close cur1;
+END;
+END//
+CALL sp1();
+ERROR 24000: Cursor is not open
+DROP PROCEDURE sp1;
+
+Testcase 4.2.59:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf3;
+set count = count - 1;
+END while;
+open cur1;
+close cur1;
+END;
+END//
+CALL sp1();
+ERROR 24000: Cursor is not open
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 10;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+declare continue handler for sqlstate '02000' set done = 1;
+open cur1;
+BEGIN
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf3, newf4;
+set count = count - 1;
+END while;
+open cur1;
+close cur1;
+END;
+close cur1;
+END//
+CALL sp1();
+ERROR 24000: Cursor is not open
+DROP PROCEDURE sp1;
+
+Testcase 4.2.60:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur1;
+close cur1;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf3;
+set count = count - 1;
+END while;
+END;
+END//
+CALL sp1();
+ERROR 24000: Cursor is not open
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+declare continue handler for sqlstate '02000' set done = 1;
+open cur1;
+close cur1;
+BEGIN
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+open cur1;
+END;
+fetch cur1 into newf1, newf2, newf3, newf4;
+END//
+CALL sp1();
+ERROR 24000: Cursor is not open
+DROP PROCEDURE sp1;
+
+Testcase 4.2.62:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf2 char(20);
+declare newf1 int1;
+declare cur1 cursor for SELECT f1, f3 from t2 limit 20, 10;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur1;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2;
+set @x = newf1;
+set @y = newf2;
+SELECT @x, @y;
+set count = count - 1;
+END while;
+close cur1;
+END;
+END//
+CALL sp1();
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+@x @y
+NULL NULL
+DROP PROCEDURE sp1;
+
+Testcase 4.2.63:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1()
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+close cur1;
+open cur1;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf3;
+set count = count - 1;
+END while;
+close cur1;
+END;
+END//
+CALL sp1();
+ERROR 24000: Cursor is not open
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 0;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+open cur1;
+END;
+close cur1;
+END//
+CALL sp1();
+ERROR 24000: Cursor is not open
+DROP PROCEDURE sp1;
+
+Testcase 4.2.64:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+BEGIN
+open cur1;
+start transaction;
+fetch cur1 into newf1, newf2, newf4, newf3;
+commit;
+fetch cur1 into newf1, newf2, newf4, newf3;
+END;
+END//
+CALL sp1();
+ERROR 02000: No data - zero rows fetched, selected, or processed
+DROP PROCEDURE sp1;
+
+Testcase 4.2.65:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+BEGIN
+open cur1;
+fetch cur1 into newf1, newf2, newf4, newf3;
+rollback;
+fetch cur1 into newf1, newf2, newf4, newf3;
+commit;
+END;
+END//
+CALL sp1();
+ERROR 02000: No data - zero rows fetched, selected, or processed
+DROP PROCEDURE sp1;
+
+Testcase 4.2.66:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur1;
+set count = count - 1;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf3;
+set count = count - 1;
+END while;
+close cur1;
+fetch cur1 into newf1, newf2, newf4, newf3;
+END;
+END//
+CALL sp1();
+ERROR 24000: Cursor is not open
+DROP PROCEDURE sp1;
+
+Testcase 4.2.67:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+declare continue handler for sqlstate '02000' set done = 1;
+BEGIN
+open cur1;
+# set count = count - 1;
+# while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf3;
+# set count = count - 1;
+# END while;
+END;
+fetch cur1 into newf1, newf2, newf4, newf3;
+END//
+CALL sp1();
+DROP PROCEDURE sp1;
+
+Testcase 4.2.70:
+--------------------------------------------------------------------------------
+create table temp1( f1 char(20), f2 char(20), f3 int, f4 char(20) );
+create table temp2( f1 char(20), f2 char(20), f3 int, f4 char(20) );
+DROP PROCEDURE IF EXISTS sp1;
+Warnings:
+Note 1305 PROCEDURE db_storedproc.sp1 does not exist
+CREATE PROCEDURE sp1( )
+BEGIN
+declare done int default 0;
+declare count integer default 20;
+declare newf1 char(20);
+declare newf2 char(20);
+declare newf3 char(20);
+declare newf4 integer;
+declare newf21 char(20);
+declare newf22 char(20);
+declare newf23 char(20);
+declare newf24 integer;
+declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 7, 1;
+declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 15, 1;
+declare continue handler for sqlstate '02000' set done = 1;
+open cur1;
+BEGIN
+set count = 10;
+BEGIN
+open cur2;
+while count > 0 do
+fetch cur1 into newf1, newf2, newf4, newf3;
+set count = count - 1;
+END while;
+END;
+insert into temp1 values(newf1, newf2, newf4, newf3);
+close cur1;
+END;
+BEGIN
+set count = 10;
+while count > 0 do
+fetch cur2 into newf21, newf22, newf24, newf23;
+set count = count - 1;
+END while;
+END;
+insert into temp2 values(newf21, newf22, newf24, newf23);
+close cur2;
+END//
+CALL sp1();
+SELECT count(*) from temp1;
+count(*)
+1
+SELECT * from temp2;
+f1 f2 f3 f4
+NULL NULL NULL NULL
+DROP PROCEDURE sp1;
+drop table temp1;
+drop table temp2;
+
+Section 3.1.3 - Syntax checks for the stored procedure-specific flow control statements
+. IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 4.3.1:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742(
+middleinitial CHAR, lastname VARCHAR(50),
+age_averylongfieldname_averylongname_1234569 INT, COMMENT VARCHAR(100))
+ENGINE=<engine_to_be_tested>;
+INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
+VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default');
+CREATE PROCEDURE sp1(a INT)
+BEGIN
+DECLARE itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx CHAR;
+DECLARE itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx VARCHAR(100);
+DECLARE itisjustamediumsizeintintegervariablename INTEGER;
+SET itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b';
+SET itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx
+= 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%';
+SET itisjustamediumsizeintintegervariablename = 5;
+SET @comment='a';
+label1: LOOP
+IF a > 100 THEN
+SET @comment = 'value of a is greater than 100';
+ELSEIF a < 100 THEN
+IF a < 50 THEN
+SET @comment = 'value of a is less than 50';
+ELSEIF a < 25 THEN
+SET @comment = 'value of a is less than 25';
+ELSE
+SET @comment = 'value of a is greater than 50 and less than 100';
+END IF;
+ELSE
+SET @comment = 'value of a is 100';
+END IF;
+IF itisjustamediumsizeintintegervariablename = 0 THEN LEAVE label1;
+END IF;
+INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
+VALUES(itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx,
+CONCAT(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx,
+' ', a), a, @comment);
+SET itisjustamediumsizeintintegervariablename
+= itisjustamediumsizeintintegervariablename - 1;
+ITERATE label1;
+END LOOP label1;
+END//
+CALL sp1(101);
+CALL sp1(100);
+CALL sp1(75);
+CALL sp1(40);
+CALL sp1(20);
+CALL sp1(-1);
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742
+ORDER BY middleinitial, lastname, age_averylongfieldname_averylongname_1234569;
+middleinitial lastname age_averylongfieldname_averylongname_1234569 COMMENT
+a aaaaaaaaaabbbbbbbbc 0 default
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
+b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE sp1;
+
+Testcase 4.3.2:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp2( action char(20) )
+BEGIN
+declare v1 char(20);
+declare v2 char(20);
+declare count integer;
+set v1 = 'f1';
+set v2 = 'address';
+set count = 1;
+case when action = 'delete' then
+insert into t3 values(v1, v2, count);
+delete from t3 where f1=v1;
+when action = 'insert' then
+repeat
+insert into t3 values(v1, v2, count);
+set count = count + 1;
+until count > 5
+END repeat;
+set count = 1;
+label1: repeat
+insert into t3 values(v1, v2, count);
+if count > 5 then leave label1;
+END if;
+set count = count + 1;
+until count > 5
+END repeat;
+set count = 1;
+while count < 5 do
+insert into t3 values(v1, v2, count);
+set count = count + 1;
+END while;
+set count = 1;
+label1: while count < 5 do
+insert into t3 values(v1, v2, count);
+if count > 5 then leave label1;
+END if;
+set count = count + 1;
+END while;
+else
+set @dummystring = 'temp value';
+END case;
+END//
+CALL sp2( 'insert' );
+SELECT * from t3 where f3 <=5 && f3 >= 0;
+f1 f2 f3
+f1 address 1
+f1 address 1
+f1 address 1
+f1 address 1
+f1 address 2
+f1 address 2
+f1 address 2
+f1 address 2
+f1 address 3
+f1 address 3
+f1 address 3
+f1 address 3
+f1 address 4
+f1 address 4
+f1 address 4
+f1 address 4
+f1 address 5
+f1 address 5
+SELECT count(*) from t3;
+count(*)
+28
+CALL sp2( 'delete' );
+SELECT count(*) from t3;
+count(*)
+10
+CALL sp2 ('test');
+SELECT @dummystring;
+@dummystring
+temp value
+DROP PROCEDURE sp2;
+
+Testcase 4.1.2:
+---------------
+Ensure that all sub-clauses that should not be supported are disallowed with
+an appropriate error message. (case)
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp3;
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742 (name char, address varchar(50), age_averylongfieldname_averylongname_1234569 smallint);
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+label1: case
+when action = 'delete' then
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+else
+set @dummystring = 'temp value';
+iterate label1;
+END case label1;
+END//
+ERROR 42000: 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 'case
+when action = 'delete' then
+delete from res_t3_itisalongname_1381742_it...' at line 3
+DROP PROCEDURE IF EXISTS sp3;
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+label1: BEGIN
+case
+action = 'delete' then
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+else
+set @dummystring = 'temp value';
+iterate label1;
+END case;
+END label1;
+END//
+ERROR 42000: 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 'then
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+else
+...' at line 5
+DROP PROCEDURE IF EXISTS sp3;
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+case
+when action = 'delete' then
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+then action = 'truncate' when
+truncate from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+else
+set @dummystring = 'temp value';
+iterate label1;
+END case;
+END//
+ERROR 42000: 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 'then action = 'truncate' when
+truncate from res_t3_itisalongname_1381742_its...' at line 6
+DROP PROCEDURE IF EXISTS sp3;
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+declare v1 char(20);
+declare v2 char(20);
+declare count integer;
+set v1 = 'f1';
+set v2= 'address';
+set count = 1;
+case action
+when 'delete' then
+when 'delete' then
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+END case;
+END//
+ERROR 42000: 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 'when 'delete' then
+delete from res_t3_itisalongname_1381742_itsaverylongname...' at line 11
+DROP PROCEDURE IF EXISTS sp3;
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+declare count int default 1;
+declare done int default 0;
+declare continue handler for sqlstate 'HY000' set done=1;
+label1: loop
+case
+when action = 'delete' then
+label3:BEGIN
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+END label3;
+when action = 'insert' then
+label2: while count < 10 do
+BEGIN
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742
+values('xxxxxxxxxxxxxxxxxxx', '1231230981(*&(*&)(*&(', count);
+set count = count + 1;
+if count= 10 then
+set done=1;
+END if;
+END;
+END while label2;
+else
+set @dummystring = 'temp value';
+iterate label1;
+END case;
+if done=1 then
+leave label1;
+END if;
+END loop label1;
+SELECT count, done;
+END//
+CALL sp3('insert');
+count done
+10 1
+Warnings:
+Warning 1265 Data truncated for column 'name' at row 1
+DROP PROCEDURE sp3;
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 4.3.4:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4()
+BEGIN
+declare count int;
+set count = 1;
+label1: loop
+if count > 10 then leave label1;
+else
+set count = count + 1;
+elseif count > 20 then
+leave label1;
+END if;
+iterate label1;
+END loop label1;
+END//
+ERROR 42000: 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 'elseif count > 20 then
+leave label1;
+END if;
+iterate label1;
+END loop label1;...' at line 9
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4()
+BEGIN
+declare count int;
+set count = 1;
+label1: loop
+else
+set count = count + 1;
+if count > 20 then
+leave label1;
+END if;
+iterate label1;
+END loop label1;
+END//
+ERROR 42000: 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 'else
+set count = count + 1;
+if count > 20 then
+leave label1;
+END if;
+iterate ...' at line 6
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4()
+BEGIN
+declare count int;
+set count = 1;
+label1: loop
+elseif count > 20 then
+leave label1;
+else
+set count=count+1;
+END if;
+iterate label1;
+END loop label1;
+END//
+ERROR 42000: 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 'elseif count > 20 then
+leave label1;
+else
+set count=count+1;
+END if;
+iterate ...' at line 6
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4()
+BEGIN
+declare count int;
+set count = 1;
+label1: loop
+END if;
+if count > 20 then
+leave label1;
+else
+set count=count+1;
+iterate label1;
+END loop label1;
+END//
+ERROR 42000: 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 'END if;
+if count > 20 then
+leave label1;
+else
+set count=count+1;
+iterate labe...' at line 6
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4()
+BEGIN
+declare i int default 10;
+if i > 20 then
+set i=25;
+END if
+declare count int;
+set count = 1;
+label1: loop
+if count > 20 then
+leave label1;
+else
+set count=count+1;
+iterate label1;
+END loop label1;
+END//
+ERROR 42000: 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 'declare count int;
+set count = 1;
+label1: loop
+if count > 20 then
+leave label...' at line 7
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4()
+BEGIN
+declare idummy int default 10;
+declare count int;
+set count = 1;
+label1: loop
+BEGIN
+if count < 20 then
+BEGIN
+declare idummy2 int default 10;
+set count=count+1;
+END;
+else
+BEGIN
+SELECT idummy2;
+leave label1;
+END;
+END if;
+iterate label1;
+END;
+END loop label1;
+END//
+CALL sp4();
+ERROR 42S22: Unknown column 'idummy2' in 'field list'
+DROP PROCEDURE sp4;
+
+Testcase 4.3.5:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp5;
+CREATE PROCEDURE sp5()
+BEGIN
+declare count integer default 1;
+set count = 1;
+case
+else
+set count = 10;
+when count = 1 then
+set count = count + 1;
+END case;
+END//
+ERROR 42000: 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 'else
+set count = 10;
+when count = 1 then
+set count = count + 1;
+END case;
+END' at line 6
+DROP PROCEDURE IF EXISTS sp5;
+CREATE PROCEDURE sp5(count int)
+BEGIN
+when case count = 1 then
+set count = 10;
+when count = 2 then
+set count = count + 1;
+END case;
+END//
+ERROR 42000: 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 'when case count = 1 then
+set count = 10;
+when count = 2 then
+set count = co...' at line 3
+DROP PROCEDURE IF EXISTS sp5;
+CREATE PROCEDURE sp5(count int)
+BEGIN
+END case;
+when count = 1 then
+set count = 10;
+when count = 2 then
+set count = count + 1;
+END case;
+END//
+ERROR 42000: 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 'case;
+when count = 1 then
+set count = 10;
+when count = 2 then
+set count = c...' at line 3
+DROP PROCEDURE IF EXISTS sp5;
+CREATE PROCEDURE sp5(count int)
+BEGIN
+when count = 1 then
+set count = 10;
+case when count = 2 then
+set count = count + 1;
+END case;
+END//
+ERROR 42000: 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 'when count = 1 then
+set count = 10;
+case when count = 2 then
+set count = co...' at line 3
+
+Testcase 4.3.6:
+---------------
+Ensure that all supported sub-clauses are supported only in the correct order (repeat).
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6()
+BEGIN
+declare count1 integer default 1;
+label1: repeat
+set count1 = count1 + 1;
+if count1 > 5 then leave label1; END if;
+END repeat;
+until count1 > 5
+END//
+ERROR 42000: 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 'END repeat;
+until count1 > 5
+END' at line 7
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6()
+BEGIN
+declare count1 integer default 1;
+label1: until count1 > 5
+repeat
+set count1 = count1 + 1;
+if count1 > 5 then leave label1; END if;
+END repeat;
+END//
+ERROR 42000: 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 'until count1 > 5
+repeat
+set count1 = count1 + 1;
+if count1 > 5 then leave lab...' at line 4
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6()
+BEGIN
+declare count1 integer default 1;
+label1: END repeat
+set count1 = count1 + 1;
+if count1 > 5 then leave label1; END if;
+until count1 > 5
+repeat;
+END//
+ERROR 42000: 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 'END repeat
+set count1 = count1 + 1;
+if count1 > 5 then leave label1; END if;
+...' at line 4
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6()
+BEGIN
+declare count1 integer default 1;
+label1: repeat
+set count1 = count1 + 1;
+if count1 > 5 then leave label1; END if;
+END repeat;
+END//
+ERROR 42000: 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 'END repeat;
+END' at line 7
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6()
+BEGIN
+declare count1 integer default 1;
+label1: repeat
+set count1 = count1 + 1;
+if count1 > 5 then leave label1; END if;
+until count1 > 10;
+SELECT count1;
+END repeat;
+END//
+ERROR 42000: 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 ';
+SELECT count1;
+END repeat;
+END' at line 7
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6()
+BEGIN
+declare count1 integer default 1;
+label1: repeat
+set count1 = count1-1;
+until count1 < 0
+END repeat label1;
+SELECT count1;
+END//
+CALL sp6();
+count1
+-1
+DROP PROCEDURE sp6;
+
+Testcase 4.3.7:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp7;
+CREATE PROCEDURE sp7()
+BEGIN
+DECLARE count INT DEFAULT 100;
+label1: loop
+set @dummystring = 'temp value';
+if count > 10 then leave label1;
+END if;
+label1 iterate;
+END label1 loop;
+END//
+ERROR 42000: 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 'iterate;
+END label1 loop;
+END' at line 8
+DROP PROCEDURE IF EXISTS sp7;
+CREATE PROCEDURE sp7()
+BEGIN
+label1: END loop;
+set @dummystring = 'temp value';
+if count > 10 then leave label1;
+END if;
+iterate label1;
+loop;
+END//
+ERROR 42000: 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 'END loop;
+set @dummystring = 'temp value';
+if count > 10 then leave label1;
+E...' at line 3
+DROP PROCEDURE IF EXISTS sp7;
+CREATE PROCEDURE sp7()
+BEGIN
+label1: iterate label1;
+loop
+set @dummystring = 'temp value';
+if count > 10 then leave label1;
+END if;
+END loop label1;
+END//
+ERROR 42000: 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 'iterate label1;
+loop
+set @dummystring = 'temp value';
+if count > 10 then leav...' at line 3
+
+Testcase 4.3.8:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp8;
+CREATE PROCEDURE sp8()
+BEGIN
+declare v1 int default 5;
+do while v1 > 0
+set v1 = v1 - 1;
+END while;
+END//
+ERROR 42000: 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 'while v1 > 0
+set v1 = v1 - 1;
+END while;
+END' at line 4
+DROP PROCEDURE IF EXISTS sp8;
+CREATE PROCEDURE sp8()
+BEGIN
+declare v1 int default 5;
+do v1 > 0 while
+set v1 = v1 - 1;
+END while;
+END//
+ERROR 42000: 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 'while
+set v1 = v1 - 1;
+END while;
+END' at line 4
+DROP PROCEDURE IF EXISTS sp8;
+CREATE PROCEDURE sp8()
+BEGIN
+declare v1 int default 5;
+END while;
+set v1 = v1 - 1;
+while v1 > 0 do;
+END//
+ERROR 42000: 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 'while;
+set v1 = v1 - 1;
+while v1 > 0 do;
+END' at line 4
+
+Testcase 4.3.12:
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp12;
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+CREATE PROCEDURE sp12( )
+BEGIN
+declare count1 integer default 1;
+declare count2 int;
+label1: loop
+if count1 > 2 then leave label1;
+END if;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+label2: loop
+if count2 > 2 then leave label2;
+END if;
+set count2 = count2 + 1;
+END loop label1;
+set count1 = count1 + 1;
+iterate label1;
+END loop label2;
+END//
+ERROR 42000: End-label label1 without match
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 4.3.13:
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp13;
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+CREATE PROCEDURE sp13( )
+BEGIN
+declare count1 integer default 1;
+lable1: loop
+if count1 > 2 then leave lable1;
+END if;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+set count1 = count1 + 1;
+iterate lable1;
+END loop;
+END//
+CALL sp13();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+xyz pqr 1
+xyz pqr 2
+DROP PROCEDURE sp13;
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 4.3.14:
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp14;
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+CREATE PROCEDURE sp14( )
+BEGIN
+declare count1 integer default 1;
+loop
+if count1 > 2 then leave lable1;
+END if;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+set count1 = count1 + 1;
+iterate lable1;
+END loop label1;
+END//
+ERROR 42000: LEAVE with no matching label: lable1
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Testcase 4.3.15:
+--------------------------------------------------------------------------------
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp15;
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+CREATE PROCEDURE sp15( )
+BEGIN
+declare count1 integer default 1;
+label1 loop
+if count1 > 2 then leave lable1;
+END if;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+set count1 = count1 + 1;
+iterate lable1;
+END loop label1;
+END//
+ERROR 42000: 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 'loop
+if count1 > 2 then leave lable1;
+END if;
+insert into res_t3_itisalongnam...' at line 4
+
+Testcase 4.3.16:
+----------------
+Ensure that every beginning label with the same scope must be unique.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp16;
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CREATE PROCEDURE sp16( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+label1: repeat
+set count1 = count1 + 1;
+set count2 = 1;
+label1: repeat
+set count2 = count2 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( xyz , pqr, count1);
+until count2 > 3
+END repeat label1;
+until count1 > 3
+END repeat label1;
+END//
+ERROR 42000: Redefining label label1
+DROP PROCEDURE IF EXISTS sp16;
+CREATE PROCEDURE sp16( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+declare count3 integer default 1;
+label1: repeat
+set count1 = count1 + 1;
+label1: repeat
+set count2 = count2 + 1;
+SELECT count2;
+until count2 > 3
+END repeat label1;
+SELECT count1;
+until count1 > 3
+END repeat label1;
+label1: repeat
+set count3 = count3 + 1;
+SELECT count3;
+until count3 > 3
+END repeat label1;
+END//
+ERROR 42000: Redefining label label1
+
+Testcase 4.3.17:
+--------------------------------------------------------------------------------
+
+Testcase 4.3.18:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp18;
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+CREATE PROCEDURE sp18( )
+BEGIN
+declare count1 integer default 1;
+label1: repeat
+set count1 = count1 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+until count1 < 3
+END repeat label2;
+END//
+ERROR 42000: End-label label2 without match
+
+Testcase 4.3.19:
+--------------------------------------------------------------------------------
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp19;
+CREATE PROCEDURE sp19( )
+BEGIN
+declare count1 integer default 1;
+label1: repeat
+set count1 = count1 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+until count1 < 3
+END repeat;
+END//
+CALL sp19();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+xyz pqr 2
+DROP PROCEDURE sp19;
+
+Testcase 4.3.20:
+--------------------------------------------------------------------------------
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp20;
+CREATE PROCEDURE sp20( )
+BEGIN
+declare count1 integer default 1;
+repeat
+set count1 = count1 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+until count1 < 3
+END repeat label1;
+END//
+ERROR 42000: 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 'label1;
+END' at line 8
+
+Testcase 4.3.21:
+--------------------------------------------------------------------------------
+
+Testcase 4.3.22:
+--------------------------------------------------------------------------------
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp22;
+CREATE PROCEDURE sp22( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+while count1 < 3 do
+set count1 = count1 + 1;
+set count2 = 1;
+label1: while count2 < 3 do
+set count2 = count2 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+END while label2;
+END while;
+END//
+ERROR 42000: End-label label2 without match
+
+Testcase 4.3.23:
+--------------------------------------------------------------------------------
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp23;
+CREATE PROCEDURE sp23( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+while count1 < 3 do
+set count1 = count1 + 1;
+set count2 = 1;
+while count2 < 3 do
+set count2 = count2 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+END while label1;
+END while;
+END//
+ERROR 42000: 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 'label1;
+END while;
+END' at line 11
+
+Testcase 4.3.25:
+--------------------------------------------------------------------------------
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp25;
+CREATE PROCEDURE sp25( )
+BEGIN
+declare count1 integer default 1;
+declare count2 integer default 1;
+while count1 < 3 do
+set count1 = count1 + 1;
+set count2 = 1;
+label1: while count2 < 3 do
+set count2 = count2 + 1;
+insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+END while;
+END while;
+END//
+CALL sp25 ();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+f1 f2 f3
+xyz pqr 2
+xyz pqr 2
+xyz pqr 3
+xyz pqr 3
+DROP PROCEDURE sp25;
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+Section 3.1.4 - Checks for the global nature of stored procedures:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 4.4.1:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+DROP DATABASE IF EXISTS d40401;
+CREATE PROCEDURE sp1 ( n char(20) )
+BEGIN
+SELECT n;
+END//
+CREATE DATABASE d40401;
+USE d40401;
+CALL db_storedproc.sp1('abcd');
+n
+abcd
+USE db_storedproc;
+DROP PROCEDURE sp1;
+DROP DATABASE d40401;
+
+Testcase 4.4.2:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+DROP FUNCTION IF EXISTS fn11;
+DROP DATABASE IF EXISTS d40402;
+CREATE FUNCTION fn1(n int) returns int
+BEGIN
+declare a int;
+set a = 9 * n;
+return a;
+END//
+CREATE DATABASE d40402;
+USE d40402;
+SELECT db_storedproc.fn1(100);
+db_storedproc.fn1(100)
+900
+SELECT db_storedproc.fn1(1000);
+db_storedproc.fn1(1000)
+9000
+CREATE FUNCTION db_storedproc.fn11(n int) returns int
+BEGIN
+declare a int;
+set a = 9 * n;
+return a;
+END//
+SELECT db_storedproc.fn11(100);
+db_storedproc.fn11(100)
+900
+SELECT db_storedproc.fn11(1000);
+db_storedproc.fn11(1000)
+9000
+USE db_storedproc;
+DROP FUNCTION fn1;
+DROP FUNCTION fn11;
+DROP DATABASE d40402;
+
+Testcase 4.4.3:
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS d1;
+DROP DATABASE IF EXISTS d2;
+CREATE DATABASE d1;
+CREATE DATABASE d2;
+USE d1;
+create table res_t41(a char(5), b char(10));
+insert into res_t41 values('abcde', 'a!@#$%^&*(');
+USE d2;
+create table res_t42(a char(5), b char(10));
+USE d1;
+CREATE PROCEDURE sp2(n char (20))
+BEGIN
+SELECT res_t41.a, res_t41.b into @a, @b from res_t41 where res_t41.b = n;
+insert into d2.res_t42 values (@a, @b);
+END//
+USE d2;
+CALL d1.sp2('a!@#$%^&*(');
+show warnings;
+Level Code Message
+SELECT * from d1.res_t41;
+a b
+abcde a!@#$%^&*(
+SELECT * from res_t42;
+a b
+abcde a!@#$%^&*(
+USE db_storedproc;
+DROP DATABASE d1;
+DROP DATABASE d2;
+
+Testcase 4.4.4:
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS d1;
+CREATE DATABASE d1;
+USE d1;
+CREATE PROCEDURE sp3()
+BEGIN
+USE d1;
+END//
+ERROR 0A000: USE is not allowed in stored procedures
+USE db_storedproc;
+DROP DATABASE d1;
+
+Testcase 4.4.5:
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS d1;
+CREATE DATABASE d1;
+USE d1;
+create table t43(a char(5), b char(10));
+insert into t43 values('abcde', 'a!@#$%^&*(');
+CREATE PROCEDURE d1.sp4()
+SELECT * from d1.t43;
+SELECT * from mysql.proc where specific_name = 'sp4';
+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 aggregate
+d1 sp4 PROCEDURE sp4 SQL CONTAINS_SQL NO DEFINER SELECT * from d1.t43 root@localhost modified created latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from d1.t43 NONE
+USE db_storedproc;
+DROP DATABASE d1;
+CREATE DATABASE d1;
+USE d1;
+create table t44(a char(5), b char(10));
+SELECT * from mysql.proc where specific_name = 'sp4';
+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 aggregate
+USE db_storedproc;
+DROP DATABASE d1;
+
+Testcase 4.4.6:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+DROP PROCEDURE IF EXISTS sp5;
+CREATE PROCEDURE sp5()
+SELECT * from db_storedproc.t4 limit 0, 10;
+SELECT db from mysql.proc where specific_name = 'sp5';
+db
+db_storedproc
+DROP PROCEDURE sp5;
+
+Testcase 4.4.7:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+drop table IF EXISTS t46;
+DROP PROCEDURE IF EXISTS sp6;
+create table t46(f1 char(20), f2 char(20));
+insert into t46 values ('abcd', 'wxyz');
+CREATE PROCEDURE db_storedproc.sp6()
+SELECT * from db_storedproc.t4 limit 0, 10;
+SELECT db from mysql.proc where specific_name = 'sp6';
+db
+db_storedproc
+drop table t46;
+DROP PROCEDURE sp6;
+
+Testcase 4.4.8:
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS d1;
+DROP DATABASE IF EXISTS d2;
+CREATE DATABASE d1;
+CREATE DATABASE d2;
+USE d1;
+CREATE PROCEDURE sp8 ( n char(20) ) sql security DEFINER comment 'initial'
+ SELECT * from t1 where t1.f1 = n;
+USE d2;
+alter procedure d1.sp8 sql security DEFINER comment 'updated';
+SELECT * from mysql.proc where specific_name='sp8' and db='d1';
+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 aggregate
+d1 sp8 PROCEDURE sp8 SQL CONTAINS_SQL NO DEFINER n char(20) SELECT * from t1 where t1.f1 = n root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 where t1.f1 = n NONE
+
+Testcase 4.4.9:
+--------------------------------------------------------------------------------
+USE d1;
+DROP FUNCTION IF EXISTS fn1;
+DROP FUNCTION IF EXISTS fn11;
+CREATE FUNCTION d1.fn2(n int) returns int sql security invoker comment 'initial'
+BEGIN
+declare a int;
+set a = 0.9 * n;
+return a;
+END//
+USE d2;
+alter function d1.fn2 sql security DEFINER comment 'updated';
+SELECT * from mysql.proc where specific_name='fn2' and db='d1';
+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 aggregate
+d1 fn2 FUNCTION fn2 SQL CONTAINS_SQL NO DEFINER n int int(11) BEGIN
+declare a int;
+set a = 0.9 * n;
+return a;
+END root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci BEGIN
+declare a int;
+set a = 0.9 * n;
+return a;
+END NONE
+
+Testcase 4.4.10:
+--------------------------------------------------------------------------------
+USE d1;
+CREATE PROCEDURE sp9 ( n char(20) )
+SELECT * from t1 where t1.f1 = n;
+USE d2;
+DROP PROCEDURE d1.sp9;
+SELECT * from mysql.proc where specific_name='sp9' and db='d1';
+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 aggregate
+
+Testcase 4.4.11:
+--------------------------------------------------------------------------------
+USE d1;
+CREATE FUNCTION d1.fn3(n int) returns int
+BEGIN
+declare a int;
+set a = 0.9 * n;
+return a;
+END//
+USE d2;
+DROP FUNCTION d1.fn3;
+SELECT * from mysql.proc where specific_name='fn3' and db='d1';
+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 aggregate
+USE db_storedproc;
+DROP DATABASE d1;
+DROP DATABASE d2;
+
+Section 3.1.5 - Parameter use checks:
+Functions with all data types
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS d1;
+CREATE DATABASE d1;
+USE d1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1( f1 bigint) returns bigint
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn1(-9.22e+18);
+fn1(-9.22e+18)
+-9220000000000000000
+DROP FUNCTION IF EXISTS fn2;
+CREATE FUNCTION fn2( f1 bigint unsigned) returns bigint unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn2(1.84e+19);
+fn2(1.84e+19)
+18400000000000000000
+DROP FUNCTION IF EXISTS fn3;
+CREATE FUNCTION fn3( f1 bigint unsigned zerofill) returns bigint unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn3(1.84e+17);
+fn3(1.84e+17)
+184000000000000000
+DROP FUNCTION IF EXISTS fn4;
+CREATE FUNCTION fn4( f1 bigint zerofill) returns bigint zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn4(-9.22e+15);
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP FUNCTION IF EXISTS fn5;
+CREATE FUNCTION fn5( f1 decimal) returns decimal
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn5(-1.00e+09);
+fn5(-1.00e+09)
+-1000000000
+DROP FUNCTION IF EXISTS fn6;
+CREATE FUNCTION fn6( f1 decimal (0)) returns decimal (0)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn6(-1.00e+09);
+fn6(-1.00e+09)
+-1000000000
+DROP FUNCTION IF EXISTS fn7;
+CREATE FUNCTION fn7( f1 decimal (0) unsigned) returns decimal (0) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn7(99999999999);
+fn7(99999999999)
+9999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn8;
+CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn8(999999999);
+fn8(999999999)
+1000000000
+DROP FUNCTION IF EXISTS fn9;
+CREATE FUNCTION fn9( f1 decimal (0) zerofill) returns decimal (0) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn9(-1.00e+09);
+fn9(-1.00e+09)
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn10;
+CREATE FUNCTION fn10( f1 decimal (0, 0)) returns decimal (0, 0)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn10(-1.00e+09);
+fn10(-1.00e+09)
+-1000000000
+DROP FUNCTION IF EXISTS fn11;
+CREATE FUNCTION fn11( f1 decimal (0, 0) unsigned) returns decimal (0, 0) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn11(99999999999);
+fn11(99999999999)
+9999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn12;
+CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn12(999999999);
+fn12(999999999)
+1000000000
+DROP FUNCTION IF EXISTS fn13;
+CREATE FUNCTION fn13( f1 decimal (0, 0) zerofill) returns decimal (0, 0) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn13(-1.00e+09);
+fn13(-1.00e+09)
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn14;
+CREATE FUNCTION fn14( f1 decimal (63, 30)) returns decimal (63, 30)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn14(-1.00e+21);
+fn14(-1.00e+21)
+-1000000000000000000000.000000000000000000000000000000
+DROP FUNCTION IF EXISTS fn15;
+CREATE FUNCTION fn15( f1 decimal (63, 30) unsigned) returns decimal (63, 30) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn15(1.00e+16);
+fn15(1.00e+16)
+10000000000000000.000000000000000000000000000000
+DROP FUNCTION IF EXISTS fn16;
+CREATE FUNCTION fn16( f1 decimal (63, 30) unsigned zerofill) returns decimal (63, 30) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn16(1.00e+16);
+fn16(1.00e+16)
+000000000000000010000000000000000.000000000000000000000000000000
+DROP FUNCTION IF EXISTS fn17;
+CREATE FUNCTION fn17( f1 decimal (63, 30) zerofill) returns decimal (63, 30) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn17(-1.00e+21);
+fn17(-1.00e+21)
+000000000000000000000000000000010.000000000000000000000000000000
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn18_d;
+CREATE FUNCTION fn18_d( f1 decimal (64)) returns decimal (64)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn18_d( -1000000000000000000000000000000 );
+fn18_d( -1000000000000000000000000000000 )
+-1000000000000000000000000000000
+DROP FUNCTION IF EXISTS fn19_du;
+CREATE FUNCTION fn19_du( f1 decimal (64) unsigned) returns decimal (64) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn19_du( 100000000000000000000 );
+fn19_du( 100000000000000000000 )
+100000000000000000000
+DROP FUNCTION IF EXISTS fn20_duz;
+CREATE FUNCTION fn20_duz( f1 decimal (64) unsigned zerofill) returns decimal (64) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn20_duz( 1000000000000000000000000 );
+fn20_duz( 1000000000000000000000000 )
+0000000000000000000000000000000000000001000000000000000000000000
+DROP FUNCTION IF EXISTS fn21_d_z;
+CREATE FUNCTION fn21_d_z( f1 decimal (64) zerofill) returns decimal (64) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn21_d_z(1.00e+00);
+fn21_d_z(1.00e+00)
+0000000000000000000000000000000000000000000000000000000000000010
+DROP FUNCTION IF EXISTS fn22;
+CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn22(1.00e+00);
+fn22(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn23;
+CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn23(1.00e+00);
+fn23(1.00e+00)
+0000000010
+DROP FUNCTION IF EXISTS fn24;
+CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn24(-1.00e+09);
+fn24(-1.00e+09)
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn25;
+CREATE FUNCTION fn25( f1 double) returns double
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn25(1.00e+00);
+fn25(1.00e+00)
+1
+DROP FUNCTION IF EXISTS fn26;
+CREATE FUNCTION fn26( f1 double unsigned) returns double unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn26(1.00e+00);
+fn26(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn27;
+CREATE FUNCTION fn27( f1 double unsigned zerofill) returns double unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn27(1.00e+00);
+fn27(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn28;
+CREATE FUNCTION fn28( f1 double zerofill) returns double zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn28(1.00e+00);
+fn28(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn29;
+CREATE FUNCTION fn29( f1 float) returns float
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn29(1.00e+00);
+fn29(1.00e+00)
+1
+DROP FUNCTION IF EXISTS fn30;
+CREATE FUNCTION fn30( f1 float unsigned) returns float unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn30(1.00e+00);
+fn30(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn31;
+CREATE FUNCTION fn31( f1 float unsigned zerofill) returns float unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn31(1.00e+00);
+fn31(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn32;
+CREATE FUNCTION fn32( f1 float zerofill) returns float zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn32(1.00e+00);
+fn32(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn33;
+CREATE FUNCTION fn33( f1 float(0)) returns float(0)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn33(1.00e+00);
+fn33(1.00e+00)
+1
+DROP FUNCTION IF EXISTS fn34;
+CREATE FUNCTION fn34( f1 float(0) unsigned) returns float(0) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn34(1.00e+00);
+fn34(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn35;
+CREATE FUNCTION fn35( f1 float(0) unsigned zerofill) returns float(0) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn35(1.00e+00);
+fn35(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn36;
+CREATE FUNCTION fn36( f1 float(0) zerofill) returns float(0) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn36(1.00e+00);
+fn36(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn37;
+CREATE FUNCTION fn37( f1 float(23)) returns float(23)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn37(1.00e+00);
+fn37(1.00e+00)
+1
+DROP FUNCTION IF EXISTS fn38;
+CREATE FUNCTION fn38( f1 float(23) unsigned) returns float(23) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn38(1.00e+00);
+fn38(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn39;
+CREATE FUNCTION fn39( f1 float(23) unsigned zerofill) returns float(23) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn39(1.00e+00);
+fn39(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn40;
+CREATE FUNCTION fn40( f1 float(23) zerofill) returns float(23) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn40(1.00e+00);
+fn40(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn41;
+CREATE FUNCTION fn41( f1 float(24)) returns float(24)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn41(1.00e+00);
+fn41(1.00e+00)
+1
+DROP FUNCTION IF EXISTS fn42;
+CREATE FUNCTION fn42( f1 float(24) unsigned) returns float(24) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn42(1.00e+00);
+fn42(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn43;
+CREATE FUNCTION fn43( f1 float(24) unsigned zerofill) returns float(24) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn43(1.00e+00);
+fn43(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn44;
+CREATE FUNCTION fn44( f1 float(24) zerofill) returns float(24) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn44(1.00e+00);
+fn44(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn45;
+CREATE FUNCTION fn45( f1 float(53)) returns float(53)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn45(1.00e+00);
+fn45(1.00e+00)
+1
+DROP FUNCTION IF EXISTS fn46;
+CREATE FUNCTION fn46( f1 float(53) unsigned) returns float(53) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn46(1.00e+00);
+fn46(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn47;
+CREATE FUNCTION fn47( f1 float(53) unsigned zerofill) returns float(53) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn47(1.00e+00);
+fn47(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn48;
+CREATE FUNCTION fn48( f1 float(53) zerofill) returns float(53) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn48(1.00e+00);
+fn48(1.00e+00)
+10
+DROP FUNCTION IF EXISTS fn49;
+CREATE FUNCTION fn49( f1 int) returns int
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn49(-2.15e+09);
+fn49(-2.15e+09)
+-2147483638
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn50;
+CREATE FUNCTION fn50( f1 int unsigned) returns int unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn50(4.29e+09);
+fn50(4.29e+09)
+4290000000
+DROP FUNCTION IF EXISTS fn51;
+CREATE FUNCTION fn51( f1 int unsigned zerofill) returns int unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn51(4.29e+09);
+fn51(4.29e+09)
+4290000000
+DROP FUNCTION IF EXISTS fn52;
+CREATE FUNCTION fn52( f1 int zerofill) returns int zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn52(2.15e+08);
+fn52(2.15e+08)
+215000000
+DROP FUNCTION IF EXISTS fn53;
+CREATE FUNCTION fn53( f1 mediumint) returns mediumint
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn53(-8388600);
+fn53(-8388600)
+-8388598
+DROP FUNCTION IF EXISTS fn54;
+CREATE FUNCTION fn54( f1 mediumint unsigned) returns mediumint unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn54(16777201);
+fn54(16777201)
+16777202
+DROP FUNCTION IF EXISTS fn55;
+CREATE FUNCTION fn55( f1 mediumint unsigned zerofill) returns mediumint unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn55(16777210);
+fn55(16777210)
+16777210
+DROP FUNCTION IF EXISTS fn56;
+CREATE FUNCTION fn56( f1 mediumint zerofill) returns mediumint zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn56(-8388601);
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP FUNCTION IF EXISTS fn57;
+CREATE FUNCTION fn57( f1 numeric) returns numeric
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn57(-999999999);
+fn57(-999999999)
+-1000000000
+DROP FUNCTION IF EXISTS fn58;
+CREATE FUNCTION fn58( f1 numeric (0)) returns numeric (0)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn58(-999999999);
+fn58(-999999999)
+-1000000000
+DROP FUNCTION IF EXISTS fn59;
+CREATE FUNCTION fn59( f1 numeric (0) unsigned) returns numeric (0) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn59(9999999999);
+fn59(9999999999)
+9999999999
+DROP FUNCTION IF EXISTS fn60;
+CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn60(99999999);
+fn60(99999999)
+0100000000
+DROP FUNCTION IF EXISTS fn61;
+CREATE FUNCTION fn61( f1 numeric (0) zerofill) returns numeric (0) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn61(-99999999);
+fn61(-99999999)
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn62;
+CREATE FUNCTION fn62( f1 numeric (0, 0)) returns numeric (0, 0)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn62(-999999999);
+fn62(-999999999)
+-1000000000
+DROP FUNCTION IF EXISTS fn63;
+CREATE FUNCTION fn63( f1 numeric (0, 0) unsigned) returns numeric (0, 0) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn63(9999999999);
+fn63(9999999999)
+9999999999
+DROP FUNCTION IF EXISTS fn64;
+CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn64(99999999);
+fn64(99999999)
+0100000000
+DROP FUNCTION IF EXISTS fn65;
+CREATE FUNCTION fn65( f1 numeric (0, 0) zerofill) returns numeric (0, 0) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn65(-99999999);
+fn65(-99999999)
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn66;
+CREATE FUNCTION fn66( f1 numeric (63, 30)) returns numeric (63, 30)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn66(-1e+36);
+fn66(-1e+36)
+-999999999999999999999999999999989.999999999999999999999999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn67;
+CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn67(1e+36);
+fn67(1e+36)
+999999999999999999999999999999999.999999999999999999999999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn68;
+CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn68(1e+36);
+fn68(1e+36)
+999999999999999999999999999999999.999999999999999999999999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn69;
+CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn69(-1e+36);
+fn69(-1e+36)
+000000000000000000000000000000010.000000000000000000000000000000
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn70_n;
+CREATE FUNCTION fn70_n( f1 numeric (64)) returns numeric (64)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn70_n( -1000000000000000000000000000000 );
+fn70_n( -1000000000000000000000000000000 )
+-1000000000000000000000000000000
+SELECT fn70_n( -10000000000000000000000000000000000000000 );
+fn70_n( -10000000000000000000000000000000000000000 )
+-10000000000000000000000000000000000000000
+DROP FUNCTION IF EXISTS fn71_nu;
+CREATE FUNCTION fn71_nu( f1 numeric (64) unsigned) returns numeric (64) unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn71_nu( 10000000000000000000000000000000000000000 );
+fn71_nu( 10000000000000000000000000000000000000000 )
+10000000000000000000000000000000000000000
+DROP FUNCTION IF EXISTS fn72_nuz;
+CREATE FUNCTION fn72_nuz( f1 numeric (64) unsigned zerofill) returns numeric (64) unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn72_nuz( 10000000000000000000000000000000000000000 );
+fn72_nuz( 10000000000000000000000000000000000000000 )
+0000000000000000000000010000000000000000000000000000000000000000
+DROP FUNCTION IF EXISTS fn73_n_z;
+CREATE FUNCTION fn73_n_z( f1 numeric (64) zerofill) returns numeric (64) zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn73_n_z( 10000000000000000000000000000000000000000 );
+fn73_n_z( 10000000000000000000000000000000000000000 )
+0000000000000000000000010000000000000000000000000000000000000000
+DROP FUNCTION IF EXISTS fn74;
+CREATE FUNCTION fn74( f1 numeric unsigned) returns numeric unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn74(999999999);
+fn74(999999999)
+1000000000
+DROP FUNCTION IF EXISTS fn75;
+CREATE FUNCTION fn75( f1 numeric unsigned zerofill) returns numeric unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn75(999999999);
+fn75(999999999)
+1000000000
+DROP FUNCTION IF EXISTS fn76;
+CREATE FUNCTION fn76( f1 numeric zerofill) returns numeric zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn76(-999999999);
+fn76(-999999999)
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DROP FUNCTION IF EXISTS fn77;
+CREATE FUNCTION fn77( f1 real) returns real
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn77(1.1);
+fn77(1.1)
+1.0999999999999996
+DROP FUNCTION IF EXISTS fn78;
+CREATE FUNCTION fn78( f1 real unsigned) returns real unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn78(1.1);
+fn78(1.1)
+10
+DROP FUNCTION IF EXISTS fn79;
+CREATE FUNCTION fn79( f1 real unsigned zerofill) returns real unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn79(1.1);
+fn79(1.1)
+10
+DROP FUNCTION IF EXISTS fn80;
+CREATE FUNCTION fn80( f1 real zerofill) returns real zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn80(1.1);
+fn80(1.1)
+10
+DROP FUNCTION IF EXISTS fn81;
+CREATE FUNCTION fn81( f1 smallint) returns smallint
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn81(-32701);
+fn81(-32701)
+-32702
+DROP FUNCTION IF EXISTS fn82;
+CREATE FUNCTION fn82( f1 smallint unsigned) returns smallint unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn82(65531);
+fn82(65531)
+65532
+DROP FUNCTION IF EXISTS fn83;
+CREATE FUNCTION fn83( f1 smallint unsigned zerofill) returns smallint unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn83(65531);
+fn83(65531)
+65532
+DROP FUNCTION IF EXISTS fn84;
+CREATE FUNCTION fn84( f1 smallint zerofill) returns smallint zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn84(-32601);
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP FUNCTION IF EXISTS fn85;
+CREATE FUNCTION fn85( f1 tinyint) returns tinyint
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn85(-115);
+fn85(-115)
+-116
+DROP FUNCTION IF EXISTS fn86;
+CREATE FUNCTION fn86( f1 tinyint unsigned) returns tinyint unsigned
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn86(251);
+fn86(251)
+252
+DROP FUNCTION IF EXISTS fn87;
+CREATE FUNCTION fn87( f1 tinyint unsigned zerofill) returns tinyint unsigned zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn87(201);
+fn87(201)
+202
+DROP FUNCTION IF EXISTS fn88;
+CREATE FUNCTION fn88( f1 tinyint zerofill) returns tinyint zerofill
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+END//
+SELECT fn88(-101);
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP FUNCTION IF EXISTS fn89;
+CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum')
+BEGIN
+IF f1 = '1enum' THEN
+SET f1 = '2enum';
+ELSE
+SET f1 = '1enum';
+END IF;
+RETURN f1;
+END//
+SELECT fn89( '1enum');
+fn89( '1enum')
+2enum
+DROP FUNCTION IF EXISTS fn90;
+CREATE FUNCTION fn90( f1 set('1set', '2set')) returns set('1set', '2set')
+BEGIN
+IF f1 = '1set' THEN
+SET f1 = '2set';
+ELSE
+SET f1 = '1set';
+END IF;
+RETURN f1;
+END//
+SELECT fn90( '1set');
+fn90( '1set')
+2set
+DROP FUNCTION IF EXISTS fn91;
+CREATE FUNCTION fn91( f1 date) returns date
+BEGIN
+set f1 = adddate(f1, interval 31 day);
+return f1;
+END//
+SELECT fn91('1997-12-31');
+fn91('1997-12-31')
+1998-01-31
+DROP FUNCTION IF EXISTS fn92;
+CREATE FUNCTION fn92( f1 time) returns time
+BEGIN
+set f1 = addtime(f1, '02:00:00.999998');
+return f1;
+END//
+SELECT fn92( '23:59:59.999999');
+fn92( '23:59:59.999999')
+25:59:59
+DROP FUNCTION IF EXISTS fn93;
+CREATE FUNCTION fn93( f1 datetime) returns datetime
+BEGIN
+set f1 = addtime(f1, '1 1:1:1.000002');
+return f1;
+END//
+SELECT fn93('1997-12-31 23:59:59.999999');
+fn93('1997-12-31 23:59:59.999999')
+1998-01-02 01:01:00
+DROP FUNCTION IF EXISTS fn94;
+CREATE FUNCTION fn94( f1 char) returns char
+BEGIN
+set f1 = concat('a', f1);
+return f1;
+END//
+SELECT fn94( 'h');
+fn94( 'h')
+a
+DROP FUNCTION IF EXISTS fn95;
+CREATE FUNCTION fn95( f1 char ascii) returns char ascii
+BEGIN
+set f1 = concat('a', f1);
+return f1;
+END//
+SELECT fn95('h');
+fn95('h')
+a
+DROP FUNCTION IF EXISTS fn96;
+CREATE FUNCTION fn96( f1 binary) returns binary(2)
+BEGIN
+set f1 = concat('a', f1);
+return f1;
+END//
+SELECT fn96( 'h');
+fn96( 'h')
+a
+DROP FUNCTION IF EXISTS fn97;
+CREATE FUNCTION fn97( f1 longtext) returns longtext
+BEGIN
+set f1 = concat('hello', f1);
+return f1;
+END//
+SELECT fn97( 'world');
+fn97( 'world')
+helloworld
+DROP FUNCTION IF EXISTS fn98;
+CREATE FUNCTION fn98( f1 mediumtext) returns mediumtext
+BEGIN
+set f1 = concat('hello', f1);
+return f1;
+END//
+SELECT fn98( 'world');
+fn98( 'world')
+helloworld
+DROP FUNCTION IF EXISTS fn99;
+CREATE FUNCTION fn99( f1 text) returns text
+BEGIN
+set f1 = concat('hello', f1);
+return f1;
+END//
+SELECT fn99( 'world');
+fn99( 'world')
+helloworld
+DROP FUNCTION IF EXISTS fn100;
+CREATE FUNCTION fn100( f1 tinytext) returns tinytext
+BEGIN
+set f1 = concat('hello', f1);
+return f1;
+END//
+SELECT fn100( 'world');
+fn100( 'world')
+helloworld
+DROP FUNCTION IF EXISTS fn101;
+CREATE FUNCTION fn101( f1 year) returns year
+BEGIN
+set f1 = f1 + 10;
+return f1;
+END//
+SELECT fn101(51);
+fn101(51)
+2061
+DROP FUNCTION IF EXISTS fn102;
+CREATE FUNCTION fn102( f1 year(4)) returns year(4)
+BEGIN
+set f1 = f1 + 51;
+return f1;
+END//
+SELECT fn102(1982);
+fn102(1982)
+2033
+DROP FUNCTION IF EXISTS fn103;
+CREATE FUNCTION fn103( f1 geometrycollection) returns geometrycollection
+BEGIN
+set f1 = f1;
+return f1;
+END//
+SELECT fn103('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
+fn103('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\
+
+DROP FUNCTION IF EXISTS fn104;
+CREATE FUNCTION fn104( f1 linestring) returns linestring
+BEGIN
+set f1 = f1;
+return f1;
+END//
+SELECT fn104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@');
+fn104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@')
+
+DROP FUNCTION IF EXISTS fn105;
+CREATE FUNCTION fn105( f1 point) returns point
+BEGIN
+set f1 = f1;
+return f1;
+END//
+SELECT fn105('\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@');
+fn105('\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@')
+
+DROP FUNCTION IF EXISTS fn106;
+CREATE FUNCTION fn106( f1 polygon) returns polygon
+BEGIN
+set f1 = f1;
+return f1;
+END//
+SELECT fn106('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
+fn106('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\
+
+DROP FUNCTION IF EXISTS fn107;
+CREATE FUNCTION fn107( f1 timestamp) returns timestamp
+BEGIN
+set f1 = now();
+return f1;
+END//
+SELECT fn107(20050510080451);
+fn107(20050510080451)
+returned
+USE db_storedproc;
+DROP DATABASE d1;
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+USE db1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( f1 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp1(-9.22e+18);
+f1
+-9220000000000000000
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp2( f1 bigint unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp2(1.84e+19);
+f1
+18400000000000000000
+DROP PROCEDURE IF EXISTS sp3;
+CREATE PROCEDURE sp3( f1 bigint unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp3(1.84e+17);
+f1
+00184000000000000000
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4( f1 bigint zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp4(-9.22e+15);
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP PROCEDURE IF EXISTS sp5;
+CREATE PROCEDURE sp5( f1 decimal)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp5(-1.00e+09);
+f1
+-1000000000
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( f1 decimal (0))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp6(-1.00e+09);
+f1
+-1000000000
+DROP PROCEDURE IF EXISTS sp7;
+CREATE PROCEDURE sp7( f1 decimal (0) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp7(99999999999);
+f1
+9999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp8;
+CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp8(999999999);
+f1
+1000000000
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp9;
+CREATE PROCEDURE sp9( f1 decimal (0) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp9(-1.00e+09);
+f1
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp10;
+CREATE PROCEDURE sp10( f1 decimal (0, 0))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp10(-1.00e+09);
+f1
+-1000000000
+DROP PROCEDURE IF EXISTS sp11;
+CREATE PROCEDURE sp11( f1 decimal (0, 0) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp11(99999999999);
+f1
+9999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp12;
+CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp12(999999999);
+f1
+1000000000
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp13;
+CREATE PROCEDURE sp13( f1 decimal (0, 0) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp13(-1.00e+09);
+f1
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp14;
+CREATE PROCEDURE sp14( f1 decimal (63, 30))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp14(-1.00e+21);
+f1
+-1000000000000000000000.000000000000000000000000000000
+DROP PROCEDURE IF EXISTS sp15;
+CREATE PROCEDURE sp15( f1 decimal (63, 30) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp15(1.00e+16);
+f1
+10000000000000000.000000000000000000000000000000
+DROP PROCEDURE IF EXISTS sp16;
+CREATE PROCEDURE sp16( f1 decimal (63, 30) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp16(1.00e+16);
+f1
+000000000000000010000000000000000.000000000000000000000000000000
+DROP PROCEDURE IF EXISTS sp17;
+CREATE PROCEDURE sp17( f1 decimal (63, 30) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp17(-1.00e+21);
+f1
+000000000000000000000000000000010.000000000000000000000000000000
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp18_d;
+CREATE PROCEDURE sp18_d( f1 decimal (64))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp18_d(-1.00e+30);
+f1
+-1000000000000000000000000000000
+CALL sp18_d( -1000000000000000000000000000000 );
+f1
+-1000000000000000000000000000000
+DROP PROCEDURE IF EXISTS sp19_du;
+CREATE PROCEDURE sp19_du( f1 decimal (64) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp19_du(1.00e+20);
+f1
+100000000000000000000
+CALL sp19_du( 100000000000000000000 );
+f1
+100000000000000000000
+CALL sp19_du(1.00e+24);
+f1
+1000000000000000000000000
+CALL sp19_du( 1000000000000000000000000 );
+f1
+1000000000000000000000000
+DROP PROCEDURE IF EXISTS sp20_duz;
+CREATE PROCEDURE sp20_duz( f1 decimal (64) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp20_duz(1.00e+20);
+f1
+0000000000000000000000000000000000000000000100000000000000000000
+CALL sp20_duz( 100000000000000000000 );
+f1
+0000000000000000000000000000000000000000000100000000000000000000
+CALL sp20_duz(1.00e+24);
+f1
+0000000000000000000000000000000000000001000000000000000000000000
+CALL sp20_duz( 1000000000000000000000000 );
+f1
+0000000000000000000000000000000000000001000000000000000000000000
+DROP PROCEDURE IF EXISTS sp21;
+CREATE PROCEDURE sp21( f1 decimal (64) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp21(1.00e+00);
+f1
+0000000000000000000000000000000000000000000000000000000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp22;
+CREATE PROCEDURE sp22( f1 decimal unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp22(1.00e+00);
+f1
+10
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp23;
+CREATE PROCEDURE sp23( f1 decimal unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp23(1.00e+00);
+f1
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp24;
+CREATE PROCEDURE sp24( f1 decimal zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp24(-1.00e+09);
+f1
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp25;
+CREATE PROCEDURE sp25( f1 double)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp25(1.00e+00);
+f1
+1
+DROP PROCEDURE IF EXISTS sp26;
+CREATE PROCEDURE sp26( f1 double unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp26(1.00e+00);
+f1
+10
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp27;
+CREATE PROCEDURE sp27( f1 double unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp27(1.00e+00);
+f1
+0000000000000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp28;
+CREATE PROCEDURE sp28( f1 double zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp28(1.00e+00);
+f1
+0000000000000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp29;
+CREATE PROCEDURE sp29( f1 float)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp29(1.00e+00);
+f1
+1
+DROP PROCEDURE IF EXISTS sp30;
+CREATE PROCEDURE sp30( f1 float unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp30(1.00e+00);
+f1
+10
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp31;
+CREATE PROCEDURE sp31( f1 float unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp31(1.00e+00);
+f1
+000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp32;
+CREATE PROCEDURE sp32( f1 float zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp32(1.00e+00);
+f1
+000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp33;
+CREATE PROCEDURE sp33( f1 float(0))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp33(1.00e+00);
+f1
+1
+DROP PROCEDURE IF EXISTS sp34;
+CREATE PROCEDURE sp34( f1 float(0) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp34(1.00e+00);
+f1
+10
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp35;
+CREATE PROCEDURE sp35( f1 float(0) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp35(1.00e+00);
+f1
+000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp36;
+CREATE PROCEDURE sp36( f1 float(0) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp36(1.00e+00);
+f1
+000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp37;
+CREATE PROCEDURE sp37( f1 float(23))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp37(1.00e+00);
+f1
+1
+DROP PROCEDURE IF EXISTS sp38;
+CREATE PROCEDURE sp38( f1 float(23) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp38(1.00e+00);
+f1
+10
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp39;
+CREATE PROCEDURE sp39( f1 float(23) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp39(1.00e+00);
+f1
+000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp40;
+CREATE PROCEDURE sp40( f1 float(23) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp40(1.00e+00);
+f1
+000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp41;
+CREATE PROCEDURE sp41( f1 float(24))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp41(1.00e+00);
+f1
+1
+DROP PROCEDURE IF EXISTS sp42;
+CREATE PROCEDURE sp42( f1 float(24) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp42(1.00e+00);
+f1
+10
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp43;
+CREATE PROCEDURE sp43( f1 float(24) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp43(1.00e+00);
+f1
+000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp44;
+CREATE PROCEDURE sp44( f1 float(24) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp44(1.00e+00);
+f1
+000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp45;
+CREATE PROCEDURE sp45( f1 float(53))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp45(1.00e+00);
+f1
+1
+DROP PROCEDURE IF EXISTS sp46;
+CREATE PROCEDURE sp46( f1 float(53) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp46(1.00e+00);
+f1
+10
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp47;
+CREATE PROCEDURE sp47( f1 float(53) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp47(1.00e+00);
+f1
+0000000000000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp48;
+CREATE PROCEDURE sp48( f1 float(53) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp48(1.00e+00);
+f1
+0000000000000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp49;
+CREATE PROCEDURE sp49( f1 int)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp49(-2.15e+09);
+f1
+-2147483638
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp50;
+CREATE PROCEDURE sp50( f1 int unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp50(4.29e+09);
+f1
+4290000000
+DROP PROCEDURE IF EXISTS sp51;
+CREATE PROCEDURE sp51( f1 int unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp51(4.29e+09);
+f1
+4290000000
+DROP PROCEDURE IF EXISTS sp52;
+CREATE PROCEDURE sp52( f1 int zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp52(2.15e+08);
+f1
+0215000000
+DROP PROCEDURE IF EXISTS sp53;
+CREATE PROCEDURE sp53( f1 mediumint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp53(-8388600);
+f1
+-8388598
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp54;
+CREATE PROCEDURE sp54( f1 mediumint unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp54(16777201);
+f1
+16777202
+DROP PROCEDURE IF EXISTS sp55;
+CREATE PROCEDURE sp55( f1 mediumint unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp55(16777210);
+f1
+16777210
+DROP PROCEDURE IF EXISTS sp56;
+CREATE PROCEDURE sp56( f1 mediumint zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp56(-8388601);
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP PROCEDURE IF EXISTS sp57;
+CREATE PROCEDURE sp57( f1 numeric)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp57(-999999999);
+f1
+-1000000000
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp58;
+CREATE PROCEDURE sp58( f1 numeric (0))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp58(-999999999);
+f1
+-1000000000
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp59;
+CREATE PROCEDURE sp59( f1 numeric (0) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp59(9999999999);
+f1
+9999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp60;
+CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp60(99999999);
+f1
+0100000000
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp61;
+CREATE PROCEDURE sp61( f1 numeric (0) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp61(-99999999);
+f1
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp62;
+CREATE PROCEDURE sp62( f1 numeric (0, 0))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp62(-999999999);
+f1
+-1000000000
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp63;
+CREATE PROCEDURE sp63( f1 numeric (0, 0) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp63(9999999999);
+f1
+9999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp64;
+CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp64(99999999);
+f1
+0100000000
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp65;
+CREATE PROCEDURE sp65( f1 numeric (0, 0) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp65(-99999999);
+f1
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp66_n;
+CREATE PROCEDURE sp66_n( f1 numeric (63, 30))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp66_n(-1e+36);
+f1
+-999999999999999999999999999999989.999999999999999999999999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+CALL sp66_n( -1000000000000000000000000000000000000 );
+f1
+-999999999999999999999999999999989.999999999999999999999999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp67_nu;
+CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp67_nu(1e+36);
+f1
+999999999999999999999999999999999.999999999999999999999999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+CALL sp67_nu( 1000000000000000000000000000000000000 );
+f1
+999999999999999999999999999999999.999999999999999999999999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp68_nuz;
+CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp68_nuz(1e+36);
+f1
+999999999999999999999999999999999.999999999999999999999999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+CALL sp68_nuz( 1000000000000000000000000000000000000 );
+f1
+999999999999999999999999999999999.999999999999999999999999999999
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp69_n_z;
+CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp69_n_z(-1e+36);
+f1
+000000000000000000000000000000010.000000000000000000000000000000
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+CALL sp69_n_z( -1000000000000000000000000000000000000 );
+f1
+000000000000000000000000000000010.000000000000000000000000000000
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp70_n;
+CREATE PROCEDURE sp70_n( f1 numeric (64))
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp70_n(-1e+40);
+f1
+-10000000000000000000000000000000000000000
+CALL sp70_n( -10000000000000000000000000000000000000000 );
+f1
+-10000000000000000000000000000000000000000
+DROP PROCEDURE IF EXISTS sp71_nu;
+CREATE PROCEDURE sp71_nu( f1 numeric (64) unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp71_nu(1.00e+40);
+f1
+10000000000000000000000000000000000000000
+CALL sp71_nu( 10000000000000000000000000000000000000000 );
+f1
+10000000000000000000000000000000000000000
+DROP PROCEDURE IF EXISTS sp72_nuz;
+CREATE PROCEDURE sp72_nuz( f1 numeric (64) unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp72_nuz(1.00e+40);
+f1
+0000000000000000000000010000000000000000000000000000000000000000
+CALL sp72_nuz( 10000000000000000000000000000000000000000 );
+f1
+0000000000000000000000010000000000000000000000000000000000000000
+DROP PROCEDURE IF EXISTS sp73_n_z;
+CREATE PROCEDURE sp73_n_z( f1 numeric (64) zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp73_n_z(1.00e+40);
+f1
+0000000000000000000000010000000000000000000000000000000000000000
+CALL sp73_n_z( 10000000000000000000000000000000000000000 );
+f1
+0000000000000000000000010000000000000000000000000000000000000000
+DROP PROCEDURE IF EXISTS sp74;
+CREATE PROCEDURE sp74( f1 numeric unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp74(999999999);
+f1
+1000000000
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp75;
+CREATE PROCEDURE sp75( f1 numeric unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp75(999999999);
+f1
+1000000000
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp76;
+CREATE PROCEDURE sp76( f1 numeric zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp76(-999999999);
+f1
+0000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp77;
+CREATE PROCEDURE sp77( f1 real)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp77(1.1);
+f1
+1.0999999999999996
+DROP PROCEDURE IF EXISTS sp78;
+CREATE PROCEDURE sp78( f1 real unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp78(1.1);
+f1
+10
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp79;
+CREATE PROCEDURE sp79( f1 real unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp79(1.1);
+f1
+0000000000000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp80;
+CREATE PROCEDURE sp80( f1 real zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp80(1.1);
+f1
+0000000000000000000010
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp81;
+CREATE PROCEDURE sp81( f1 smallint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp81(-32701);
+f1
+-32702
+DROP PROCEDURE IF EXISTS sp82;
+CREATE PROCEDURE sp82( f1 smallint unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp82(65531);
+f1
+65532
+DROP PROCEDURE IF EXISTS sp83;
+CREATE PROCEDURE sp83( f1 smallint unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp83(65531);
+f1
+65532
+DROP PROCEDURE IF EXISTS sp84;
+CREATE PROCEDURE sp84( f1 smallint zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp84(-32601);
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP PROCEDURE IF EXISTS sp85;
+CREATE PROCEDURE sp85( f1 tinyint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp85(-115);
+f1
+-116
+DROP PROCEDURE IF EXISTS sp86;
+CREATE PROCEDURE sp86( f1 tinyint unsigned)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp86(251);
+f1
+252
+DROP PROCEDURE IF EXISTS sp87;
+CREATE PROCEDURE sp87( f1 tinyint unsigned zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp87(201);
+f1
+202
+DROP PROCEDURE IF EXISTS sp88;
+CREATE PROCEDURE sp88( f1 tinyint zerofill)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+SELECT f1;
+END//
+CALL sp88(-101);
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP PROCEDURE IF EXISTS sp89;
+CREATE PROCEDURE sp89( f1 enum('1enum', '2enum'))
+BEGIN
+IF f1 = '1enum' THEN set f1 = '2enum'; ELSE set f1 = '1enum'; END IF;
+END//
+CALL sp89( '1enum');
+DROP PROCEDURE IF EXISTS sp90;
+CREATE PROCEDURE sp90( f1 set('1set', '2set'))
+BEGIN
+IF f1 = '1set' THEN set f1 = '2set'; ELSE set f1 = '1set'; END IF;
+END//
+CALL sp90( '1set');
+DROP PROCEDURE IF EXISTS sp91;
+CREATE PROCEDURE sp91( f1 date)
+BEGIN
+set f1 = adddate(f1, interval 31 day);
+SELECT f1;
+END//
+CALL sp91( '1997-12-31');
+f1
+1998-01-31
+DROP PROCEDURE IF EXISTS sp92;
+CREATE PROCEDURE sp92( f1 time)
+BEGIN
+set f1 = addtime(f1, '02:00:00.999998');
+SELECT f1;
+END//
+CALL sp92( '23:59:59.999999');
+f1
+25:59:59
+DROP PROCEDURE IF EXISTS sp93;
+CREATE PROCEDURE sp93( f1 datetime)
+BEGIN
+set f1 = addtime(f1, '1 1:1:1.000002');
+SELECT f1;
+END//
+CALL sp93('1997-12-31 23:59:59.999999');
+f1
+1998-01-02 01:01:00
+DROP PROCEDURE IF EXISTS sp94;
+CREATE PROCEDURE sp94( f1 char)
+BEGIN
+set f1 = concat('a', f1);
+SELECT f1;
+END//
+CALL sp94( 'h');
+f1
+a
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp95;
+CREATE PROCEDURE sp95( f1 char ascii)
+BEGIN
+set f1 = concat('a', f1);
+SELECT f1;
+END//
+CALL sp95( 'h');
+f1
+a
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp96;
+CREATE PROCEDURE sp96( f1 char binary)
+BEGIN
+set f1 = concat('a', f1);
+SELECT f1;
+END//
+CALL sp96( 'h');
+f1
+a
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 0
+DROP PROCEDURE IF EXISTS sp97;
+CREATE PROCEDURE sp97( f1 longtext)
+BEGIN
+set f1 = concat('hello', f1);
+SELECT f1;
+END//
+CALL sp97( 'world');
+f1
+helloworld
+DROP PROCEDURE IF EXISTS sp98;
+CREATE PROCEDURE sp98( f1 mediumtext)
+BEGIN
+set f1 = concat('hello', f1);
+SELECT f1;
+END//
+CALL sp98( 'world');
+f1
+helloworld
+DROP PROCEDURE IF EXISTS sp99;
+CREATE PROCEDURE sp99( f1 text)
+BEGIN
+set f1 = concat('hello', f1);
+SELECT f1;
+END//
+CALL sp99( 'world');
+f1
+helloworld
+DROP PROCEDURE IF EXISTS sp100;
+CREATE PROCEDURE sp100( f1 tinytext)
+BEGIN
+set f1 = concat('hello', f1);
+SELECT f1;
+END//
+CALL sp100( 'world');
+f1
+helloworld
+DROP PROCEDURE IF EXISTS sp101;
+CREATE PROCEDURE sp101( f1 year)
+BEGIN
+set f1 = f1 + 10;
+SELECT f1;
+END//
+CALL sp101(51);
+f1
+2061
+DROP PROCEDURE IF EXISTS sp102;
+CREATE PROCEDURE sp102( f1 year(4))
+BEGIN
+set f1 = f1 + 51;
+SELECT f1;
+END//
+CALL sp102(1982);
+f1
+2033
+DROP PROCEDURE IF EXISTS sp103;
+CREATE PROCEDURE sp103( f1 geometrycollection)
+BEGIN
+set f1 = f1;
+SELECT f1;
+END//
+CALL sp103('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
+f1
+
+DROP PROCEDURE IF EXISTS sp104;
+CREATE PROCEDURE sp104( f1 linestring)
+BEGIN
+set f1 = f1;
+SELECT f1;
+END//
+CALL sp104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@');
+f1
+
+DROP PROCEDURE IF EXISTS sp105;
+CREATE PROCEDURE sp105( f1 point)
+BEGIN
+set f1 = f1;
+SELECT f1;
+END//
+CALL sp105('\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@');
+f1
+
+DROP PROCEDURE IF EXISTS sp106;
+CREATE PROCEDURE sp106( f1 polygon)
+BEGIN
+set f1 = f1;
+SELECT f1;
+END//
+CALL sp106('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
+f1
+
+DROP PROCEDURE IF EXISTS sp107;
+CREATE PROCEDURE sp107( f1 timestamp)
+BEGIN
+set f1 = now() + 0 + f1;
+SELECT f1;
+END//
+CALL sp107(2.00e+13);
+f1
+returned
+Warnings:
+returned 1265 Data truncated for column 'f1' at row 0
+USE db_storedproc;
+DROP DATABASE db1;
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+USE db1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1( in f1 year, inout f2 year, out f3 year, in f4 year,
+inout f5 year, out f6 year, in f7 year(4), inout f8 year(4),
+out f9 year(4), in f10 year(4), inout f11 year(4), out f12 year(4))
+BEGIN
+set f1 = f1 + 10; set f2 = f2 + 10; set f3 = f2 + 10;
+set f4 = f4 + 10; set f5 = f5 + 10; set f6 = f5 + 10;
+set f7 = f7 + 51; set f8 = f8 + 51; set f9 = f8 + 51;
+set f10 = f10 + 51; set f11 = f11 + 51; set f12 = f11 + 51;
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute01;
+CREATE PROCEDURE spexecute01()
+BEGIN
+declare var1 year;
+declare var2 year;
+declare var3 year;
+declare var4 year;
+declare var5 year(4);
+declare var6 year(4);
+declare var7 year(4);
+declare var8 year(4);
+set var1 = 51;
+set var3 = 51;
+set var5 = 1982;
+set var7 = 1982;
+CALL sp1(51, var1, var2, 51, var3, var4, 1982, var5, var6, 1982, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute01();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+2061 2061 2071 2061 2061 2071 2033 2033 2084 2033 2033 2084
+var1 var2 var3 var4 var5 var6 var7 var8
+2061 2071 2061 2071 2033 2084 2033 2084
+DROP PROCEDURE spexecute01;
+DROP PROCEDURE sp1;
+DROP PROCEDURE IF EXISTS sp2;
+CREATE PROCEDURE sp2( in f1 text, inout f2 text, out f3 text, in f4 text, inout f5 text,
+out f6 text, in f7 tinytext, inout f8 tinytext, out f9 tinytext,
+in f10 tinytext, inout f11 tinytext, out f12 tinytext)
+BEGIN
+set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
+set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute02;
+CREATE PROCEDURE spexecute02()
+BEGIN
+declare var1 text;
+declare var2 text;
+declare var3 text;
+declare var4 text;
+declare var5 tinytext;
+declare var6 tinytext;
+declare var7 tinytext;
+declare var8 tinytext;
+set var1 = 'world';
+set var3 = 'world';
+set var5 = 'world';
+set var7 = 'world';
+CALL sp2( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute02();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld
+var1 var2 var3 var4 var5 var6 var7 var8
+helloworld hellohelloworld helloworld hellohelloworld helloworld hellohelloworld helloworld hellohelloworld
+DROP PROCEDURE spexecute02;
+DROP PROCEDURE sp2;
+DROP PROCEDURE IF EXISTS sp3;
+CREATE PROCEDURE sp3( in f1 char, inout f2 char, out f3 char, in f4 char ascii,
+inout f5 char ascii, out f6 char ascii, in f7 longtext,
+inout f8 longtext, out f9 longtext, in f10 mediumtext,
+inout f11 mediumtext, out f12 mediumtext)
+BEGIN
+set f1 = concat('a', f1); set f2 = concat('a', f2); set f3 = concat('a', f1);
+set f4 = concat('a', f4); set f5 = concat('a', f5); set f6 = concat('a', f4);
+set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f9);
+set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute03;
+CREATE PROCEDURE spexecute03()
+BEGIN
+declare var1 char;
+declare var2 char;
+declare var3 char ascii;
+declare var4 char ascii;
+declare var5 longtext;
+declare var6 longtext;
+declare var7 mediumtext;
+declare var8 mediumtext;
+set var1 = 'h';
+set var3 = 'h';
+set var5 = 'world';
+set var7 = 'world';
+CALL sp3( 'h', var1, var2, 'h', var3, var4, 'world', var5, var6, 'world', var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute03();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+a a a a a a helloworld helloworld NULL helloworld helloworld hellohelloworld
+var1 var2 var3 var4 var5 var6 var7 var8
+a a a a helloworld NULL helloworld hellohelloworld
+DROP PROCEDURE spexecute03;
+DROP PROCEDURE sp3;
+DROP PROCEDURE IF EXISTS sp4;
+CREATE PROCEDURE sp4( in f1 bigint, inout f2 bigint, out f3 bigint,
+in f4 bigint, inout f5 bigint, out f6 bigint,
+in f7 bigint, inout f8 bigint, out f9 bigint,
+in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f3 = f2;
+set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
+set f6 = f5;
+set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
+set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8;
+set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
+set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11;
+set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
+set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute04;
+CREATE PROCEDURE spexecute04()
+BEGIN
+declare var1 bigint;
+declare var2 bigint;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -9.22e+18;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp4(-9.22e+18, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute04();
+ERROR 22003: BIGINT value is out of range in 'f1@0 * 2'
+DROP PROCEDURE spexecute04;
+DROP PROCEDURE sp4;
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6( in f1 timestamp, inout f2 timestamp, out f3 timestamp, in f4 timestamp, inout f5 timestamp, out f6 timestamp, in f7 timestamp, inout f8 timestamp, out f9 timestamp, in f10 timestamp, inout f11 timestamp, out f12 timestamp)
+BEGIN
+set f1 = now() + 0 + f1; set f2 = now() + 0 + f2; set f3 = now() + 0 + f1;
+set f4 = now() + 0 + f4; set f5 = now() + 0 + f5; set f6 = now() + 0 + f5;
+set f7 = now() + 0 + f7; set f8 = now() + 0 + f8; set f9 = now() + 0 + f8;
+set f10 = now() + 0 + f10; set f11 = now() + 0 + f11; set f12 = now() + 0 + f11;
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute06;
+CREATE PROCEDURE spexecute06()
+BEGIN
+declare var1 timestamp;
+declare var2 timestamp;
+declare var3 timestamp;
+declare var4 timestamp;
+declare var5 timestamp;
+declare var6 timestamp;
+declare var7 timestamp;
+declare var8 timestamp;
+set var1 = 2.00e+13;
+set var3 = 2.00e+13;
+set var5 = 2.00e+13;
+set var7 = 2.00e+13;
+CALL sp6(2.00e+13, var1, var2, 2.00e+13, var3, var4, 2.00e+13, var5, var6, 2.00e+13, var7, var8);
+END//
+CALL spexecute06();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+returned returned returned returned returned returned returned returned returned returned returned returned
+DROP PROCEDURE spexecute06;
+DROP PROCEDURE sp6;
+DROP PROCEDURE IF EXISTS sp07;
+CREATE PROCEDURE sp07( IN f1 BIGINT UNSIGNED,
+INOUT f2 BIGINT UNSIGNED,
+OUT f3 BIGINT UNSIGNED,
+IN f4 BIGINT,
+INOUT f5 BIGINT,
+OUT f6 BIGINT,
+IN f7 BIGINT,
+INOUT f8 BIGINT,
+OUT f9 BIGINT,
+IN f10 BIGINT,
+INOUT f11 BIGINT,
+OUT f12 BIGINT)
+BEGIN
+SELECT f1, f2, f3;
+SELECT f4, f5, f6;
+SELECT f7, f8, f9;
+SELECT f10, f11, f12;
+set f3 = f2;
+set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
+set f3 = (f3 * 2); set f3 = (f3 - 10); set f3 = (f3 + 10);
+set f6 = f5;
+set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
+set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8;
+set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
+set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11;
+set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
+set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3;
+SELECT f4, f5, f6;
+SELECT f7, f8, f9;
+SELECT f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute07;
+CREATE PROCEDURE spexecute07()
+BEGIN
+declare var1 bigint unsigned;
+declare var2 bigint unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.84e+19;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+SELECT var1, var2;
+SELECT var3, var4;
+SELECT var5, var6;
+SELECT var7, var8;
+CALL sp07( var1, var1, var2, var3, var3, var4,
+var5, var5, var6, var7, var7, var8 );
+SELECT var1, var2;
+SELECT var3, var4;
+SELECT var5, var6;
+SELECT var7, var8;
+END//
+CALL spexecute07();
+var1 var2
+18400000000000000000 NULL
+var3 var4
+-9220000000000000000 NULL
+var5 var6
+-9220000000000000000 NULL
+var7 var8
+-9220000000000000000 NULL
+f1 f2 f3
+18400000000000000000 18400000000000000000 NULL
+f4 f5 f6
+-9220000000000000000 -9220000000000000000 NULL
+f7 f8 f9
+-9220000000000000000 -9220000000000000000 NULL
+f10 f11 f12
+-9220000000000000000 -9220000000000000000 NULL
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 * 2'
+DROP PROCEDURE spexecute07;
+DROP PROCEDURE sp07;
+DROP PROCEDURE IF EXISTS sp8;
+CREATE PROCEDURE sp8( in f1 bigint unsigned zerofill,
+inout f2 bigint unsigned zerofill,
+out f3 bigint unsigned zerofill,
+in f4 bigint,
+inout f5 bigint,
+out f6 bigint,
+in f7 bigint,
+inout f8 bigint,
+out f9 bigint,
+in f10 bigint,
+inout f11 bigint,
+out f12 bigint)
+BEGIN
+set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
+set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5;
+set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
+set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8;
+set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
+set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11;
+set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
+set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute08;
+CREATE PROCEDURE spexecute08()
+BEGIN
+declare var1 bigint unsigned zerofill;
+declare var2 bigint unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.84e+17;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp8(1.84e+17, var1, var2, -9.22e+18, var3, var4,
+-9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute08();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute08;
+DROP PROCEDURE sp8;
+DROP PROCEDURE IF EXISTS sp9;
+CREATE PROCEDURE sp9( in f1 bigint zerofill,
+inout f2 bigint zerofill,
+out f3 bigint zerofill,
+in f4 bigint,
+inout f5 bigint,
+out f6 bigint,
+in f7 bigint,
+inout f8 bigint,
+out f9 bigint,
+in f10 bigint,
+inout f11 bigint,
+out f12 bigint)
+BEGIN
+set f3 = f2;
+set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
+set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5;
+set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
+set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8;
+set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
+set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11;
+set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
+set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute09;
+CREATE PROCEDURE spexecute09()
+BEGIN
+declare var1 bigint zerofill;
+declare var2 bigint zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -9.22e+15;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp9(-9.22e+15, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute09();
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP PROCEDURE spexecute09;
+DROP PROCEDURE sp9;
+DROP PROCEDURE IF EXISTS sp10;
+CREATE PROCEDURE sp10( in f1 decimal,
+inout f2 decimal,
+out f3 decimal,
+in f4 bigint,
+inout f5 bigint,
+out f6 bigint,
+in f7 bigint,
+inout f8 bigint,
+out f9 bigint,
+in f10 bigint,
+inout f11 bigint,
+out f12 bigint)
+BEGIN
+set f3 = f2;
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute10;
+CREATE PROCEDURE spexecute10()
+BEGIN
+declare var1 decimal;
+declare var2 decimal;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+09;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp10(-1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute10();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute10;
+DROP PROCEDURE sp10;
+DROP PROCEDURE IF EXISTS sp11;
+CREATE PROCEDURE sp11( in f1 decimal (0), inout f2 decimal (0), out f3 decimal (0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f3 = f2;
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute11;
+CREATE PROCEDURE spexecute11()
+BEGIN
+declare var1 decimal (0);
+declare var2 decimal (0);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = --1.00e+09;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp11(--1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute11();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute11;
+DROP PROCEDURE sp11;
+DROP PROCEDURE IF EXISTS sp12;
+CREATE PROCEDURE sp12( in f1 decimal (0) unsigned, inout f2 decimal (0) unsigned, out f3 decimal (0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f3 = f2;
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute12;
+CREATE PROCEDURE spexecute12()
+BEGIN
+declare var1 decimal (0) unsigned;
+declare var2 decimal (0) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 99999999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp12(99999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute12();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute12;
+DROP PROCEDURE sp12;
+DROP PROCEDURE IF EXISTS sp13;
+CREATE PROCEDURE sp13( in f1 decimal (0, 0) zerofill, inout f2 decimal (0, 0) zerofill, out f3 decimal (0, 0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f3 = f2;
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute13;
+CREATE PROCEDURE spexecute13()
+BEGIN
+declare var1 decimal (0, 0) zerofill;
+declare var2 decimal (0, 0) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+09;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp13(-1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute13();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute13;
+DROP PROCEDURE sp13;
+DROP PROCEDURE IF EXISTS sp14;
+CREATE PROCEDURE sp14( in f1 decimal (63, 30), inout f2 decimal (63, 30), out f3 decimal (63, 30), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f3 = f2;
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute14;
+CREATE PROCEDURE spexecute14()
+BEGIN
+declare var1 decimal (63, 30);
+declare var2 decimal (63, 30);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+21;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp14(-1.00e+21, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute14();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute14;
+DROP PROCEDURE sp14;
+DROP PROCEDURE IF EXISTS sp15;
+CREATE PROCEDURE sp15( in f1 double, inout f2 double, out f3 double, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute15;
+CREATE PROCEDURE spexecute15()
+BEGIN
+declare var1 double;
+declare var2 double;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp15(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute15();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute15;
+DROP PROCEDURE sp15;
+DROP PROCEDURE IF EXISTS sp16;
+CREATE PROCEDURE sp16( in f1 double zerofill, inout f2 double zerofill, out f3 double zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute16;
+CREATE PROCEDURE spexecute16()
+BEGIN
+declare var1 double zerofill;
+declare var2 double zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp16(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute16();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute16;
+DROP PROCEDURE sp16;
+DROP PROCEDURE IF EXISTS sp17;
+CREATE PROCEDURE sp17( in f1 double unsigned, inout f2 double unsigned, out f3 double unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute17;
+CREATE PROCEDURE spexecute17()
+BEGIN
+declare var1 double unsigned;
+declare var2 double unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp17(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute17();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute17;
+DROP PROCEDURE sp17;
+DROP PROCEDURE IF EXISTS sp18;
+CREATE PROCEDURE sp18( in f1 double unsigned zerofill, inout f2 double unsigned zerofill, out f3 double unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute18;
+CREATE PROCEDURE spexecute18()
+BEGIN
+declare var1 double unsigned zerofill;
+declare var2 double unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp18(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute18();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute18;
+DROP PROCEDURE sp18;
+DROP PROCEDURE IF EXISTS sp19;
+CREATE PROCEDURE sp19( in f1 float unsigned, inout f2 float unsigned, out f3 float unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute19;
+CREATE PROCEDURE spexecute19()
+BEGIN
+declare var1 float unsigned;
+declare var2 float unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp19(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute19();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute19;
+DROP PROCEDURE sp19;
+DROP PROCEDURE IF EXISTS sp20;
+CREATE PROCEDURE sp20( in f1 float unsigned zerofill, inout f2 float unsigned zerofill, out f3 float unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute20;
+CREATE PROCEDURE spexecute20()
+BEGIN
+declare var1 float unsigned zerofill;
+declare var2 float unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp20(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute20();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute20;
+DROP PROCEDURE sp20;
+DROP PROCEDURE IF EXISTS sp21;
+CREATE PROCEDURE sp21( in f1 float zerofill, inout f2 float zerofill, out f3 float zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute21;
+CREATE PROCEDURE spexecute21()
+BEGIN
+declare var1 float zerofill;
+declare var2 float zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp21(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute21();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute21;
+DROP PROCEDURE sp21;
+DROP PROCEDURE IF EXISTS sp22;
+CREATE PROCEDURE sp22( in f1 float(0), inout f2 float(0), out f3 float(0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute22;
+CREATE PROCEDURE spexecute22()
+BEGIN
+declare var1 float(0);
+declare var2 float(0);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp22(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute22();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute22;
+DROP PROCEDURE sp22;
+DROP PROCEDURE IF EXISTS sp23;
+CREATE PROCEDURE sp23( in f1 numeric, inout f2 numeric, out f3 numeric, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute23;
+CREATE PROCEDURE spexecute23()
+BEGIN
+declare var1 numeric;
+declare var2 numeric;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -999999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp23(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute23();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute23;
+DROP PROCEDURE sp23;
+DROP PROCEDURE IF EXISTS sp24;
+CREATE PROCEDURE sp24( in f1 real, inout f2 real, out f3 real, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute24;
+CREATE PROCEDURE spexecute24()
+BEGIN
+declare var1 real;
+declare var2 real;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.1;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp24(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute24();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute24;
+DROP PROCEDURE sp24;
+DROP PROCEDURE IF EXISTS sp25;
+CREATE PROCEDURE sp25( in f1 smallint, inout f2 smallint, out f3 smallint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute25;
+CREATE PROCEDURE spexecute25()
+BEGIN
+declare var1 smallint;
+declare var2 smallint;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -32701;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp25(-32701, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute25();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute25;
+DROP PROCEDURE sp25;
+DROP PROCEDURE IF EXISTS sp26;
+CREATE PROCEDURE sp26( in f1 date, inout f2 date, out f3 date, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = adddate(f1, interval 31 day); set f2 = adddate(f2, interval 31 day); set f3 = adddate(f2, interval 31 day);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute26;
+CREATE PROCEDURE spexecute26()
+BEGIN
+declare var1 date;
+declare var2 date;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = '1997-12-31';
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp26( '1997-12-31', var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute26();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute26;
+DROP PROCEDURE sp26;
+DROP PROCEDURE IF EXISTS sp27;
+CREATE PROCEDURE sp27( in f1 time, inout f2 time, out f3 time, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = addtime(f1, '02:00:00.999998'); set f2 = addtime(f2, '02:00:00.999998'); set f3 = addtime(f2, '02:00:00.999998');
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute27;
+CREATE PROCEDURE spexecute27()
+BEGIN
+declare var1 time;
+declare var2 time;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = '23:59:59.999999';
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp27( '23:59:59.999999', var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute27();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute27;
+DROP PROCEDURE sp27;
+DROP PROCEDURE IF EXISTS sp28;
+CREATE PROCEDURE sp28( in f1 datetime, inout f2 datetime, out f3 datetime, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = addtime(f1, '1 1:1:1.000002'); set f2 = addtime(f2, '1 1:1:1.000002'); set f3 = addtime(f1, '1 1:1:1.000002');
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute28;
+CREATE PROCEDURE spexecute28()
+BEGIN
+declare var1 datetime;
+declare var2 datetime;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = '1997-12-31 23:59:59.999999';
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp28('1997-12-31 23:59:59.999999', var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute28();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute28;
+DROP PROCEDURE sp28;
+DROP PROCEDURE IF EXISTS sp29;
+CREATE PROCEDURE sp29( in f1 float(0) unsigned, inout f2 float(0) unsigned, out f3 float(0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute29;
+CREATE PROCEDURE spexecute29()
+BEGIN
+declare var1 float(0) unsigned;
+declare var2 float(0) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp29(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute29();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute29;
+DROP PROCEDURE sp29;
+DROP PROCEDURE IF EXISTS sp30;
+CREATE PROCEDURE sp30( in f1 float(0) zerofill, inout f2 float(0) zerofill, out f3 float(0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute30;
+CREATE PROCEDURE spexecute30()
+BEGIN
+declare var1 float(0) zerofill;
+declare var2 float(0) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp30(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute30();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute30;
+DROP PROCEDURE sp30;
+DROP PROCEDURE IF EXISTS sp31;
+CREATE PROCEDURE sp31( in f1 float(23), inout f2 float(23), out f3 float(23), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute31;
+CREATE PROCEDURE spexecute31()
+BEGIN
+declare var1 float(23);
+declare var2 float(23);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp31(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute31();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute31;
+DROP PROCEDURE sp31;
+DROP PROCEDURE IF EXISTS sp32;
+CREATE PROCEDURE sp32( in f1 float(23) unsigned, inout f2 float(23) unsigned, out f3 float(23) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute32;
+CREATE PROCEDURE spexecute32()
+BEGIN
+declare var1 float(23) unsigned;
+declare var2 float(23) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp32(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute32();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute32;
+DROP PROCEDURE sp32;
+DROP PROCEDURE IF EXISTS sp33;
+CREATE PROCEDURE sp33( in f1 float(23) zerofill, inout f2 float(23) zerofill, out f3 float(23) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute33;
+CREATE PROCEDURE spexecute33()
+BEGIN
+declare var1 float(23) zerofill;
+declare var2 float(23) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp33(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute33();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute33;
+DROP PROCEDURE sp33;
+DROP PROCEDURE IF EXISTS sp34;
+CREATE PROCEDURE sp34( in f1 float(24), inout f2 float(24), out f3 float(24), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute34;
+CREATE PROCEDURE spexecute34()
+BEGIN
+declare var1 float(24);
+declare var2 float(24);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp34(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute34();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute34;
+DROP PROCEDURE sp34;
+DROP PROCEDURE IF EXISTS sp35;
+CREATE PROCEDURE sp35( in f1 float(24) unsigned, inout f2 float(24) unsigned, out f3 float(24) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute35;
+CREATE PROCEDURE spexecute35()
+BEGIN
+declare var1 float(24) unsigned;
+declare var2 float(24) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp35(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute35();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute35;
+DROP PROCEDURE sp35;
+DROP PROCEDURE IF EXISTS sp36;
+CREATE PROCEDURE sp36( in f1 float(24) zerofill, inout f2 float(24) zerofill, out f3 float(24) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute36;
+CREATE PROCEDURE spexecute36()
+BEGIN
+declare var1 float(24) zerofill;
+declare var2 float(24) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp36(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute36();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute36;
+DROP PROCEDURE sp36;
+DROP PROCEDURE IF EXISTS sp37;
+CREATE PROCEDURE sp37( in f1 float(53), inout f2 float(53), out f3 float(53), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute37;
+CREATE PROCEDURE spexecute37()
+BEGIN
+declare var1 float(53);
+declare var2 float(53);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp37(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute37();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute37;
+DROP PROCEDURE sp37;
+DROP PROCEDURE IF EXISTS sp38;
+CREATE PROCEDURE sp38( in f1 float(53) unsigned, inout f2 float(53) unsigned, out f3 float(53) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute38;
+CREATE PROCEDURE spexecute38()
+BEGIN
+declare var1 float(53) unsigned;
+declare var2 float(53) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp38(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute38();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute38;
+DROP PROCEDURE sp38;
+DROP PROCEDURE IF EXISTS sp39;
+CREATE PROCEDURE sp39( in f1 float(53) zerofill, inout f2 float(53) zerofill, out f3 float(53) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute39;
+CREATE PROCEDURE spexecute39()
+BEGIN
+declare var1 float(53) zerofill;
+declare var2 float(53) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp39(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute39();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute39;
+DROP PROCEDURE sp39;
+DROP PROCEDURE IF EXISTS sp40;
+CREATE PROCEDURE sp40( in f1 real unsigned, inout f2 real unsigned, out f3 real unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute40;
+CREATE PROCEDURE spexecute40()
+BEGIN
+declare var1 real unsigned;
+declare var2 real unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.1;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp40(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute40();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute40;
+DROP PROCEDURE sp40;
+DROP PROCEDURE IF EXISTS sp41;
+CREATE PROCEDURE sp41( in f1 real unsigned zerofill, inout f2 real unsigned zerofill, out f3 real unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute41;
+CREATE PROCEDURE spexecute41()
+BEGIN
+declare var1 real unsigned zerofill;
+declare var2 real unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.1;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp41(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute41();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute41;
+DROP PROCEDURE sp41;
+DROP PROCEDURE IF EXISTS sp42;
+CREATE PROCEDURE sp42( in f1 real zerofill, inout f2 real zerofill, out f3 real zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute42;
+CREATE PROCEDURE spexecute42()
+BEGIN
+declare var1 real zerofill;
+declare var2 real zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.1;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp42(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute42();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute42;
+DROP PROCEDURE sp42;
+DROP PROCEDURE IF EXISTS sp43;
+CREATE PROCEDURE sp43( in f1 numeric (0), inout f2 numeric (0), out f3 numeric (0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute43;
+CREATE PROCEDURE spexecute43()
+BEGIN
+declare var1 numeric (0);
+declare var2 numeric (0);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -999999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp43(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute43();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute43;
+DROP PROCEDURE sp43;
+DROP PROCEDURE IF EXISTS sp44;
+CREATE PROCEDURE sp44( in f1 numeric (0) unsigned, inout f2 numeric (0) unsigned, out f3 numeric (0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute44;
+CREATE PROCEDURE spexecute44()
+BEGIN
+declare var1 numeric (0) unsigned;
+declare var2 numeric (0) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 9999999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp44(9999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute44();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute44;
+DROP PROCEDURE sp44;
+DROP PROCEDURE IF EXISTS sp45;
+CREATE PROCEDURE sp45( in f1 numeric (0) zerofill, inout f2 numeric (0) zerofill, out f3 numeric (0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute45;
+CREATE PROCEDURE spexecute45()
+BEGIN
+declare var1 numeric (0) zerofill;
+declare var2 numeric (0) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -99999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp45(-99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute45();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute45;
+DROP PROCEDURE sp45;
+DROP PROCEDURE IF EXISTS sp46;
+CREATE PROCEDURE sp46( in f1 numeric (0, 0), inout f2 numeric (0, 0), out f3 numeric (0, 0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute46;
+CREATE PROCEDURE spexecute46()
+BEGIN
+declare var1 numeric (0, 0);
+declare var2 numeric (0, 0);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -999999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp46(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute46();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute46;
+DROP PROCEDURE sp46;
+DROP PROCEDURE IF EXISTS sp47;
+CREATE PROCEDURE sp47( in f1 numeric (0, 0) unsigned, inout f2 numeric (0, 0) unsigned, out f3 numeric (0, 0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute47;
+CREATE PROCEDURE spexecute47()
+BEGIN
+declare var1 numeric (0, 0) unsigned;
+declare var2 numeric (0, 0) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 9999999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp47(9999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute47();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute47;
+DROP PROCEDURE sp47;
+DROP PROCEDURE IF EXISTS sp48;
+CREATE PROCEDURE sp48( in f1 numeric (0, 0) zerofill, inout f2 numeric (0, 0) zerofill, out f3 numeric (0, 0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute48;
+CREATE PROCEDURE spexecute48()
+BEGIN
+declare var1 numeric (0, 0) zerofill;
+declare var2 numeric (0, 0) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -99999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp48(-99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute48();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute48;
+DROP PROCEDURE sp48;
+DROP PROCEDURE IF EXISTS sp49;
+CREATE PROCEDURE sp49( in f1 numeric unsigned, inout f2 numeric unsigned, out f3 numeric unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute49;
+CREATE PROCEDURE spexecute49()
+BEGIN
+declare var1 numeric unsigned;
+declare var2 numeric unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -999999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp49(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute49();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute49;
+DROP PROCEDURE sp49;
+DROP PROCEDURE IF EXISTS sp50;
+CREATE PROCEDURE sp50( in f1 numeric unsigned zerofill, inout f2 numeric unsigned zerofill, out f3 numeric unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute50;
+CREATE PROCEDURE spexecute50()
+BEGIN
+declare var1 numeric unsigned zerofill;
+declare var2 numeric unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 9999999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp50(9999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute50();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute50;
+DROP PROCEDURE sp50;
+DROP PROCEDURE IF EXISTS sp51;
+CREATE PROCEDURE sp51( in f1 numeric zerofill, inout f2 numeric zerofill, out f3 numeric zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute51;
+CREATE PROCEDURE spexecute51()
+BEGIN
+declare var1 numeric zerofill;
+declare var2 numeric zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -99999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp51(-99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute51();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute51;
+DROP PROCEDURE sp51;
+DROP PROCEDURE IF EXISTS sp52;
+CREATE PROCEDURE sp52( in f1 numeric (63, 30), inout f2 numeric (63, 30), out f3 numeric (63, 30), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute52;
+CREATE PROCEDURE spexecute52()
+BEGIN
+declare var1 numeric (63, 30);
+declare var2 numeric (63, 30);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp52(-1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute52();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute52;
+DROP PROCEDURE sp52;
+DROP PROCEDURE IF EXISTS sp53;
+CREATE PROCEDURE sp53( in f1 numeric (64), inout f2 numeric (64), out f3 numeric (64), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute53;
+CREATE PROCEDURE spexecute53()
+BEGIN
+declare var1 numeric (64);
+declare var2 numeric (64);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp53(-1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute53();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute53;
+DROP PROCEDURE sp53;
+DROP PROCEDURE IF EXISTS sp54;
+CREATE PROCEDURE sp54( in f1 numeric (64) unsigned, inout f2 numeric (64) unsigned, out f3 numeric (64) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute54;
+CREATE PROCEDURE spexecute54()
+BEGIN
+declare var1 numeric (64) unsigned;
+declare var2 numeric (64) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp54(1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute54();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute54;
+DROP PROCEDURE sp54;
+DROP PROCEDURE IF EXISTS sp55;
+CREATE PROCEDURE sp55( in f1 numeric (64) zerofill, inout f2 numeric (64) zerofill, out f3 numeric (64) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute55;
+CREATE PROCEDURE spexecute55()
+BEGIN
+declare var1 numeric (64) zerofill;
+declare var2 numeric (64) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp55(-1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute55();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute55;
+DROP PROCEDURE sp55;
+DROP PROCEDURE IF EXISTS sp56;
+CREATE PROCEDURE sp56( in f1 year, inout f2 year, out f3 year, in f4 year, inout f5 year, out f6 year, in f7 year, inout f8 year, out f9 year, in f10 year, inout f11 year, out f12 year)
+BEGIN
+set f1 = f1 + 10; set f2 = f2 + 10; set f3 = f2 + 10;
+set f4 = f4 + 10; set f5 = f5 + 10; set f6 = f5 + 10;
+set f7 = f7 + 10; set f8 = f8 + 10; set f9 = f8 + 10;
+set f10= f10+ 10; set f11 = f11 + 10; set f12 = f11 + 10;
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute56;
+CREATE PROCEDURE spexecute56()
+BEGIN
+declare var1 year;
+declare var2 year;
+declare var3 year;
+declare var4 year;
+declare var5 year;
+declare var6 year;
+declare var7 year;
+declare var8 year;
+set var1 = 51;
+set var3 = 51;
+set var5 = 51;
+set var7 = 51;
+CALL sp56(51, var1, var2, 51, var3, var4, 51, var5, var6, 51, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute56();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+2061 2061 2071 2061 2061 2071 2061 2061 2071 2061 2061 2071
+var1 var2 var3 var4 var5 var6 var7 var8
+2061 2071 2061 2071 2061 2071 2061 2071
+DROP PROCEDURE spexecute56;
+DROP PROCEDURE sp56;
+DROP PROCEDURE IF EXISTS sp57;
+CREATE PROCEDURE sp57( in f1 year(4), inout f2 year(4), out f3 year(4), in f4 year(4), inout f5 year(4), out f6 year(4), in f7 year(4), inout f8 year(4), out f9 year(4), in f10 year(4), inout f11 year(4), out f12 year(4))
+BEGIN
+set f1 = f1 + 51; set f2 = f2 + 51; set f3 = f2 + 51;
+set f4 = f4 + 51; set f5 = f5 + 51; set f6 = f5 + 51;
+set f7 = f7 + 51; set f8 = f8 + 51; set f9 = f8 + 51;
+set f10 = f10 + 51; set f11 = f11 + 51; set f12 = f11 + 51;
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute57;
+CREATE PROCEDURE spexecute57()
+BEGIN
+declare var1 year(4);
+declare var2 year(4);
+declare var3 year(4);
+declare var4 year(4);
+declare var5 year(4);
+declare var6 year(4);
+declare var7 year(4);
+declare var8 year(4);
+set var1 = 1982;
+set var3 = 1982;
+set var5 = 1982;
+set var7 = 1982;
+CALL sp57(1982, var1, var2, 1982, var3, var4, 1982, var5, var6, 1982, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute57();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+2033 2033 2084 2033 2033 2084 2033 2033 2084 2033 2033 2084
+var1 var2 var3 var4 var5 var6 var7 var8
+2033 2084 2033 2084 2033 2084 2033 2084
+DROP PROCEDURE spexecute57;
+DROP PROCEDURE sp57;
+DROP PROCEDURE IF EXISTS sp58;
+CREATE PROCEDURE sp58( in f1 text, inout f2 text, out f3 text, in f4 text, inout f5 text, out f6 text, in f7 text, inout f8 text, out f9 text, in f10 text, inout f11 text, out f12 text)
+BEGIN
+set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
+set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute58;
+CREATE PROCEDURE spexecute58()
+BEGIN
+declare var1 text;
+declare var2 text;
+declare var3 text;
+declare var4 text;
+declare var5 text;
+declare var6 text;
+declare var7 text;
+declare var8 text;
+set var1 = 'world';
+set var3 = 'world';
+set var5 = 'world';
+set var7 = 'world';
+CALL sp58( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute58();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld
+var1 var2 var3 var4 var5 var6 var7 var8
+helloworld hellohelloworld helloworld hellohelloworld helloworld hellohelloworld helloworld hellohelloworld
+DROP PROCEDURE spexecute58;
+DROP PROCEDURE sp58;
+DROP PROCEDURE IF EXISTS sp59;
+CREATE PROCEDURE sp59( in f1 tinytext, inout f2 tinytext, out f3 tinytext, in f4 tinytext, inout f5 tinytext, out f6 tinytext, in f7 tinytext, inout f8 tinytext, out f9 tinytext, in f10 tinytext, inout f11 tinytext, out f12 tinytext)
+BEGIN
+set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
+set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute59;
+CREATE PROCEDURE spexecute59()
+BEGIN
+declare var1 tinytext;
+declare var2 tinytext;
+declare var3 tinytext;
+declare var4 tinytext;
+declare var5 tinytext;
+declare var6 tinytext;
+declare var7 tinytext;
+declare var8 tinytext;
+set var1 = 'world';
+set var3 = 'world';
+set var5 = 'world';
+set var7 = 'world';
+CALL sp59( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute59();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld
+var1 var2 var3 var4 var5 var6 var7 var8
+helloworld hellohelloworld helloworld hellohelloworld helloworld hellohelloworld helloworld hellohelloworld
+DROP PROCEDURE spexecute59;
+DROP PROCEDURE sp59;
+DROP PROCEDURE IF EXISTS sp60;
+CREATE PROCEDURE sp60( in f1 char, inout f2 char, out f3 char, in f4 char, inout f5 char, out f6 char, in f7 char, inout f8 char, out f9 char, in f10 char, inout f11 char, out f12 char)
+BEGIN
+set f1 = concat('a', f1); set f2 = concat('a', f2); set f3 = concat('a', f1);
+set f4 = concat('a', f4); set f5 = concat('a', f5); set f6 = concat('a', f5);
+set f7 = concat('a', f7); set f8 = concat('a', f8); set f9 = concat('a', f8);
+set f10 = concat('a', f10); set f11 = concat('a', f11); set f12 = concat('a', f11);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute60;
+CREATE PROCEDURE spexecute60()
+BEGIN
+declare var1 char;
+declare var2 char;
+declare var3 char;
+declare var4 char;
+declare var5 char;
+declare var6 char;
+declare var7 char;
+declare var8 char;
+set var1 = 'h';
+set var3 = 'h';
+set var5 = 'h';
+set var7 = 'h';
+CALL sp60( 'h', var1, var2, 'h', var3, var4, 'h', var5, var6, 'h', var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute60();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+a a a a a a a a a a a a
+var1 var2 var3 var4 var5 var6 var7 var8
+a a a a a a a a
+DROP PROCEDURE spexecute60;
+DROP PROCEDURE sp60;
+DROP PROCEDURE IF EXISTS sp61;
+CREATE PROCEDURE sp61( in f1 char ascii, inout f2 char ascii, out f3 char ascii, in f4 char ascii, inout f5 char ascii, out f6 char ascii, in f7 char ascii, inout f8 char ascii, out f9 char ascii, in f10 char ascii, inout f11 char ascii, out f12 char ascii)
+BEGIN
+set f1 = concat('a', f1); set f2 = concat('a', f2); set f3 = concat('a', f2);
+set f4 = concat('a', f4); set f5 = concat('a', f5); set f6 = concat('a', f4);
+set f7 = concat('a', f7); set f8 = concat('a', f8); set f9 = concat('a', f9);
+set f10 = concat('a', f10); set f11 = concat('a', f11); set f12 = concat('a', f11);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute61;
+CREATE PROCEDURE spexecute61()
+BEGIN
+declare var1 char ascii;
+declare var2 char ascii;
+declare var3 char ascii;
+declare var4 char ascii;
+declare var5 char ascii;
+declare var6 char ascii;
+declare var7 char ascii;
+declare var8 char ascii;
+set var1 = 'h';
+set var3 = 'h';
+set var5 = 'h';
+set var7 = 'h';
+CALL sp61( 'h', var1, var2, 'h', var3, var4, 'h', var5, var6, 'h', var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute61();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+a a a a a a a a NULL a a a
+var1 var2 var3 var4 var5 var6 var7 var8
+a a a a a NULL a a
+DROP PROCEDURE spexecute61;
+DROP PROCEDURE sp61;
+DROP PROCEDURE IF EXISTS sp62;
+CREATE PROCEDURE sp62( in f1 longtext, inout f2 longtext, out f3 longtext, in f4 longtext, inout f5 longtext, out f6 longtext, in f7 longtext, inout f8 longtext, out f9 longtext, in f10 longtext, inout f11 longtext, out f12 longtext)
+BEGIN
+set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
+set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute62;
+CREATE PROCEDURE spexecute62()
+BEGIN
+declare var1 longtext;
+declare var2 longtext;
+declare var3 longtext;
+declare var4 longtext;
+declare var5 longtext;
+declare var6 longtext;
+declare var7 longtext;
+declare var8 longtext;
+set var1 = 'world';
+set var3 = 'world';
+set var5 = 'world';
+set var7 = 'world';
+CALL sp62( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute62();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld
+var1 var2 var3 var4 var5 var6 var7 var8
+helloworld hellohelloworld helloworld hellohelloworld helloworld hellohelloworld helloworld hellohelloworld
+DROP PROCEDURE spexecute62;
+DROP PROCEDURE sp62;
+DROP PROCEDURE IF EXISTS sp63;
+CREATE PROCEDURE sp63( in f1 mediumtext, inout f2 mediumtext, out f3 mediumtext, in f4 mediumtext, inout f5 mediumtext, out f6 mediumtext, in f7 mediumtext, inout f8 mediumtext, out f9 mediumtext, in f10 mediumtext, inout f11 mediumtext, out f12 mediumtext)
+BEGIN
+set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f3);
+set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute63;
+CREATE PROCEDURE spexecute63()
+BEGIN
+declare var1 mediumtext;
+declare var2 mediumtext;
+declare var3 mediumtext;
+declare var4 mediumtext;
+declare var5 mediumtext;
+declare var6 mediumtext;
+declare var7 mediumtext;
+declare var8 mediumtext;
+set var1 = 'world';
+set var3 = 'world';
+set var5 = 'world';
+set var7 = 'world';
+CALL sp63( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute63();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+helloworld helloworld NULL helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld helloworld helloworld hellohelloworld
+var1 var2 var3 var4 var5 var6 var7 var8
+helloworld NULL helloworld hellohelloworld helloworld hellohelloworld helloworld hellohelloworld
+DROP PROCEDURE spexecute63;
+DROP PROCEDURE sp63;
+DROP PROCEDURE IF EXISTS sp64;
+CREATE PROCEDURE sp64( in f1 decimal, inout f2 decimal, out f3 decimal, in f4 decimal, inout f5 decimal, out f6 decimal, in f7 decimal, inout f8 decimal, out f9 decimal, in f10 decimal, inout f11 decimal, out f12 decimal)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+set f4 = (f4 / 2); set f4 = (f4 * 2); set f4 = (f4 - 10); set f4 = (f4 + 10); set f5 = (f5 / 2); set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f5 / 2); set f6 = (f5 * 2); set f6 = (f5 - 10); set f6 = (f5 + 10);
+set f7 = (f7 / 2); set f7 = (f7 * 2); set f7 = (f7 - 10); set f7 = (f7 + 10); set f8 = (f8 / 2); set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f8 / 2); set f9 = (f8 * 2); set f9 = (f8 - 10); set f9 = (f8 + 10);
+set f10 = (f10 / 2); set f10 = (f10 * 2); set f10 = (f10 - 10); set f10 = (f10 + 10); set f11 = (f11 / 2); set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f11 / 2); set f12 = (f11 * 2); set f12 = (f11 - 10); set f12 = (f11 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute64;
+CREATE PROCEDURE spexecute64()
+BEGIN
+declare var1 decimal;
+declare var2 decimal;
+declare var3 decimal;
+declare var4 decimal;
+declare var5 decimal;
+declare var6 decimal;
+declare var7 decimal;
+declare var8 decimal;
+set var1 = --1.00e+09;
+set var3 = --1.00e+09;
+set var5 = --1.00e+09;
+set var7 = --1.00e+09;
+CALL sp64(--1.00e+09, var1, var2, --1.00e+09, var3, var4, --1.00e+09, var5, var6, --1.00e+09, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute64();
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010
+var1 var2 var3 var4 var5 var6 var7 var8
+1000000000 1000000010 1000000000 1000000010 1000000000 1000000010 1000000000 1000000010
+DROP PROCEDURE spexecute64;
+DROP PROCEDURE sp64;
+DROP PROCEDURE IF EXISTS sp65;
+CREATE PROCEDURE sp65( in f1 decimal (0, 0) unsigned zerofill, inout f2 decimal (0, 0) unsigned zerofill, out f3 decimal (0, 0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute65;
+CREATE PROCEDURE spexecute65()
+BEGIN
+declare var1 decimal (0, 0) unsigned zerofill;
+declare var2 decimal (0, 0) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 999999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp65(999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute65();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute65;
+DROP PROCEDURE sp65;
+DROP PROCEDURE IF EXISTS sp66;
+CREATE PROCEDURE sp66( in f1 decimal (63, 30) unsigned, inout f2 decimal (63, 30) unsigned, out f3 decimal (63, 30) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute66;
+CREATE PROCEDURE spexecute66()
+BEGIN
+declare var1 decimal (63, 30) unsigned;
+declare var2 decimal (63, 30) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+16;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp66(1.00e+16, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute66();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute66;
+DROP PROCEDURE sp66;
+DROP PROCEDURE IF EXISTS sp67;
+CREATE PROCEDURE sp67( in f1 decimal (63, 30) unsigned zerofill, inout f2 decimal (63, 30) unsigned zerofill, out f3 decimal (63, 30) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute67;
+CREATE PROCEDURE spexecute67()
+BEGIN
+declare var1 decimal (63, 30) unsigned zerofill;
+declare var2 decimal (63, 30) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+16;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp67(1.00e+16, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute67();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute67;
+DROP PROCEDURE sp67;
+DROP PROCEDURE IF EXISTS sp68;
+CREATE PROCEDURE sp68( in f1 decimal (63, 30) zerofill, inout f2 decimal (63, 30) zerofill, out f3 decimal (63, 30) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute68;
+CREATE PROCEDURE spexecute68()
+BEGIN
+declare var1 decimal (63, 30) zerofill;
+declare var2 decimal (63, 30) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+21;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp68(-1.00e+21, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute68();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute68;
+DROP PROCEDURE sp68;
+DROP PROCEDURE IF EXISTS sp69;
+CREATE PROCEDURE sp69( in f1 decimal (64), inout f2 decimal (64), out f3 decimal (64), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute69;
+CREATE PROCEDURE spexecute69()
+BEGIN
+declare var1 decimal (64);
+declare var2 decimal (64);
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp69(-1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute69();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute69;
+DROP PROCEDURE sp69;
+DROP PROCEDURE IF EXISTS sp70;
+CREATE PROCEDURE sp70( in f1 decimal (64) unsigned, inout f2 decimal (64) unsigned, out f3 decimal (64) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute70;
+CREATE PROCEDURE spexecute70()
+BEGIN
+declare var1 decimal (64) unsigned;
+declare var2 decimal (64) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp70(1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute70();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute70;
+DROP PROCEDURE sp70;
+DROP PROCEDURE IF EXISTS sp71;
+CREATE PROCEDURE sp71( in f1 decimal (64) unsigned zerofill, inout f2 decimal (64) unsigned zerofill, out f3 decimal (64) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute71;
+CREATE PROCEDURE spexecute71()
+BEGIN
+declare var1 decimal (64) unsigned zerofill;
+declare var2 decimal (64) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp71(1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute71();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute71;
+DROP PROCEDURE sp71;
+DROP PROCEDURE IF EXISTS sp72;
+CREATE PROCEDURE sp72( in f1 decimal (64) zerofill, inout f2 decimal (64) zerofill, out f3 decimal (64) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute72;
+CREATE PROCEDURE spexecute72()
+BEGIN
+declare var1 decimal (64) zerofill;
+declare var2 decimal (64) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp72(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute72();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute72;
+DROP PROCEDURE sp72;
+DROP PROCEDURE IF EXISTS sp73;
+CREATE PROCEDURE sp73( in f1 decimal unsigned, inout f2 decimal unsigned, out f3 decimal unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute73;
+CREATE PROCEDURE spexecute73()
+BEGIN
+declare var1 decimal unsigned;
+declare var2 decimal unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp73(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute73();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute73;
+DROP PROCEDURE sp73;
+DROP PROCEDURE IF EXISTS sp74;
+CREATE PROCEDURE sp74( in f1 decimal unsigned zerofill, inout f2 decimal unsigned zerofill, out f3 decimal unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute74;
+CREATE PROCEDURE spexecute74()
+BEGIN
+declare var1 decimal unsigned zerofill;
+declare var2 decimal unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp74(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute74();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute74;
+DROP PROCEDURE sp74;
+DROP PROCEDURE IF EXISTS sp75;
+CREATE PROCEDURE sp75( in f1 decimal zerofill, inout f2 decimal zerofill, out f3 decimal zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute75;
+CREATE PROCEDURE spexecute75()
+BEGIN
+declare var1 decimal zerofill;
+declare var2 decimal zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+09;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp75(-1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute75();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute75;
+DROP PROCEDURE sp75;
+DROP PROCEDURE IF EXISTS sp76;
+CREATE PROCEDURE sp76( in f1 float(0) unsigned zerofill, inout f2 float(0) unsigned zerofill, out f3 float(0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute76;
+CREATE PROCEDURE spexecute76()
+BEGIN
+declare var1 float(0) unsigned zerofill;
+declare var2 float(0) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp76(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute76();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute76;
+DROP PROCEDURE sp76;
+DROP PROCEDURE IF EXISTS sp77;
+CREATE PROCEDURE sp77( in f1 float(23) unsigned zerofill, inout f2 float(23) unsigned zerofill, out f3 float(23) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute77;
+CREATE PROCEDURE spexecute77()
+BEGIN
+declare var1 float(23) unsigned zerofill;
+declare var2 float(23) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp77(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute77();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute77;
+DROP PROCEDURE sp77;
+DROP PROCEDURE IF EXISTS sp78;
+CREATE PROCEDURE sp78( in f1 float(24) unsigned zerofill, inout f2 float(24) unsigned zerofill, out f3 float(24) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute78;
+CREATE PROCEDURE spexecute78()
+BEGIN
+declare var1 float(24) unsigned zerofill;
+declare var2 float(24) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp78(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute78();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute78;
+DROP PROCEDURE sp78;
+DROP PROCEDURE IF EXISTS sp79;
+CREATE PROCEDURE sp79( in f1 float(53) unsigned zerofill, inout f2 float(53) unsigned zerofill, out f3 float(53) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute79;
+CREATE PROCEDURE spexecute79()
+BEGIN
+declare var1 float(53) unsigned zerofill;
+declare var2 float(53) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+00;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp79(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute79();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute79;
+DROP PROCEDURE sp79;
+DROP PROCEDURE IF EXISTS sp80;
+CREATE PROCEDURE sp80( in f1 int, inout f2 int, out f3 int, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute80;
+CREATE PROCEDURE spexecute80()
+BEGIN
+declare var1 int;
+declare var2 int;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -2.15e+09;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp80(-2.15e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute80();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute80;
+DROP PROCEDURE sp80;
+DROP PROCEDURE IF EXISTS sp81;
+CREATE PROCEDURE sp81( in f1 int unsigned, inout f2 int unsigned, out f3 int unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute81;
+CREATE PROCEDURE spexecute81()
+BEGIN
+declare var1 int unsigned;
+declare var2 int unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 4.29e+09;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp81(4.29e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute81();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute81;
+DROP PROCEDURE sp81;
+DROP PROCEDURE IF EXISTS sp82;
+CREATE PROCEDURE sp82( in f1 int unsigned zerofill, inout f2 int unsigned zerofill, out f3 int unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute82;
+CREATE PROCEDURE spexecute82()
+BEGIN
+declare var1 int unsigned zerofill;
+declare var2 int unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 4.29e+09;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp82(4.29e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute82();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute82;
+DROP PROCEDURE sp82;
+DROP PROCEDURE IF EXISTS sp83;
+CREATE PROCEDURE sp83( in f1 int zerofill, inout f2 int zerofill, out f3 int zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute83;
+CREATE PROCEDURE spexecute83()
+BEGIN
+declare var1 int zerofill;
+declare var2 int zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 2.15e+08;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp83(2.15e+08, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute83();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute83;
+DROP PROCEDURE sp83;
+DROP PROCEDURE IF EXISTS sp84;
+CREATE PROCEDURE sp84( in f1 mediumint, inout f2 mediumint, out f3 mediumint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute84;
+CREATE PROCEDURE spexecute84()
+BEGIN
+declare var1 mediumint;
+declare var2 mediumint;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -8388600;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp84(-8388600, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute84();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute84;
+DROP PROCEDURE sp84;
+DROP PROCEDURE IF EXISTS sp85;
+CREATE PROCEDURE sp85( in f1 mediumint unsigned, inout f2 mediumint unsigned, out f3 mediumint unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute85;
+CREATE PROCEDURE spexecute85()
+BEGIN
+declare var1 mediumint unsigned;
+declare var2 mediumint unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 16777201;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp85(16777201, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute85();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute85;
+DROP PROCEDURE sp85;
+DROP PROCEDURE IF EXISTS sp86;
+CREATE PROCEDURE sp86( in f1 mediumint unsigned zerofill, inout f2 mediumint unsigned zerofill, out f3 mediumint unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute86;
+CREATE PROCEDURE spexecute86()
+BEGIN
+declare var1 mediumint unsigned zerofill;
+declare var2 mediumint unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 16777210;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp86(16777210, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute86();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute86;
+DROP PROCEDURE sp86;
+DROP PROCEDURE IF EXISTS sp87;
+CREATE PROCEDURE sp87( in f1 mediumint zerofill, inout f2 mediumint zerofill, out f3 mediumint zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute87;
+CREATE PROCEDURE spexecute87()
+BEGIN
+declare var1 mediumint zerofill;
+declare var2 mediumint zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -8388601;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp87(-8388601, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute87();
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP PROCEDURE spexecute87;
+DROP PROCEDURE sp87;
+DROP PROCEDURE IF EXISTS sp88;
+CREATE PROCEDURE sp88( in f1 numeric (0) unsigned zerofill, inout f2 numeric (0) unsigned zerofill, out f3 numeric (0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute88;
+CREATE PROCEDURE spexecute88()
+BEGIN
+declare var1 numeric (0) unsigned zerofill;
+declare var2 numeric (0) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 99999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp88(99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute88();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute88;
+DROP PROCEDURE sp88;
+DROP PROCEDURE IF EXISTS sp89;
+CREATE PROCEDURE sp89( in f1 numeric (0, 0) unsigned zerofill, inout f2 numeric (0, 0) unsigned zerofill, out f3 numeric (0, 0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute89;
+CREATE PROCEDURE spexecute89()
+BEGIN
+declare var1 numeric (0, 0) unsigned zerofill;
+declare var2 numeric (0, 0) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 99999999;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp89(99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute89();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute89;
+DROP PROCEDURE sp89;
+DROP PROCEDURE IF EXISTS sp90;
+CREATE PROCEDURE sp90( in f1 numeric (63, 30) unsigned, inout f2 numeric (63, 30) unsigned, out f3 numeric (63, 30) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute90;
+CREATE PROCEDURE spexecute90()
+BEGIN
+declare var1 numeric (63, 30) unsigned;
+declare var2 numeric (63, 30) unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp90(1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute90();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute90;
+DROP PROCEDURE sp90;
+DROP PROCEDURE IF EXISTS sp91;
+CREATE PROCEDURE sp91( in f1 numeric (63, 30) unsigned zerofill, inout f2 numeric (63, 30) unsigned zerofill, out f3 numeric (63, 30) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute91;
+CREATE PROCEDURE spexecute91()
+BEGIN
+declare var1 numeric (63, 30) unsigned zerofill;
+declare var2 numeric (63, 30) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp91(1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute91();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute91;
+DROP PROCEDURE sp91;
+DROP PROCEDURE IF EXISTS sp92;
+CREATE PROCEDURE sp92( in f1 numeric (63, 30) zerofill, inout f2 numeric (63, 30) zerofill, out f3 numeric (63, 30) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute92;
+CREATE PROCEDURE spexecute92()
+BEGIN
+declare var1 numeric (63, 30) zerofill;
+declare var2 numeric (63, 30) zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp92(-1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute92();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute92;
+DROP PROCEDURE sp92;
+DROP PROCEDURE IF EXISTS sp93;
+CREATE PROCEDURE sp93( in f1 numeric (64) unsigned zerofill, inout f2 numeric (64) unsigned zerofill, out f3 numeric (64) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute93;
+CREATE PROCEDURE spexecute93()
+BEGIN
+declare var1 numeric (64) unsigned zerofill;
+declare var2 numeric (64) unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 1.00e+22;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp93(1.00e+20, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute93();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute93;
+DROP PROCEDURE sp93;
+DROP PROCEDURE IF EXISTS sp94;
+CREATE PROCEDURE sp94( in f1 smallint, inout f2 smallint, out f3 smallint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute94;
+CREATE PROCEDURE spexecute94()
+BEGIN
+declare var1 smallint;
+declare var2 smallint;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -32701;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp94(-32701, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute94();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute94;
+DROP PROCEDURE sp94;
+DROP PROCEDURE IF EXISTS sp95;
+CREATE PROCEDURE sp95( in f1 smallint unsigned, inout f2 smallint unsigned, out f3 smallint unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute95;
+CREATE PROCEDURE spexecute95()
+BEGIN
+declare var1 smallint unsigned;
+declare var2 smallint unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 65531;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp95(65531, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute95();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute95;
+DROP PROCEDURE sp95;
+DROP PROCEDURE IF EXISTS sp96;
+CREATE PROCEDURE sp96( in f1 smallint unsigned zerofill, inout f2 smallint unsigned zerofill, out f3 smallint unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute96;
+CREATE PROCEDURE spexecute96()
+BEGIN
+declare var1 smallint unsigned zerofill;
+declare var2 smallint unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 65531;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp96(65531, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute96();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute96;
+DROP PROCEDURE sp96;
+DROP PROCEDURE IF EXISTS sp97;
+CREATE PROCEDURE sp97( in f1 smallint zerofill, inout f2 smallint zerofill, out f3 smallint zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute97;
+CREATE PROCEDURE spexecute97()
+BEGIN
+declare var1 smallint zerofill;
+declare var2 smallint zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -32601;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp97(-32601, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute97();
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP PROCEDURE spexecute97;
+DROP PROCEDURE sp97;
+DROP PROCEDURE IF EXISTS sp98;
+CREATE PROCEDURE sp98( in f1 tinyint, inout f2 tinyint, out f3 tinyint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute98;
+CREATE PROCEDURE spexecute98()
+BEGIN
+declare var1 tinyint;
+declare var2 tinyint;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -115;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp98(-115, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute98();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute98;
+DROP PROCEDURE sp98;
+DROP PROCEDURE IF EXISTS sp99;
+CREATE PROCEDURE sp99( in f1 tinyint unsigned, inout f2 tinyint unsigned, out f3 tinyint unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute99;
+CREATE PROCEDURE spexecute99()
+BEGIN
+declare var1 tinyint unsigned;
+declare var2 tinyint unsigned;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 251;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp99(251, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute99();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute99;
+DROP PROCEDURE sp99;
+DROP PROCEDURE IF EXISTS sp100;
+CREATE PROCEDURE sp100( in f1 tinyint unsigned zerofill, inout f2 tinyint unsigned zerofill, out f3 tinyint unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute100;
+CREATE PROCEDURE spexecute100()
+BEGIN
+declare var1 tinyint unsigned zerofill;
+declare var2 tinyint unsigned zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = 201;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp100(201, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute100();
+ERROR 22003: BIGINT value is out of range in 'f5@4 * 2'
+DROP PROCEDURE spexecute100;
+DROP PROCEDURE sp100;
+DROP PROCEDURE IF EXISTS sp101;
+CREATE PROCEDURE sp101( in f1 tinyint zerofill, inout f2 tinyint zerofill, out f3 tinyint zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+DROP PROCEDURE IF EXISTS spexecute101;
+CREATE PROCEDURE spexecute101()
+BEGIN
+declare var1 tinyint zerofill;
+declare var2 tinyint zerofill;
+declare var3 bigint;
+declare var4 bigint;
+declare var5 bigint;
+declare var6 bigint;
+declare var7 bigint;
+declare var8 bigint;
+set var1 = -101;
+set var3 = -9.22e+18;
+set var5 = -9.22e+18;
+set var7 = -9.22e+18;
+CALL sp101(-101, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+CALL spexecute101();
+ERROR 22003: BIGINT UNSIGNED value is out of range in 'f1@0 - 10'
+DROP PROCEDURE spexecute101;
+DROP PROCEDURE sp101;
+USE db_storedproc;
+DROP DATABASE db1;
+USE db_storedproc;
+
+Testcase 4.7.2:
+FIXME: a wrong testcase number and/or description has been detected here. This
+FIXME: needs to be checked to be sure where the missing testcase is located.
+.
+check for "allow_invalid_dates" server sql mode
+
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp2;
+drop table IF EXISTS temp_table;
+create table temp_table (f1 datetime);
+set @@sql_mode = 'allow_invalid_dates';
+CREATE PROCEDURE sp2 ()
+BEGIN
+declare a datetime;
+set a = '2005-03-14 01:01:02';
+insert into temp_table values(a);
+END//
+show CREATE PROCEDURE sp2;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp2 ALLOW_INVALID_DATES CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
+BEGIN
+declare a datetime;
+set a = '2005-03-14 01:01:02';
+insert into temp_table values(a);
+END latin1 latin1_swedish_ci latin1_swedish_ci
+set @@sql_mode = 'traditional';
+CALL sp2 ();
+SELECT * from temp_table;
+f1
+2005-03-14 01:01:02
+SELECT @@sql_mode;
+@@sql_mode
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DROP PROCEDURE sp2;
+drop table temp_table;
+
+Testcase 4.7.3:
+FIXME: a wrong testcase number and/or description has been detected here. This
+FIXME: needs to be checked to be sure where the missing testcase is located.
+.
+check for *high_not_precedence* server sql mode
+
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp3;
+set @@sql_mode = 'high_not_precedence';
+CREATE PROCEDURE sp3()
+BEGIN
+declare a int signed;
+declare b int unsigned;
+set a = -5;
+set b = 5;
+SELECT not 1 between a and b;
+END//
+show CREATE PROCEDURE sp3;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp3 HIGH_NOT_PRECEDENCE CREATE DEFINER=`root`@`localhost` PROCEDURE `sp3`()
+BEGIN
+declare a int signed;
+declare b int unsigned;
+set a = -5;
+set b = 5;
+SELECT not 1 between a and b;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+set @@sql_mode='';
+CALL sp3();
+not 1 between a and b
+1
+SELECT @@sql_mode;
+@@sql_mode
+
+DROP PROCEDURE sp3;
+
+Testcase 4.7.4:
+FIXME: a wrong testcase number and/or description has been detected here. This
+FIXME: needs to be checked to be sure where the missing testcase is located.
+.
+check for combination of server sql modes
+
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp4;
+set @@sql_mode = 'ansi, error_for_division_by_zero';
+ERROR 42000: Variable 'sql_mode' can't be set to the value of ' error_for_division_by_zero'
+set @@sql_mode = 'ansi,error_for_division_by_zero';
+SHOW VARIABLES LIKE 'sql_mode';
+Variable_name Value
+sql_mode REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO
+CREATE PROCEDURE sp4()
+BEGIN
+declare a int;
+declare b int;
+declare c int;
+set a = 0;
+set b = 1;
+set c = b/a;
+show warnings;
+END//
+show CREATE PROCEDURE sp4;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO CREATE DEFINER="root"@"localhost" PROCEDURE "sp4"()
+BEGIN
+declare a int;
+declare b int;
+declare c int;
+set a = 0;
+set b = 1;
+set c = b/a;
+show warnings;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+set @@sql_mode='';
+CALL sp4();
+Level Code Message
+Warning 1365 Division by 0
+Warnings:
+Warning 1365 Division by 0
+DROP PROCEDURE sp4;
+set @@sql_mode='';
+
+Section 3.1.8 - SHOW statement checks:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 4.8.1:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+DROP PROCEDURE IF EXISTS sp6a;
+DROP PROCEDURE IF EXISTS sp6b;
+DROP PROCEDURE IF EXISTS sp6c;
+CREATE PROCEDURE sp6a (i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real)
+language sql
+BEGIN
+set @x=i1;
+set @y=@x;
+END//
+CREATE PROCEDURE sp6b (out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real)
+deterministic
+BEGIN
+set @x=i1;
+set @y=@x;
+END//
+CREATE PROCEDURE sp6c (inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) comment 'this is a comment'
+BEGIN
+set @x=i1;
+set @y=@x;
+END//
+show CREATE PROCEDURE sp6a;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp6a CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6a`(i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real)
+BEGIN
+set @x=i1;
+set @y=@x;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+show CREATE PROCEDURE sp6b;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp6b CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6b`(out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real)
+ DETERMINISTIC
+BEGIN
+set @x=i1;
+set @y=@x;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+show CREATE PROCEDURE sp6c;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp6c CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6c`(inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real)
+ COMMENT 'this is a comment'
+BEGIN
+set @x=i1;
+set @y=@x;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW PROCEDURE status like 'sp6a';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp6a PROCEDURE root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW PROCEDURE status like 'sp6b';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp6b PROCEDURE root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+SHOW PROCEDURE status like 'sp6c';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp6c PROCEDURE root@localhost <modified> <created> DEFINER this is a comment latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE sp6a;
+DROP PROCEDURE sp6b;
+DROP PROCEDURE sp6c;
+
+Testcase 4.8.2:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x=i1;
+set @y=@x;
+END//
+SHOW PROCEDURE status like 'sp6';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp6 PROCEDURE root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE sp6;
+
+Testcase 4.8.3:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x=i1;
+set @y=@x;
+END//
+SHOW CREATE FUNCTION sp6;
+ERROR 42000: FUNCTION sp6 does not exist
+DROP PROCEDURE sp6;
+
+Testcase 4.8.4:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE FUNCTION sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns longtext
+BEGIN
+set @x=i1;
+set @y=@x;
+return 0;
+END//
+show function status like 'sp6';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp6 FUNCTION root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION sp6;
+
+Testcase 4.8.5:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp7;
+show CREATE PROCEDURE sp7;
+ERROR 42000: PROCEDURE sp7 does not exist
+
+Testcase 4.8.6:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+show procedure status like 'sp6';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+
+Testcase 4.8.7:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (i1 real) returns real
+BEGIN
+return i1;
+END//
+show CREATE PROCEDURE fn1;
+ERROR 42000: PROCEDURE fn1 does not exist
+DROP FUNCTION fn1;
+
+Testcase 4.8.8:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (i1 real) returns real
+BEGIN
+return i1;
+END//
+show procedure status like 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+DROP FUNCTION fn1;
+
+Testcase 4.8.9:
+--------------------------------------------------------------------------------
+
+Testcase 4.8.10:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (i1 real) returns real
+BEGIN
+return i1;
+END//
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION fn1;
+
+Testcase 4.8.11:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (x int) returns int
+BEGIN
+return x;
+END//
+show CREATE PROCEDURE fn1;
+ERROR 42000: PROCEDURE fn1 does not exist
+DROP FUNCTION fn1;
+
+Testcase 4.8.12:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(x int) returns int
+BEGIN
+return x;
+END//
+DROP FUNCTION fn1;
+show CREATE FUNCTION fn1;
+ERROR 42000: FUNCTION fn1 does not exist
+
+Testcase 4.8.13:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS f1000;
+SHOW FUNCTION STATUS LIKE 'f1000';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+
+Testcase 4.8.14:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1()
+BEGIN
+SELECT * from t8;
+END//
+show CREATE FUNCTION sp1;
+ERROR 42000: FUNCTION sp1 does not exist
+DROP PROCEDURE sp1;
+
+Testcase 4.8.15:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x=i1;
+set @y=@x;
+END//
+show function status like 'sp6';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+DROP PROCEDURE sp6;
+
+Testcase 4.8.16:
+--------------------------------------------------------------------------------
+
+Testcase 4.8.17:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x=i1;
+set @y=@x;
+END//
+alter procedure sp6 sql security invoker;
+alter procedure sp6 comment 'this is a new comment';
+SHOW PROCEDURE status like 'sp6';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc sp6 PROCEDURE root@localhost <modified> <created> INVOKER this is a new comment latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE sp6;
+
+Testcase 4.8.18:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (x int) returns int
+BEGIN
+return x;
+END//
+alter function fn1 sql security invoker;
+show create function fn1;
+Function sql_mode Create Function character_set_client collation_connection Database Collation
+fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11)
+ SQL SECURITY INVOKER
+BEGIN
+return x;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION fn1;
+
+Testcase 4.8.19:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (i1 longtext) returns longtext
+BEGIN
+return i1;
+END//
+alter function fn1 sql security invoker;
+alter function fn1 comment 'this is a function 3242#@%$#@';
+show function status like 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+db_storedproc fn1 FUNCTION root@localhost <modified> <created> INVOKER this is a function 3242#@%$#@ latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION fn1;
+
+Testcase 4.8.20:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6 (i1 int , i2 int)
+BEGIN
+set @x=i1;
+set @y=@x;
+END//
+alter procedure sp6 comment 'this is simple';
+show CREATE PROCEDURE sp6;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp6 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6`(i1 int , i2 int)
+ COMMENT 'this is simple'
+BEGIN
+set @x=i1;
+set @y=@x;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE sp6;
+
+Testcase 4.8.21:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6 (i1 int, i2 int)
+BEGIN
+set @x=i1;
+set @y=@x;
+END//
+DROP PROCEDURE sp6;
+show CREATE PROCEDURE sp6;
+ERROR 42000: PROCEDURE sp6 does not exist
+
+Testcase 4.8.22:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x=i3;
+set @y=@x;
+END//
+DROP PROCEDURE sp6;
+SHOW PROCEDURE status like 'sp6';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+
+Testcase 4.8.23:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (x int) returns int
+BEGIN
+return x;
+END//
+DROP FUNCTION fn1;
+show CREATE FUNCTION fn1;
+ERROR 42000: FUNCTION fn1 does not exist
+
+Testcase 4.8.24:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 (i1 longtext) returns longtext
+BEGIN
+return i1;
+END//
+DROP FUNCTION fn1;
+SHOW FUNCTION STATUS LIKE 'fn1';
+Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
+
+Section 3.1.9 - Routine body checks:
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 4.9.1:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x = i3;
+set @a = i5;
+set @y = @x;
+set @b = @a;
+SELECT * from t9 limit 0, 100;
+END//
+CALL sp6 (10, 20, 30, 40, 50);
+f1 f2 f3
+-4991 a_aaaaaaaaa -4991
+-4992 a^aaaaaaaa -4992
+-4993 agaaaaaaa -4993
+-4994 afaaaaaa -4994
+-4995 aeaaaaa -4995
+-4996 adaaaa -4996
+-4997 acaaa -4997
+-4998 abaa -4998
+-4999 aaa -4999
+-5000 a` -5000
+DROP PROCEDURE sp6;
+
+Testcase 4.9.2:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+create table res_t9 (f1 int, f2 char(25), f3 int);
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x = i3;
+set @a = i5;
+set @y = @x;
+set @b = @a;
+insert into res_t9 values (@y, @a, 111);
+SELECT * from res_t9;
+END//
+CALL sp6 (10, 20, 30, 40, 50);
+f1 f2 f3
+30 50 111
+DROP PROCEDURE sp6;
+drop table res_t9;
+
+Testcase 4.9.3:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+create table res_t9 (f1 int, f2 char(25), f3 int);
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x = i3;
+set @a = i5;
+set @y = @x;
+set @b = @a;
+insert into res_t9 values (@y, @a, 111);
+SELECT * from res_t9;
+delete from res_t9;
+SELECT * from res_t9;
+END//
+CALL sp6 (10, 20, 30, 40, 50);
+f1 f2 f3
+30 50 111
+f1 f2 f3
+DROP PROCEDURE sp6;
+drop table res_t9;
+
+Testcase 4.9.4:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+create table res_t9 (f1 int, f2 char(25), f3 int);
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x = i3;
+set @a = i5;
+set @y = @x;
+set @b = @a;
+insert into res_t9 values (@y, @a, 111);
+SELECT * from res_t9;
+update res_t9 set f2 = 1000 where f2 = 50;
+SELECT * from res_t9;
+END//
+CALL sp6 (10, 20, 30, 40, 50);
+f1 f2 f3
+30 50 111
+f1 f2 f3
+30 1000 111
+DROP PROCEDURE sp6;
+drop table res_t9;
+
+Testcase 4.9.5:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x = i1;
+set @y = i3;
+set @z = i5;
+set @a = @x;
+set @b = @y;
+set @c = @z;
+create table res_t9(f1 longtext, f2 longblob, f3 real);
+insert into res_t9 values (@a, @b, @c);
+SELECT * from res_t9;
+END//
+CALL sp6 (10, 20, 30, 40, 50);
+f1 f2 f3
+10 30 50
+DROP PROCEDURE sp6;
+drop table IF EXISTS res_t9;
+
+Testcase 4.9.6:
+--------------------------------------------------------------------------------
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+SELECT * from t9 limit 0, 100;
+return i1;
+END//
+ERROR 0A000: Not allowed to return a result set from a function
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+drop table IF EXISTS res_t9;
+Warnings:
+Note 1051 Unknown table 'db_storedproc.res_t9'
+create table res_t9 (f1 int, f2 char(25), f3 int);
+insert into res_t9 values (10, 'abc', 20);
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+delete from res_t9;
+drop table res_t9;
+return i1;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+drop table IF EXISTS res_t9;
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+create table res_t9 (f1 longtext, f2 longblob, f3 real);
+drop table res_t9;
+return i1;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+drop table IF EXISTS res_t9;
+Warnings:
+Note 1051 Unknown table 'db_storedproc.res_t9'
+create table res_t9 (f1 int, f2 char(25), f3 int);
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+insert into res_t9 values (100, 'abc', 300);
+drop table res_t9;
+return i1;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+drop table IF EXISTS res_t9;
+create table res_t9 (f1 int, f2 char(25), f3 int);
+insert into res_t9 values (10, 'abc', 20);
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+update res_t9 set f1 = 20;
+drop table res_t9;
+return i1;
+END//
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+drop table res_t9;
+DROP FUNCTION IF EXISTS fn1;
+Warnings:
+Note 1305 FUNCTION db_storedproc.fn1 does not exist
+
+Testcase 4.9.7:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+create table res_t9 (f1 longtext, f2 longblob, f3 real);
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+set @x = i1;
+set @y = i3;
+set @z = i5;
+set @a = @x;
+set @b = @y;
+set @c = @z;
+insert into res_t9 values (@a, @b, @c);
+SELECT * from res_t9;
+create index index_1 on res_t9 (f1 (5));
+show index from res_t9;
+END//
+CALL sp6 (10, 20, 30, 40, 50);
+f1 f2 f3
+10 30 50
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
+res_t9 1 index_1 1 f1 A NULL 5 NULL YES BTREE NO
+DROP PROCEDURE sp6;
+drop table res_t9;
+
+Section 3.1._ - :
+--------------------------------------------------------------------------------
+USE db_storedproc;
+
+Testcase 4.11.1:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @y=x;
+END//
+CREATE PROCEDURE h1 ()
+BEGIN
+declare continue handler for 1318 set @x2 = 1;
+set @x=0;
+CALL sp1 (1);
+set @x=1;
+SELECT @x, @x2;
+END//
+CALL h1 ();
+@x @x2
+1 1
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+Testcase 4.11.2:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+CREATE PROCEDURE h1 ()
+BEGIN
+declare continue handler for 1305 set @x2 = 1;
+set @x=0;
+CALL sp1 (1);
+set @x=1;
+SELECT @x, @x2;
+END//
+CALL h1 ();
+@x @x2
+1 1
+DROP PROCEDURE h1;
+
+Testcase 4.11.3:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @xx=1;
+END//
+CREATE PROCEDURE h1 ()
+BEGIN
+declare exit handler for 1318 set @x2 = 1;
+set @x=1;
+set @x2=0;
+CALL sp1 (1);
+set @x=0;
+END//
+CALL h1();
+SELECT @x, @x2;
+@x @x2
+1 1
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+Testcase 4.11.4:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+CREATE PROCEDURE h1 ()
+BEGIN
+declare exit handler for 1305 set @x2 = 1;
+set @x=1;
+set @x2=0;
+CALL sp1 (1);
+set @x=0;
+END//
+CALL h1 ();
+SELECT @x, @x2;
+@x @x2
+1 1
+DROP PROCEDURE h1;
+
+Testcase 4.11.5:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @y=x;
+END//
+CREATE PROCEDURE h1 ()
+BEGIN
+declare continue handler for 1318 set @x2 = 1;
+set @x=0;
+CALL sp1 (1);
+set @x=1;
+SELECT @x, @x2;
+END//
+CALL h1 ();
+@x @x2
+1 1
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+Testcase 4.11.6:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @y=x;
+END//
+CREATE PROCEDURE h1 ()
+BEGIN
+declare continue handler for 1318 set @x2 = 1;
+set @x=0;
+CALL sp1 (1);
+set @x=1;
+SELECT @x, @x2;
+END//
+CALL h1 ();
+@x @x2
+1 1
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+Testcase 4.11.7:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @y=x;
+END//
+CREATE PROCEDURE h1 ()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 1;
+set @x=0;
+CALL sp1 (1);
+set @x=1;
+SELECT @x, @x2;
+END//
+CALL h1 ();
+@x @x2
+1 1
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+Testcase 4.11.8:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+CREATE PROCEDURE h1 ()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 1;
+set @x=0;
+CALL sp1 (1);
+set @x=1;
+SELECT @x, @x2;
+END//
+CALL h1 ();
+@x @x2
+1 1
+DROP PROCEDURE h1;
+
+Testcase 4.11.9:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @xx=1;
+END//
+CREATE PROCEDURE h1 ()
+BEGIN
+declare exit handler for sqlstate '42000' set @x2 = 1;
+set @x=1;
+set @x2=0;
+CALL sp1 (1);
+set @x=0;
+END//
+CALL h1();
+SELECT @x, @x2;
+@x @x2
+1 1
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+Testcase 4.11.10:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+CREATE PROCEDURE h1 ()
+BEGIN
+declare exit handler for sqlstate '42000' set @x2 = 1;
+set @x=1;
+set @x2=0;
+CALL sp1 (1);
+set @x=0;
+END//
+CALL h1 ();
+SELECT @x, @x2;
+@x @x2
+1 1
+DROP PROCEDURE h1;
+
+Testcase 4.11.11:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @y=x;
+END//
+CREATE PROCEDURE h1 ()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 1;
+set @x=0;
+CALL sp1 (1);
+set @x=1;
+SELECT @x, @x2;
+END//
+CALL h1 ();
+@x @x2
+1 1
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+Testcase 4.11.12:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+set @y=x;
+END//
+CREATE PROCEDURE h1 ()
+BEGIN
+declare continue handler for sqlstate '42000' set @x2 = 1;
+set @x=0;
+CALL sp1 (1);
+set @x=1;
+SELECT @x, @x2;
+END//
+CALL h1 ();
+@x @x2
+1 1
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+Testcase 4.11.13:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for sqlstate '02000' set done = 1;
+open cur1;
+repeat
+SELECT done;
+fetch cur1 into a, b;
+SELECT done;
+if not done then
+insert into res_t2 values (a, b);
+END if;
+until done END repeat;
+SELECT done;
+close cur1;
+END//
+CALL h1();
+done
+0
+done
+1
+done
+1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.14:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for sqlstate '02000' set done = 1;
+open cur1;
+repeat
+SELECT done;
+fetch cur1 into a, b;
+SELECT done;
+if not done then
+insert into res_t2 values (a, b);
+END if;
+until done END repeat;
+SELECT done;
+close cur1;
+END//
+CALL h1();
+done
+0
+done
+1
+done
+1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.15:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for sqlstate '02000' set done = 1;
+open cur1;
+repeat
+SELECT done;
+set @x=0;
+fetch cur1 into a, b;
+SELECT @x=1;
+if not done then
+insert into res_t2 values (a, b);
+END if;
+until done END repeat;
+SELECT done;
+close cur1;
+END//
+CALL h1();
+done
+0
+@x=1
+0
+done
+1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.16:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for sqlstate '02000' set done = 1;
+open cur1;
+repeat
+SELECT done;
+set @x=0;
+fetch cur1 into a, b;
+SELECT @x=1;
+if not done then
+insert into res_t2 values (a, b);
+END if;
+until done END repeat;
+SELECT done;
+close cur1;
+END//
+CALL h1();
+done
+0
+@x=1
+0
+done
+1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.17:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for sqlstate 'HY000' set done = 1;
+open cur1;
+SELECT done;
+fetch cur1 into a;
+SELECT done;
+close cur1;
+END//
+CALL h1();
+done
+0
+done
+1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.18:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for 1328 set done = 1;
+open cur1;
+SELECT done;
+fetch cur1 into a;
+SELECT done;
+close cur1;
+END//
+CALL h1();
+done
+0
+done
+1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.19:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare exit handler for sqlstate 'HY000' set done = 1;
+open cur1;
+SELECT done;
+set @x=0;
+fetch cur1 into a;
+set @x=1;
+SELECT done, @x;
+close cur1;
+END//
+CALL h1();
+done
+0
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.20:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare exit handler for 1328 set done = 1;
+open cur1;
+SELECT done;
+set @x=0;
+fetch cur1 into a;
+set @x=1;
+SELECT done;
+close cur1;
+END//
+CALL h1();
+done
+0
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.21:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for 1325 set done = 1;
+open cur1;
+SELECT done;
+open cur1;
+SELECT done;
+close cur1;
+END//
+CALL h1();
+done
+0
+done
+1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.22:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for 1325 set done = 1;
+open cur1;
+SELECT done;
+open cur1;
+set @x=1;
+SELECT done, @x;
+close cur1;
+END//
+CALL h1();
+done
+0
+done @x
+1 1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.23:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare exit handler for 1325 set done = 1;
+open cur1;
+set @x=0;
+SELECT done;
+open cur1;
+set @x=1;
+SELECT done;
+close cur1;
+END//
+CALL h1();
+done
+0
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.24:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare exit handler for sqlstate '24000' set done = 1;
+open cur1;
+set @x=0;
+SELECT done;
+open cur1;
+set @x=1;
+SELECT done, @x;
+close cur1;
+END//
+CALL h1();
+done
+0
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.25:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for 1326 set done = 1;
+set @x=0;
+fetch cur1 into a, b;
+set @x=1;
+SELECT done, @x;
+END//
+CALL h1();
+done @x
+1 1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.26:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for sqlstate '24000' set done = 1;
+set @x=0;
+fetch cur1 into a, b;
+set @x=1;
+SELECT done, @x;
+END//
+CALL h1();
+done @x
+1 1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.27:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare exit handler for 1326 set done = 1;
+set @x=0;
+fetch cur1 into a, b;
+set @x=1;
+SELECT done, @x;
+END//
+CALL h1();
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.28:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare exit handler for sqlstate '24000' set done = 1;
+set @x=0;
+fetch cur1 into a, b;
+set @x=1;
+SELECT done, @x;
+END//
+CALL h1();
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+
+Testcase 4.11.29:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for 1339 set done = 1;
+set @x=0;
+case @x
+when 1 then set @x=10;
+when 2 then set @x=11;
+END case;
+set @x=1;
+SELECT done, @x;
+END//
+CALL h1();
+done @x
+1 1
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+
+Testcase 4.11.30:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare continue handler for sqlstate '20000' set done = 1;
+set @x=0;
+case @x
+when 1 then set @x=10;
+when 2 then set @x=11;
+END case;
+set @x=1;
+SELECT done, @x;
+END//
+CALL h1();
+done @x
+1 1
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+
+Testcase 4.11.31:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare exit handler for 1339 set done = 1;
+set @x=0;
+case @x
+when 1 then set @x=10;
+when 2 then set @x=11;
+END case;
+set @x=1;
+SELECT done, @x;
+END//
+CALL h1();
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+
+Testcase 4.11.32:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+create table res_t2(y char, z char);
+CREATE PROCEDURE h1()
+BEGIN
+declare done int default 0;
+declare a, b char;
+declare cur1 cursor for SELECT w, x from res_t1;
+declare exit handler for sqlstate '20000' set done = 1;
+set @x=0;
+case @x
+when 1 then set @x=10;
+when 2 then set @x=11;
+END case;
+set @x=1;
+SELECT done, @x;
+END//
+CALL h1();
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+
+Testcase 4.11.33:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+create table res_t1(w char, x char);
+insert into res_t1 values('a', 'b');
+insert into res_t1 values('c', 'd');
+CREATE PROCEDURE h1()
+BEGIN
+declare condname condition for sqlstate '20000';
+declare done int default 0;
+declare a, b char;
+declare condname condition for sqlstate '20000';
+declare cur1 cursor for SELECT w, x from t1;
+set @x=2;
+case @x
+when 1 then set @x=10;
+when 2 then set @x=11;
+END case;
+set @x=1;
+SELECT done, @x;
+END//
+ERROR 42000: Duplicate condition: condname
+DROP TABLE IF EXISTS res_t1;
+
+Testcase 4.11.35:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+CREATE TABLE res_t1(w INT UNIQUE, x CHAR);
+insert into res_t1 values (1, 'a');
+CREATE PROCEDURE h1 ()
+begin1_label:BEGIN
+declare condname1 condition for sqlstate '020';
+declare condname2 condition for sqlstate 'wewe';
+declare condname3 condition for 9999;
+declare exit handler for sqlstate '020' set @var1 = 1;
+declare exit handler for sqlstate 'wewe'set @var1 = 1;
+declare exit handler for 9999 set @var1 = 1;
+set @var2 = 1;
+insert into res_t1 values (2, 'b');
+begin2_label: BEGIN
+declare continue handler for sqlstate '90000023' set @var3= 1;
+set @var4 = 1;
+insert into res_t1 values (3, 'c');
+END begin2_label;
+END begin1_label//
+ERROR 42000: Bad SQLSTATE: '020'
+CREATE PROCEDURE h1 ()
+begin1_label:BEGIN
+declare condname1 condition for sqlstate '020';
+declare condname2 condition for sqlstate 'wewe';
+declare condname3 condition for 9999;
+set @var2 = 1;
+insert into res_t1 values (2, 'b');
+begin2_label: BEGIN
+declare continue handler for sqlstate '90000023' set @var3= 1;
+set @var4 = 1;
+insert into res_t1 values (3, 'c');
+END begin2_label;
+END begin1_label//
+ERROR 42000: Bad SQLSTATE: '020'
+DROP TABLE IF EXISTS res_t1;
+
+Testcase 4.11.36:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+CREATE PROCEDURE h1 ()
+BEGIN
+declare x1 int default 0;
+BEGIN
+declare condname1 condition for sqlstate '00000';
+declare exit handler for condname1 set @x = 1;
+set x1 = 1;
+set x1 = 2;
+END;
+SELECT @x, x1;
+END//
+ERROR 42000: Bad SQLSTATE: '00000'
+DROP PROCEDURE IF EXISTS h1;
+
+Testcase 4.11.40:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+CREATE TABLE res_t1(w CHAR UNIQUE, x CHAR);
+INSERT INTO res_t1 VALUES ('a', 'b');
+CREATE PROCEDURE h1 ()
+BEGIN
+DECLARE x1, x2, x3, x4, x5 int default 0;
+DECLARE condname1 CONDITION FOR SQLSTATE '42000';
+DECLARE condname2 CONDITION FOR SQLSTATE '42000';
+DECLARE CONTINUE HANDLER FOR condname1 set x1 = 1;
+DECLARE CONTINUE HANDLER FOR condname1 set x2 = 1;
+DECLARE EXIT HANDLER FOR condname1 SET x3 = 1;
+DECLARE CONTINUE HANDLER FOR condname2 SET x4 = 1;
+DECLARE EXIT HANDLER FOR condname2 SET x5 = 1;
+END//
+ERROR 42000: Duplicate handler declared in the same block
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+
+Testcase 4.11.41:
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+CREATE PROCEDURE h1 ()
+BEGIN
+DECLARE x1 INT DEFAULT 0;
+BEGIN
+DECLARE condname1 CONDITION FOR SQLSTATE '00000';
+DECLARE EXIT HANDLER FOR SQLSTATE '00000' SET @x = 1;
+SET x1 = 1;
+SET x1 = 2;
+END;
+SELECT @x, x1;
+END//
+ERROR 42000: Bad SQLSTATE: '00000'
+CALL h1();
+ERROR 42000: PROCEDURE db_storedproc.h1 does not exist
+DROP PROCEDURE IF EXISTS h1;
+
+* Testcase 3.1.2.53 (4.11.42):
+* Ensure that a handler condition of sqlwarning takes the same action as a
+* handler condition defined with an sqlstate that begins with 01.
+--------------------------------------------------------------------------------
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+CREATE PROCEDURE h1()
+BEGIN
+DECLARE EXIT HANDLER FOR SQLWARNING SET @done = 1;
+SET @done=0;
+SET @x=1;
+INSERT INTO res_t1 VALUES('xxx', 'yy');
+SET @x=0;
+END//
+CALL h1();
+ERROR 42S02: Table 'db_storedproc.res_t1' doesn't exist
+SELECT @done, @x;
+@done @x
+0 1
+CREATE TABLE res_t1(w CHAR, x CHAR);
+INSERT INTO res_t1 VALUES('a', 'b');
+INSERT INTO res_t1 VALUES('c', 'd');
+CALL h1();
+SELECT @done, @x;
+@done @x
+1 1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+CREATE PROCEDURE h1()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING SET @done = 1;
+SET @done=0;
+SET @x=0;
+INSERT INTO res_t1 VALUES('xxx', 'yy');
+SET @x=1;
+END//
+CALL h1();
+ERROR 42S02: Table 'db_storedproc.res_t1' doesn't exist
+SELECT @done, @x;
+@done @x
+0 0
+CREATE TABLE res_t1(w CHAR, x CHAR);
+INSERT INTO res_t1 VALUES('a', 'b');
+INSERT INTO res_t1 VALUES('c', 'd');
+CALL h1();
+SELECT @done, @x;
+@done @x
+1 1
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--------------------------------------------------------------------------------
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+
+. +++ END OF SCRIPT +++
+--------------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc b/mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc
new file mode 100644
index 00000000..bd41f2dc
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc
@@ -0,0 +1,10 @@
+--echo
+--echo --source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+--echo --------------------------------------------------------------------------------
+
+# called both to cleanup possibly existing data before and after the SP tests
+
+--disable_warnings
+DROP DATABASE IF EXISTS db_storedproc;
+DROP DATABASE IF EXISTS db_storedproc_1;
+--enable_warnings
diff --git a/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc
new file mode 100644
index 00000000..6f23a559
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc
@@ -0,0 +1,104 @@
+--echo
+--echo --source suite/funcs_1/storedproc/load_sp_tb.inc
+--echo --------------------------------------------------------------------------------
+
+# ==============================================================================
+#
+# This load script can be called multiple times inside a test script because it
+# first cleans up all objects that will be created.
+# Therefore the same script is used as it will be used at the end of a test.
+#
+# ==============================================================================
+
+--disable_abort_on_error
+--enable_query_log
+
+# use the same .inc to cleanup before and after the test
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+
+CREATE DATABASE db_storedproc;
+CREATE DATABASE db_storedproc_1;
+
+USE db_storedproc;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' into table t1;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' into table t2;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+create table t3(f1 char(20),f2 char(20),f3 integer) engine = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t3.txt' into table t3;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' into table t4;
+
+USE db_storedproc_1;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' into table t6;
+
+USE db_storedproc;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+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' ignore into table t7;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+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' ignore into table t8;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+create table t9(f1 int, f2 char(25), f3 int) engine = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t9.txt' into table t9;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' into table t10;
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
+engine = $engine_type;
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' into table t11;
diff --git a/mysql-test/suite/funcs_1/storedproc/param_check.inc b/mysql-test/suite/funcs_1/storedproc/param_check.inc
new file mode 100644
index 00000000..203187f9
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/param_check.inc
@@ -0,0 +1,50 @@
+# suite/funcs_1/storedproc/param_check.inc
+#
+# Auxiliary routine to be sourced by
+# suite/funcs_1/t/storedproc.test
+#
+# Purpose:
+# The assignment of float values to objects of type DECIMAL causes
+# conversions and in some cases an adjustment of the value to
+# a border of the value range.
+# Try to reveal that function and procedure parameters get a similar
+# mangling of the value like columns.
+#
+# Variables to be set before sourcing this routine
+# $test_value - value to be checked
+#
+# Created:
+# 2008-08-27 mleich
+#
+# Modified:
+# 2008-11-17 pcrews
+# added --disable / --enable_warning statements to minimize differences
+# between platforms (Bug#40177 Test funcs_1.storedproc failing on Pushbuild)
+#
+# TODO: (After 5.1 GA)
+# 1) Examine reordering statements in this file to minimize the number of
+# --disable / --enable_warning statements. Unsure if performance gains
+# warrant the working time
+# 2) We could probably add a comparison of the # of warnings before the
+# assignment of @v1_proc and @v1_func to the # of warnings after assignment
+# The difference of these values should be zero
+# Refer to Bug#40177 - http://bugs.mysql.com/bug.php?id=40177 for notes as well
+
+eval UPDATE t1_aux SET f1 = NULL;
+# Enforce that all user variables have the same data type and initial value.
+SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
+
+--disable_warnings
+eval UPDATE t1_aux SET f1 = $test_value;
+--enable_warnings
+SELECT f1 INTO @v1_tab FROM t1_aux;
+--disable_warnings
+eval CALL sproc_1($test_value, @v1_proc);
+eval SET @v1_func = func_1($test_value);
+--enable_warnings
+
+if (`SELECT @v1_tab <> @v1_proc OR @v1_tab <> @v2_proc OR @v1_tab <> @v1_func`)
+{
+ --echo Error: @v1_tab, @v1_proc, @v2_proc, @v1_func are not all equal
+ SELECT @v1_tab, @v1_proc, @v2_proc, @v1_func;
+}
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc
new file mode 100644
index 00000000..2717303d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc
@@ -0,0 +1,1666 @@
+#### suite/funcs_1/storedproc/storedproc_02.inc
+#
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+
+# ==============================================================================
+# (numbering from requirement document TP v1.0, Last updated: 25 Jan 2005 01:00)
+#
+# 3.1.2 Syntax checks for the stored procedure-specific programming statements
+# BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE:
+#
+#- 1. Ensure that all subclauses that should be supported are supported.
+#- 2. Ensure that all subclauses that should not be supported are disallowed
+# with an appropriate error message.
+#- 3. Ensure that all supported subclauses are supported only in the
+# correct order.
+#- 4. Ensure that an appropriate error message is returned if a subclause is
+# out-of-order in a stored procedure definition.
+#- 5. Ensure that all subclauses that are defined to be mandatory are indeed
+# required to be mandatory by the MySQL server and tools.
+#- 6. Ensure that any subclauses that are defined to be optional are indeed
+# treated as optional by the MySQL server and tools.
+#- 7. Ensure that every BEGIN statement is coupled with a terminating
+# END statement.
+## 8. Ensure that the scope of each BEGIN/END compound statement within a
+# stored procedure definition is properly applied.
+#- 9. Ensure that the labels enclosing each BEGIN/END compound statement
+# must match.
+#- 10. Ensure that it is possible to put a beginning label at the start of
+# a BEGIN/END compound statement without also requiring an ending label
+# at the end of the same statement.
+#- 11. Ensure that it is not possible to put an ending label at the end of
+# a BEGIN/END compound statement without also requiring a matching
+# beginning label at the start of the same statement.
+#- 12. Ensure that every beginning label must end with a colon (:).
+#- 13. Ensure that every beginning label with the same scope must be unique.
+#- 14. Ensure that the variables, cursors, conditions, and handlers declared
+# for a stored procedure (with the DECLARE statement) may only be
+# properly defined.
+#- 15. Ensure that the variables, cursors, conditions, and handlers declared for
+# a stored procedure (with the DECLARE statement) may only be defined in
+# the correct order.
+#- 16. Ensure that every possible type of variable -- utilizing every data type
+# definition supported by the MySQL server in combination with both no
+# DEFAULT subclause and with DEFAULT subclauses that set the variable’s
+# default value to a range of appropriate values -- may be declared for
+# a stored procedure.
+#- 17. Ensure that the DECLARE statement can declare multiple variables both
+# separately and all at once from a variable list.
+#- 18. Ensure that invalid variable declarations are rejected, with an
+# appropriate error message.
+#- 19. Ensure that every possible type of cursor may be declared for a
+# stored procedure.
+#- 20. Ensure that invalid cursor declarations are rejected, with an appropriate
+# error message.
+#- 21. Ensure that every possible type of condition may be declared for
+# a stored procedure.
+# -22. Ensure that invalid condition declarations are rejected, with an
+# appropriate error message.
+#- 23. Ensure that every possible type of handler may be declared for a
+# stored procedure.
+#- 24. Ensure that invalid handler declarations are rejected, with an
+# appropriate error message.
+#- 25. Ensure that the scope of every variable, cursor, condition, and handler
+# declared for a stored procedure (with the DECLARE statement) is
+# properly applied.
+## 26. Ensure that the initial value of every variable declared for a stored
+# procedure is either NULL or its DEFAULT value, as appropriate.
+#- 27. Ensure that the SET statement can assign a value to every local variable
+# declared within a stored procedure’s definition, as well as to every
+# appropriate global server variable.
+#- 28. Ensure that the SET statement can assign values to variables either
+# separately or to multiple variables in a list.
+#- 29. Ensure that the SET statement may assign only those values to a variable
+# that are appropriate for that variable’s data type definition.
+## 30. Ensure that, when a stored procedure is called/executed, every variable
+# always uses the correct value: either the value with which it is
+# initialized or the value to which it is subsequently SET or otherwise
+# assigned, as appropriate.
+## 31. Ensure that the SELECT ... INTO statement properly assigns values to the
+# variables in its variable list.
+## 32. Ensure that a SELECT ... INTO statement that retrieves multiple rows is
+# rejected, with an appropriate error message.
+## 33. Ensure that a SELECT ... INTO statement that retrieves too many columns
+# for the number of variables in its variable list is rejected, with an
+# appropriate error message.
+## 34. Ensure that a SELECT ... INTO statement that retrieves too few columns
+# for the number of variables in its variable list is rejected, with an
+# appropriate error message.
+#- 35. Ensure that a SELECT ... INTO statement that retrieves column values
+# with inappropriate data types for the matching variables in its variable
+# list is rejected, with an appropriate error message.
+#- 36. Ensure that the DECLARE ... CONDITION FOR statement can declare a
+# properly-named condition for every possible SQLSTATE and MySQL-specific
+# error code.
+#- 37. Ensure that no two conditions declared with the same scope may have the
+# same condition name.
+## 38. Ensure that the scope of every condition declared is properly applied.
+#- 39. Ensure that every SQLSTATE value declared with a DECLARE ... CONDITION
+# FOR statement is a character string that is 5 characters long.
+#- 40. Ensure that the DECLARE ... CONDITION FOR statement cannot declare a
+# condition for an invalid SQLSTATE.
+#- 41. Ensure that the DECLARE ... CONDITION FOR statement cannot declare a
+# condition for the “successful completion SQLSTATE: “00000“.
+#- 42. Ensure that the DECLARE ... HANDLER FOR statement can declare a CONTINUE,
+# EXIT, and UNDO handler for every condition declared (with a DECLARE ...
+# CONDITION FOR statement), within the scope of the handler, for a stored
+# procedure, as well as for every possible SQLSTATE and MySQL-specific
+# error code, as well as for the predefined conditions SQLWARNING,
+# NOT FOUND, and SQLEXCEPTION.
+## 43. Ensure that the DECLARE ... HANDLER FOR statement can not declare any
+# handler for a condition declared outside of the scope of the handler.
+## 44. Ensure that the DECLARE ... HANDLER FOR statement cannot declare a
+# handler for any invalid, or undeclared, condition.
+## 45. Ensure that the scope of every handler declared is properly applied.
+#- 46. Ensure that, within the same scope, no two handlers may be declared for
+# the same condition.
+#- 47. Ensure that every SQLSTATE value declared with a DECLARE ... HANDLER FOR
+# statement is a character string that is 5 characters long.
+#- 48. Ensure that the DECLARE ... HANDLER FOR statement cannot declare a
+# condition for an invalid SQLSTATE.
+#- 49. Ensure that the DECLARE ... HANDLER FOR statement cannot declare a
+# condition for the “successful completion SQLSTATE: “00000“.
+## 50. Ensure that a CONTINUE handler allows the execution of the stored
+# procedure to continue once the handler statement has completed its
+# own execution (that is, once the handler action statement has been
+# executed).
+## 51. Ensure that an EXIT handler causes the execution of the stored procedure
+# to terminate, within its scope, once the handler action statement has
+# been executed.
+## 52. Ensure that an EXIT handler does not cause the execution of the stored
+# procedure to terminate outside of its scope.
+#- 53. Ensure that a handler condition of SQLWARNING takes the same action as
+# a handler condition defined with an SQLSTATE that begins with “01“.
+## 54. Ensure that a handler with a condition defined with an SQLSTATE that
+# begins with “01“ is always exactly equivalent in action to a
+# handler with an SQLWARNING condition.
+#- 55. Ensure that a handler condition of NOT FOUND takes the same action as a
+# handler condition defined with an SQLSTATE that begins with “02“.
+## 56. Ensure that a handler with a condition defined with an SQLSTATE that
+# begins with “02“ is always exactly equivalent in action to a
+# handler with a NOT FOUND condition.
+#- 57. Ensure that a handler condition of SQLEXCEPTION takes the same action
+# as a handler condition defined with an SQLSTATE that begins with
+# anything other that “01“ or “02“.
+## 58. Ensure that a handler with a condition defined with an SQLSTATE that
+# begins with anything other that “01“ or “02“ is always
+# exactly equivalent in action to a handler with an SQLEXCEPTION condition.
+#- 59. Ensure that no two cursors in a stored procedure can have the same name.
+#- 60. Ensure that a cursor declaration may not include a SELECT ... INTO
+# statement.
+#- 61. Ensure that a cursor declaration that includes an ORDER BY clause may
+# not be an updatable cursor.
+#- 62. Ensure that OPEN <cursor name> fails unless a cursor with the same name
+# has already been declared.
+#- 63. Ensure that OPEN <cursor name> fails if the same cursor is currently
+# already open.
+#- 64. Ensure that FETCH <cursor name> fails unless a cursor with the same name
+# is already open.
+## 65. Ensure that FETCH <cursor name> returns the first row of the cursor’s
+# result set the first time FETCH is executed, that it returns each
+# subsequent row of the cursor’s result set each of the subsequent
+# times FETCH is executed, and that it returns a NOT FOUND warning if it
+# is executed after the last row of the cursor’s result set has already
+# been fetched.
+#- 66. Ensure that FETCH <cursor name> fails with an appropriate error message
+# if it is executed before the cursor has been opened.
+#- 67. Ensure that FETCH <cursor name> fails with an appropriate error message
+# if it is executed after the cursor has been closed.
+## 68. Ensure that FETCH <cursor name> fails with an appropriate error message
+# if the number of columns to be fetched does not match the number of
+# variables specified by the FETCH statement.
+#- 69. Ensure that FETCH <cursor name> fails with an appropriate error message
+# if the data type of the column values being fetched are not appropriate
+# for the matching FETCH variables to which the data is being assigned.
+#- 70. Ensure that CLOSE <cursor name> fails unless a cursor with the same name
+# is already open.
+#- 71. Ensure that all cursors are closed when a transaction terminates with
+# a COMMIT statement.
+#- 72. Ensure that all cursors are closed when a transaction terminates with
+# a ROLLBACK statement.
+#- 73. Ensure that the result set of a cursor that has been closed is not
+# longer available to the FETCH statement.
+#- 74. Ensure that every cursor declared within a compound statement is closed
+# when that compound statement ends.
+## 75. Ensure that, for nested compound statements, a cursor that was declared
+# and opened during an outer level of the statement is not closed when an
+# inner level of a compound statement ends.
+## 76. Ensure that all cursors operate asensitively, so that there is no
+# concurrency conflict between cursors operating on the same, or similar,
+# sets of results during execution of one or more stored procedures.
+# 77. Ensure that multiple cursors, nested within multiple compound statements
+# within a stored procedure, always act correctly and return the
+# expected result.
+#
+# ==============================================================================
+let $message= Section 3.1.2 - Syntax checks for the stored procedure-specific
+programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE:;
+--source include/show_msg80.inc
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.8:;
+--source include/show_msg.inc
+let $message=
+Ensure that the scope of each BEGIN/END compound statement within a stored
+procedure definition is properly applied;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp1( )
+begin_label: BEGIN
+ declare x char DEFAULT 'x';
+ declare y char DEFAULT 'y';
+ set x = '1';
+ set y = '2';
+ label1: BEGIN
+ declare x char DEFAULT 'X';
+ declare y char DEFAULT 'Y';
+ SELECT f1, f2 into x, y from t2 limit 1;
+ SELECT '1.1', x, y;
+ label2: BEGIN
+ declare x char default 'a';
+ declare y char default 'b';
+ label3: BEGIN
+ declare x char default 'c';
+ declare y char default 'd';
+ label4: BEGIN
+ declare x char default 'e';
+ declare y char default 'f';
+ label5: BEGIN
+ declare x char default 'g';
+ declare y char default 'h';
+ SELECT 5, x, y;
+ END label5;
+ SELECT 4, x, y;
+ END label4;
+ SELECT 3, x, y;
+ END label3;
+ SELECT 2, x, y;
+ END label2;
+ END label1;
+ set @v1 = x;
+ set @v2 = y;
+ SELECT '1.2', @v1, @v2;
+END begin_label//
+delimiter ;//
+
+CALL sp1();
+
+#cleanup
+DROP PROCEDURE IF EXISTS sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.26:;
+--source include/show_msg.inc
+let $message=
+Ensure that the initial value of every variable declared for a stored procedure
+is either NULL or its DEFAULT value, as appropriate.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+set @v1=0;
+set @v2=0;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x1 char default 'x';
+ declare y1 char;
+ declare x2 tinytext default 'tinytext';
+ declare y2 tinytext;
+ declare x3 datetime default '2005-10-03 12:13:14';
+ declare y3 datetime;
+ declare x4 float default 1.2;
+ declare y4 float;
+ declare x5 blob default 'b';
+ declare y5 blob;
+ declare x6 smallint default 127;
+ declare y6 smallint;
+ SELECT x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.30:;
+--source include/show_msg.inc
+let $message=
+Ensure that, when a stored procedure is called/executed, every variable always
+uses the correct value: either the value with which it is initialized or the
+value to which it is subsequently SET or otherwise assigned, as appropriate.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( IN invar INT, OUT outvar INT )
+BEGIN
+ declare x integer;
+ declare y integer default 1;
+ set @x = x;
+ set @y = y;
+ set @z = 234;
+ SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1;
+ SELECT @x, @y, @z, invar;
+ BEGIN
+ set @x = 2;
+ SELECT @x, @y, @z;
+ SET outvar = @x * invar + @z * @f;
+ SET invar = outvar;
+ BEGIN
+ set @y = null, @z = 'abcd';
+ SELECT @x, @y, @z;
+ END;
+ END;
+END//
+delimiter ;//
+
+SET @invar = 100;
+SET @outvar = @invar;
+SET @f = 10;
+
+SELECT @x, @y, @z, @invar, @outvar;
+
+CALL sp1( @invar, @outvar );
+
+SELECT @x, @y, @z, @invar, @outvar;
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.31:;
+--source include/show_msg.inc
+let $message=
+Ensure that the SELECT ... INTO statement properly assigns values to the
+variables in its variable list.;
+--source include/show_msg80.inc
+# also tested in a lot of other testcases
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x integer; declare y integer;
+ set @x=x;
+ set @y=y;
+ SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1;
+ SELECT @x, @y;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup 3.1.2.31
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.32:;
+--source include/show_msg.inc
+let $message=
+Ensure that a SELECT ... INTO statement that retrieves multiple rows is
+rejected, with an appropriate error message.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x integer; declare y integer;
+ set @x=x;
+ set @y=y;
+ SELECT f4, f3 into @x, @y from t2;
+END//
+delimiter ;//
+
+# Error: SQLSTATE: 42000 (ER_TOO_MANY_ROWS)
+# Message: Result consisted of more than one row
+--error ER_TOO_MANY_ROWS
+CALL sp1();
+
+# cleanup 3.1.2.32
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.33:;
+--source include/show_msg.inc
+let $message=
+Ensure that a SELECT ... INTO statement that retrieves too many columns for the
+number of variables in its variable list is rejected, with an appropriate error
+message.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x integer; declare y integer;
+ set @x=x;
+ set @y=y;
+ SELECT f4, f3, f2, f1 into @x, @y from t2;
+END//
+delimiter ;//
+
+--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
+CALL sp1();
+
+# cleanup 3.1.2.33
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.34:;
+--source include/show_msg.inc
+let $message=
+Ensure that a SELECT ... INTO statement that retrieves too few columns for the
+number of variables in its variable list is rejected, with an appropriate error
+message.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x integer; declare y integer; declare z integer;
+ set @x=x;
+ set @y=y;
+ set @z=z;
+ SELECT f4 into @x, @y, @z from t2;
+END//
+delimiter ;//
+
+--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
+CALL sp1();
+
+# cleanup 3.1.2.34
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.38:;
+--source include/show_msg.inc
+let $message=
+Ensure that the scope of every condition declared is properly applied.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+--enable_warnings
+
+create table res_t1(w char unique, x char);
+
+insert into res_t1 values('a', 'b');
+
+# Error: SQLSTATE: 20000 (ER_SP_CASE_NOT_FOUND)
+# Message: Case not found for CASE statement
+# Error: SQLSTATE: 23000 (ER_DUP_KEY)
+# Message: Can't write; duplicate key in table '%s'
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare x1, x2, x3, x4, x5, x6 int default 0;
+ SELECT '-1-', x1, x2, x3, x4, x5, x6;
+ BEGIN
+ declare condname condition for sqlstate '23000';
+ declare continue handler for condname set x5 = 1;
+ set x6 = 0;
+ insert into res_t1 values ('a', 'b');
+ set x6 = 1;
+ SELECT '-2-', x1, x2, x3, x4, x5, x6;
+ END;
+ begin1_label: BEGIN
+ BEGIN
+ declare condname condition for sqlstate '20000';
+ declare continue handler for condname set x1 = 1;
+ set x2 = 0;
+ case x2
+ when 1 then set x2=10;
+ when 2 then set x2=11;
+ END case;
+ set x2 = 1;
+ SELECT '-3-', x1, x2, x3, x4, x5, x6;
+ begin2_label: BEGIN
+ BEGIN
+ declare condname condition for sqlstate '23000';
+ declare exit handler for condname set x3 = 1;
+ set x4= 1;
+ SELECT '-4a', x1, x2, x3, x4, x5, x6;
+ insert into res_t1 values ('a', 'b');
+ set x4= 2;
+ SELECT '-4b', x1, x2, x3, x4, x5, x6;
+ END;
+ SELECT '-5-', x1, x2, x3, x4, x5, x6;
+ END begin2_label;
+ SELECT '-6-', x1, x2, x3, x4, x5, x6;
+ END;
+ SELECT '-7-', x1, x2, x3, x4, x5, x6;
+ END begin1_label;
+ SELECT 'END', x1, x2, x3, x4, x5, x6;
+END//
+delimiter ;//
+
+CALL h1();
+
+# and a 2nd test
+--disable_warnings
+DROP TABLE IF EXISTS tnull;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+CREATE TABLE tnull(f1 int);
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '42S02';
+ declare continue handler for cond1 set @var2 = 1;
+ BEGIN
+ declare cond1 condition for sqlstate '23000';
+ declare continue handler for cond1 set @var2 = 1;
+ END;
+ insert into tnull values(1);
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup 3.1.2.38
+DROP PROCEDURE h1;
+drop table res_t1;
+DROP PROCEDURE sp1;
+DROP TABLE tnull;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.43:;
+--source include/show_msg.inc
+let $message=
+Ensure that the DECLARE ... HANDLER FOR statement can not declare any handler
+for a condition declared outside of the scope of the handler.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS h2;
+drop table IF EXISTS res_t1;
+--enable_warnings
+
+create table res_t1(w char unique, x char);
+insert into res_t1 values ('a', 'b');
+
+delimiter //;
+--error ER_SP_COND_MISMATCH
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare x1, x2, x3, x4, x5, x6 int default 0;
+ BEGIN
+ declare cond_1 condition for sqlstate '23000';
+ declare continue handler for cond_1 set x5 = 1;
+ BEGIN
+ declare cond_2 condition for sqlstate '20000';
+ declare continue handler for cond_1 set x1 = 1;
+ BEGIN
+ declare continue handler for cond_2 set x3 = 1;
+ set x2 = 1;
+ END;
+ set x6 = 0;
+ END;
+ BEGIN
+ declare continue handler for cond_1 set x1 = 1;
+ BEGIN
+ declare continue handler for cond_2 set x3 = 1;
+ set x2 = 1;
+ END;
+ set x6 = 0;
+ END;
+ END;
+ SELECT x1, x2, x3, x4, x5, x6;
+END//
+
+CREATE PROCEDURE h2 ()
+BEGIN
+ declare x1, x2, x3, x4, x5, x6 int default 0;
+ BEGIN
+ declare condname condition for sqlstate '23000';
+ declare continue handler for condname set x5 = 1;
+ BEGIN
+ declare condname condition for sqlstate '20000';
+ declare continue handler for condname set x1 = 1;
+ BEGIN
+ declare condname condition for sqlstate '42000';
+ declare continue handler for condname set x3 = 1;
+ set x6 = 0;
+ insert into res_t1 values ('a', 'b');
+ set x6 = 1;
+ set x4= 0;
+ CALL sp1();
+ set x4= 1;
+ set x2 = 0;
+ case x2
+ when 1 then set x2=10;
+ when 2 then set x2=11;
+ END case;
+ set x2 = 1;
+ END;
+ set x2 = 0;
+ case x2
+ when 1 then set x2=10;
+ when 2 then set x2=11;
+ END case;
+ set x2 = 1;
+ set x6 = 0;
+ insert into res_t1 values ('a', 'b');
+ set x6 = 1;
+ END;
+ END;
+ SELECT x1, x2, x3, x4, x5, x6;
+END//
+delimiter ;//
+
+CALL h2();
+SELECT * FROM res_t1;
+
+# cleanup 3.1.2.43
+DROP PROCEDURE h2;
+drop table res_t1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.44:;
+--source include/show_msg.inc
+let $message=
+Ensure that the DECLARE ... HANDLER FOR statement cannot declare a handler for
+any invalid, or undeclared, condition.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+--enable_warnings
+
+delimiter //;
+# Error: SQLSTATE: 42000 (ER_SP_COND_MISMATCH)
+# Message: Undefined CONDITION: %s
+--error ER_SP_COND_MISMATCH
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare x1, x2, x3, x4, x5, x6 int default 0;
+ BEGIN
+ declare condname1 condition for sqlstate '23000';
+ BEGIN
+ declare condname2 condition for sqlstate '20000';
+ declare continue handler for condname1 set x3 = 1;
+ declare continue handler for condname2 set x1 = 1;
+ END;
+ END;
+ BEGIN
+ declare condname3 condition for sqlstate '42000';
+ declare continue handler for condname1 set x3 = 1;
+ declare continue handler for condname2 set x5 = 1;
+ declare continue handler for condname3 set x1 = 1;
+ END;
+END//
+
+# Error: SQLSTATE: 42000 (ER_PARSE_ERROR)
+# Message: %s near '%s' at line %d
+--error ER_PARSE_ERROR
+CREATE PROCEDURE h1 ()
+BEGIN
+ DECLARE x1 INT DEFAULT 0;
+ BEGIN
+ DECLARE condname1 CONDITION CHECK SQLSTATE '23000';
+ END;
+ DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
+END//
+
+# Error: SQLSTATE: 42000 (ER_SP_BAD_SQLSTATE)
+# Message: Bad SQLSTATE: '%s'
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE h1 ()
+BEGIN
+ DECLARE x1 INT DEFAULT 0;
+ BEGIN
+ DECLARE condname1 CONDITION FOR SQLSTATE 'qwert';
+ END;
+ DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
+END//
+delimiter ;//
+
+# cleanup 3.1.2.44
+#DROP PROCEDURE h1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.45 + 3.1.2.50:;
+--source include/show_msg.inc
+let $message=
+45. Ensure that the scope of every handler declared is properly applied.
+50. Ensure that a CONTINUE handler allows the execution of the stored procedure
+. to continue once the handler statement has completed its own execution (that
+. is, once the handler action statement has been executed).;
+--source include/show_msg80.inc
+
+# RefMan: For an EXIT handler, execution of the current BEGIN...END compound
+# statement is terminated.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p1undo;
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+drop table IF EXISTS res_t1;
+--enable_warnings
+
+--echo ==> 'UNDO' is still not supported.
+delimiter //;
+--error ER_PARSE_ERROR
+create procedure p1undo ()
+begin
+ declare undo handler for sqlexception select '1';
+ select * from tqq;
+ SELECT 'end of 1';
+end;//
+
+create procedure p1 ()
+begin
+ declare exit handler for sqlexception select 'exit handler 1';
+ begin
+ declare exit handler for sqlexception select 'exit handler 2';
+ begin
+ declare continue handler for sqlexception select 'continue handler 3';
+ drop table if exists tqq;
+ select * from tqq;
+ SELECT 'end of BEGIN/END 3';
+ end;
+ drop table if exists tqq;
+ select * from tqq;
+ SELECT 'end of BEGIN/END 2';
+ end;
+ select * from tqq;
+ SELECT 'end of BEGIN/END 1';
+end;//
+
+call p1()//
+delimiter ;//
+
+create table res_t1(w char unique, x char);
+insert into res_t1 values ('a', 'b');
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare x1, x2, x3, x4, x5, x6 int default 0;
+ BEGIN
+ declare continue handler for sqlstate '23000' set x5 = 1;
+ insert into res_t1 values ('a', 'b');
+ set x6 = 1;
+ END;
+ begin1_label: BEGIN
+ BEGIN
+ declare continue handler for sqlstate '23000' set x1 = 1;
+ insert into res_t1 values ('a', 'b');
+ set x2 = 1;
+ begin2_label: BEGIN
+ BEGIN
+ declare exit handler for sqlstate '23000' set x3 = 1;
+ set x4= 1;
+ insert into res_t1 values ('a', 'b');
+ set x4= 0;
+ END;
+ END begin2_label;
+ END;
+ END begin1_label;
+ SELECT x1, x2, x3, x4, x5, x6;
+END//
+delimiter ;//
+
+CALL h1();
+
+--echo This will fail, SQLSTATE 00000 is not allowed
+--ERROR ER_SP_BAD_SQLSTATE
+delimiter //;
+CREATE PROCEDURE sp1()
+ begin1_label:BEGIN
+ declare exit handler for sqlstate '00000' set @var1 = 5;
+ set @var2 = 6;
+ begin2_label:BEGIN
+ declare continue handler for sqlstate '00000' set @var3 = 7;
+ set @var4 = 8;
+ SELECT @var3, @var4;
+ END begin2_label;
+ SELECT @var1, @var2;
+ END begin1_label//
+delimiter ;//
+
+--echo Verify SP wasn't created
+--ERROR ER_SP_DOES_NOT_EXIST
+CALL sp1();
+
+# cleanup 3.1.2.45+50
+DROP PROCEDURE p1;
+DROP PROCEDURE h1;
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+DROP TABLE res_t1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.50:;
+--source include/show_msg.inc
+
+# Testcase: Ensure that a continue handler allows the execution of the stored procedure
+# to continue once the handler statement has completed its own execution
+# (that is, once the handler action statement has been executed).
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @y=0;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE sp2 ()
+BEGIN
+ declare continue handler for sqlstate '42000' set @x2 = 1;
+ set @x=1;
+ SELECT @x2;
+ CALL sp1(1);
+ set @x=2;
+ SELECT @x2, @x;
+END//
+delimiter ;//
+
+CALL sp2();
+
+# cleanup
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.2.2.51:;
+--source include/show_msg.inc
+let $message=
+Ensure that an EXIT handler causes the execution of the stored procedure to
+terminate, within its scope, once the handler action statement has been
+executed.;
+--source include/show_msg80.inc
+# also tested in 3.1.2.45
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @x=0;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE sp2 ()
+BEGIN
+ declare exit handler for sqlstate '42000' set @x2 = 1;
+ set @x2=0;
+ set @x=1;
+ SELECT '-1-', @x2, @x;
+ CALL sp1(1);
+ SELECT '-2-', @x2, @x;
+ set @x=2;
+END//
+delimiter ;//
+
+# Error: SQLSTATE: 42000 (ER_SP_WRONG_NO_OF_ARGS)
+# Message: Incorrect number of arguments for %s %s; expected %u, got %u
+--error ER_SP_WRONG_NO_OF_ARGS
+CALL sp1(1);
+CALL sp2();
+SELECT '-3-', @x2, @x;
+
+# cleanup 3.1.2.51
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.52:;
+--source include/show_msg.inc
+let $message=
+Ensure that an EXIT handler does not cause the execution of the stored procedure
+to terminate outside of its scope.;
+--source include/show_msg80.inc
+# tested also above in
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @x=0;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE sp2()
+BEGIN
+ declare continue handler for sqlstate '42000' set @x2 = 2;
+ set @x2 = 1;
+ set @x =20;
+ SELECT '-1-', @x2, @x;
+ BEGIN
+ declare exit handler for sqlstate '42000' set @x2 = 11;
+ SELECT '-2-', @x2, @x;
+ CALL sp1(1);
+ SELECT '-3a', @x2, @x;
+ set @x=21;
+ SELECT '-3b', @x2, @x;
+ END;
+ set @x=22;
+ SELECT '-4-', @x2, @x;
+END//
+delimiter ;//
+
+CALL sp2();
+
+# cleanup 3.1.2.52
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.54:;
+--source include/show_msg.inc
+let $message=
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+“01“ is always exactly equivalent in action to a handler with an SQLWARNING
+condition.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+DROP TABLE IF EXISTS temp;
+--enable_warnings
+
+CREATE TABLE temp( f1 CHAR, f2 CHAR);
+
+delimiter //;
+# 0 - without handler
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp0()
+BEGIN
+ set @done=0;
+ set @x=0;
+ insert into temp values('xxx', 'yy');
+ set @x=1;
+END//
+
+# 1st one with SQLSTATE + CONTINUE
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '01000' set @done = 1;
+ set @done=0;
+ set @x=0;
+ insert into temp values('xxx', 'yy');
+ set @x=1;
+END//
+
+# 2nd one with SQLWARNING + CONTINUE
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp2()
+BEGIN
+ declare continue handler for sqlwarning set @done = 1;
+ set @done=0;
+ set @x=0;
+ insert into temp values('xxx', 'yy');
+ set @x=1;
+END//
+
+# 3 with SQLSTATE + EXIT
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp3()
+BEGIN
+ declare exit handler for sqlstate '01000' set @done = 1;
+ set @done=0;
+ set @x=0;
+ insert into temp values('xxx', 'yy');
+ set @x=1;
+END//
+
+# 4 with SQLWARNING + EXIT
+SET STATEMENT sql_mode = '' FOR
+CREATE PROCEDURE sp4()
+BEGIN
+ declare exit handler for sqlwarning set @done = 1;
+ set @done=0;
+ set @x=0;
+ insert into temp values('xxx', 'yy');
+ set @x=1;
+END//
+delimiter ;//
+
+INSERT INTO temp VALUES('0', NULL);
+CALL sp0();
+SELECT @done, @x;
+
+INSERT INTO temp VALUES('1', NULL);
+CALL sp1();
+SELECT @done, @x;
+
+INSERT INTO temp VALUES('2', NULL);
+CALL sp2();
+SELECT @done, @x;
+
+INSERT INTO temp VALUES('3', NULL);
+CALL sp3();
+SELECT @done, @x;
+
+INSERT INTO temp VALUES('4', NULL);
+CALL sp4();
+SELECT @done, @x;
+
+SELECT * FROM temp;
+
+# cleanup 3.1.2.54
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+DROP TABLE temp;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.56:;
+--source include/show_msg.inc
+let $message=
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+“02“ is always exactly equivalent in action to a handler with a NOT FOUND
+condition.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+# 0 - wihtout handler
+CREATE PROCEDURE sp0()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ SET @done = 0;
+ SET @x = 0;
+ OPEN cur1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 2;
+ CLOSE cur1;
+END//
+
+# 1st one with SQLSTATE + CONTINUE
+CREATE PROCEDURE sp1()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ declare continue handler for sqlstate '02000' set @done = 1;
+ SET @done = 0;
+ SET @x = 0;
+ OPEN cur1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 2;
+ CLOSE cur1;
+END//
+
+# 2nd one with NOT FOUND + CONTINUE
+CREATE PROCEDURE sp2()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ declare continue handler for not found set @done = 1;
+ SET @done = 0;
+ SET @x = 0;
+ OPEN cur1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 2;
+ CLOSE cur1;
+END//
+
+# 3 with SQLSTATE + EXIT
+CREATE PROCEDURE sp3()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ declare exit handler for sqlstate '02000' set @done = 1;
+ SET @done = 0;
+ SET @x = 0;
+ OPEN cur1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 2;
+ CLOSE cur1;
+END//
+
+# 4 with NOT FOUND + EXIT
+CREATE PROCEDURE sp4()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ declare exit handler for not found set @done = 1;
+ SET @done = 0;
+ SET @x = 0;
+ OPEN cur1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 1;
+ FETCH cur1 INTO f1_value;
+ SET @x = 2;
+ CLOSE cur1;
+END//
+delimiter ;//
+
+--error ER_SP_FETCH_NO_DATA
+CALL sp0();
+SELECT @done, @x;
+
+CALL sp1();
+SELECT @done, @x;
+
+CALL sp2();
+SELECT @done, @x;
+
+CALL sp3();
+SELECT @done, @x;
+
+CALL sp4();
+SELECT @done, @x;
+
+# cleanup 3.1.2.56
+DROP PROCEDURE sp0;
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.58:;
+--source include/show_msg.inc
+let $message=
+Ensure that a handler with a condition defined with an SQLSTATE that begins with
+anything other that “01“ or “02“ is always exactly equivalent in action to a
+handler with an SQLEXCEPTION condition.;
+--source include/show_msg80.inc
+
+# Error: SQLSTATE: 20000 (ER_SP_CASE_NOT_FOUND)
+# Message: Case not found for CASE statement
+# Error: SQLSTATE: 21000 (ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT)
+# Message: The used SELECT statements have a different number of columns
+# Error: SQLSTATE: 24000 (ER_SP_CURSOR_NOT_OPEN)
+# Message: Cursor is not open
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp0;
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+DROP PROCEDURE IF EXISTS sp3;
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+# 0 - without handler
+CREATE PROCEDURE sp0()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cv INT DEFAULT 0;
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ SET @x = 1;
+ CASE cv
+ WHEN 2 THEN SET @x = 2;
+ WHEN 3 THEN SET @x = 3;
+ END case;
+ SET @x = 4;
+ SELECT f1, f2 FROM t2
+ UNION
+ SELECT f1, f2,3 FROM t2;
+ SET @x = 5;
+ FETCH cur1 INTO f1_value;
+ SET @x = 6;
+END//
+
+# 1 - SQLSTATEs - CONTINUE
+CREATE PROCEDURE sp1()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cv INT DEFAULT 0;
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ DECLARE continue HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE';
+ DECLARE continue HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE';
+ DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+ SET @x = 1;
+ CASE cv
+ WHEN 2 THEN SET @x = 2;
+ WHEN 3 THEN SET @x = 3;
+ END case;
+ SET @x = 4;
+ SELECT f1, f2 FROM t2
+ UNION
+ SELECT f1, f2,3 FROM t2;
+ SET @x = 5;
+ FETCH cur1 INTO f1_value;
+ SET @x = 6;
+END//
+
+# 2 - SQLEXCEPTION matches 2 of 3 conditions - CONTINUE
+CREATE PROCEDURE sp2()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cv INT DEFAULT 0;
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ DECLARE continue HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE';
+ DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+ SET @x = 1;
+ CASE cv
+ WHEN 2 THEN SET @x = 2;
+ WHEN 3 THEN SET @x = 3;
+ END case;
+ SET @x = 4;
+ SELECT f1, f2 FROM t2
+ UNION
+ SELECT f1, f2,3 FROM t2;
+ SET @x = 5;
+ FETCH cur1 INTO f1_value;
+ SET @x = 6;
+END//
+
+# 3 - SQLSTATEs - EXIT
+CREATE PROCEDURE sp3()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cv INT DEFAULT 0;
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ DECLARE EXIT HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE';
+ DECLARE EXIT HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE';
+ DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+ SET @x = 1;
+ CASE cv
+ WHEN 2 THEN SET @x = 2;
+ WHEN 3 THEN SET @x = 3;
+ END case;
+ SET @x = 4;
+ SELECT f1, f2 FROM t2
+ UNION
+ SELECT f1, f2,3 FROM t2;
+ SET @x = 5;
+ FETCH cur1 INTO f1_value;
+ SET @x = 6;
+END//
+
+# 4 - SQLEXCEPTION matches 2 of 3 conditions - EXIT
+CREATE PROCEDURE sp4()
+BEGIN
+ DECLARE f1_value CHAR(20);
+ DECLARE cv INT DEFAULT 0;
+ DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1;
+ DECLARE EXIT HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE';
+ DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE';
+ SET @x = 1;
+ CASE cv
+ WHEN 2 THEN SET @x = 2;
+ WHEN 3 THEN SET @x = 3;
+ END case;
+ SET @x = 4;
+ SELECT f1, f2 FROM t2
+ UNION
+ SELECT f1, f2,3 FROM t2;
+ SET @x = 5;
+ FETCH cur1 INTO f1_value;
+ SET @x = 6;
+ CLOSE cur1;
+END//
+delimiter ;//
+
+CALL sp0();
+SELECT '-0-', @x;
+
+CALL sp1();
+SELECT '-1-', @x;
+
+CALL sp2();
+SELECT '-2-', @x;
+
+CALL sp3();
+SELECT '-3-', @x;
+
+CALL sp4();
+SELECT '-4-', @x;
+
+# cleanup 3.1.2.58
+DROP PROCEDURE sp0;
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+DROP PROCEDURE sp3;
+DROP PROCEDURE sp4;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.65:;
+--source include/show_msg.inc
+let $message=
+Ensure that FETCH <cursor name> returns the first row of the cursor_s result set
+the first time FETCH is executed, that it returns each subsequent row of the
+cursor_s result set each of the subsequent times FETCH is executed, and that it
+returns a NOT FOUND warning if it is executed after the last row of the cursor_s
+result set has already been fetched.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS temp;
+--enable_warnings
+
+CREATE TABLE temp(
+ cnt INT,
+ f1 CHAR(20),
+ f2 CHAR(20),
+ f3 INT,
+ f4 CHAR(20),
+ f5 INT);
+
+INSERT INTO temp VALUES(0, 'onip', 'abc', 8760, 'xyz', 10);
+
+# NOT used: declare continue handler for sqlstate '02000' set proceed=0;
+# --> warning is shown when procedure is executed.
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare proceed int default 1;
+ declare count integer default 1;
+ declare f1_value char(20);
+ declare f2_value char(20);
+ declare f5_value char(20);
+ declare f4_value integer;
+ declare f6_value integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2
+ where f4 >=-5000 order by f4 limit 3;
+ open cur1;
+ while proceed do
+ SELECT count AS 'loop';
+ fetch cur1 into f1_value, f2_value, f4_value, f5_value, f6_value;
+ insert into temp values (count, f1_value, f2_value, f4_value, f5_value, f6_value);
+ set count = count + 1;
+ END while;
+END//
+delimiter ;//
+
+--error ER_SP_FETCH_NO_DATA
+CALL sp1();
+
+SELECT * FROM temp;
+
+# cleanup 3.1.2.65
+DROP TABLE temp;
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.68:;
+--source include/show_msg.inc
+let $message=
+Ensure that FETCH <cursor name> fails with an appropriate error message if the
+number of columns to be fetched does not match the number of variables specified
+by the FETCH statement.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp2;
+--enable_warnings
+
+delimiter //;
+--echo --> not enough columns in FETCH statement
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare newf1 char(20);
+ declare cur1 cursor for SELECT f1, f2 from t2 limit 10;
+ declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS '';
+ BEGIN
+ open cur1;
+ fetch cur1 into newf1;
+ SELECT newf1;
+ close cur1;
+ END;
+END//
+
+--echo --> too many columns in FETCH statement
+CREATE PROCEDURE sp2( )
+BEGIN
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare cur1 cursor for SELECT f1 from t2 limit 10;
+ declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS '';
+ BEGIN
+ open cur1;
+ fetch cur1 into newf1, newf2;
+ SELECT newf1, newf2;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+--echo --> not enough columns in FETCH statement
+--error ER_SP_WRONG_NO_OF_FETCH_ARGS
+CALL sp1();
+
+--echo --> too many columns in FETCH statement
+--error ER_SP_WRONG_NO_OF_FETCH_ARGS
+CALL sp2();
+
+# cleanup 3.1.2.68
+DROP PROCEDURE sp1;
+DROP PROCEDURE sp2;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.75:;
+--source include/show_msg.inc
+let $message=
+Ensure that, for nested compound statements, a cursor that was declared and
+opened during an outer level of the statement is not closed when an inner level
+of a compound statement ends.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS temp1;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) );
+
+# Error: SQLSTATE: 02000 (ER_SP_FETCH_NO_DATA)
+# Message: No data to FETCH
+
+SELECT f1, f2, f4, f5 from t2 order by f4;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare count integer;
+ declare from0 char(20);
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf5 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
+ declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
+ open cur1;
+ open cur2;
+ BEGIN
+ declare continue handler for sqlstate '02000' set count = 1;
+ fetch cur1 into newf1, newf2, newf4, newf5;
+ SELECT '-1-', count, newf1, newf2, newf4, newf5;
+ insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
+ set count = 4;
+ BEGIN
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf5;
+ SELECT '-2-', count, newf1, newf2, newf4, newf5;
+ set count = count - 1;
+ END while;
+ SELECT '-3-', count, newf1, newf2, newf4, newf4;
+ END;
+ BEGIN
+ fetch cur1 into newf1, newf2, newf4, newf5;
+ SELECT '-4-', newf1, newf2, newf4, newf5;
+ insert into temp1 values ('cur1_in', newf1, newf2, newf4, newf5);
+ END;
+ fetch cur2 into newf1, newf2, newf4, newf5;
+ SELECT '-5-', newf1, newf2, newf4, newf5;
+ insert into temp1 values ('cur2', newf1, newf2, newf4, newf5);
+ close cur1;
+ END;
+ fetch cur2 into newf1, newf2, newf4, newf5;
+ SELECT '-6-', newf1, newf2, newf4, newf5;
+ close cur2;
+END//
+delimiter ;//
+
+CALL sp1();
+
+SELECT * from temp1;
+
+# cleanup 3.1.2.75
+DROP PROCEDURE sp1;
+drop table temp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.2.76:;
+--source include/show_msg.inc
+let $message=
+Ensure that all cursors operate asensitively, so that there is no concurrency
+conflict between cursors operating on the same, or similar, sets of results
+during execution of one or more stored procedures.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+drop table IF EXISTS temp1;
+drop table IF EXISTS temp2;
+--enable_warnings
+
+create table temp1( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer );
+create table temp2( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer );
+
+delimiter //;
+CREATE PROCEDURE sp_inner( )
+BEGIN
+ declare proceed int default 1;
+ declare i_count integer default 20;
+ declare i_newf1 char(20);
+ declare i_newf2 char(20);
+ declare i_newf3 date;
+ declare i_newf4 integer;
+ declare i_newf11 char(20);
+ declare i_newf12 char(20);
+ declare i_newf13 date;
+ declare i_newf14 integer;
+ declare cur1 cursor for SELECT f1, f2, f3, f4 from t2
+ where f4>=-5000 order by f4 limit 4;
+ declare cur2 cursor for SELECT f1, f2, f3, f4 from t2
+ where f4>=-5000 order by f4 limit 3;
+ declare continue handler for sqlstate '02000' set proceed=0;
+ open cur1;
+ open cur2;
+ set i_count = 10;
+ while proceed do
+ fetch cur1 into i_newf1, i_newf2, i_newf3, i_newf4;
+ IF proceed THEN
+ insert into temp1 values ('sp_inner', i_count, i_newf1, i_newf2, i_newf3, i_newf4);
+ fetch cur2 into i_newf11, i_newf12, i_newf13, i_newf14;
+ IF proceed THEN
+ insert into temp2 values ('sp_inner', i_count, i_newf11, i_newf12, i_newf13, i_newf14);
+ END IF;
+ END IF;
+ set i_count = i_count - 1;
+ END while;
+ close cur1;
+ close cur2;
+END//
+
+CREATE PROCEDURE sp_outer( )
+BEGIN
+ DECLARE proceed INT DEFAULT 1;
+ DECLARE o_count INTEGER DEFAULT 20;
+ DECLARE o_newf1 CHAR(20);
+ DECLARE o_newf2 CHAR(20);
+ DECLARE o_newf3 DATE;
+ DECLARE o_newf4 INTEGER;
+ DECLARE o_newf11 CHAR(20);
+ DECLARE o_newf12 CHAR(20);
+ DECLARE o_newf13 DATE;
+ DECLARE o_newf14 INTEGER;
+ DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
+ WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
+ DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
+ WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0;
+ OPEN cur1;
+ OPEN cur2;
+ SET o_count = 1;
+ WHILE proceed DO
+ FETCH cur1 INTO o_newf1, o_newf2, o_newf3, o_newf4;
+ IF proceed THEN
+ INSERT INTO temp1 VALUES ('_sp_out_', o_count, o_newf1, o_newf2, o_newf3, o_newf4);
+ CALL sp_inner();
+ FETCH cur2 INTO o_newf11, o_newf12, o_newf13, o_newf14;
+ IF proceed THEN
+ INSERT INTO temp2 VALUES ('_sp_out_', o_count, o_newf11, o_newf12, o_newf13, o_newf14);
+ END IF;
+ END IF;
+ SET o_count = o_count + 1;
+ END WHILE;
+ CLOSE cur1;
+ CLOSE cur2;
+END//
+delimiter ;//
+
+CALL sp_outer();
+
+SELECT * FROM temp1;
+SELECT * FROM temp2;
+
+# cleanup 3.1.2.75
+DROP PROCEDURE sp_outer;
+DROP PROCEDURE sp_inner;
+DROP TABLE temp1;
+DROP TABLE temp2;
+
+
+# ==============================================================================
+# USE the same .inc to cleanup before and after the test
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+
+# ==============================================================================
+--echo
+--echo . +++ END OF SCRIPT +++
+--echo --------------------------------------------------------------------------------
+# ==============================================================================
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_03.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_03.inc
new file mode 100644
index 00000000..01810390
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_03.inc
@@ -0,0 +1,496 @@
+#### suite/funcs_1/storedproc/storedproc_03.inc
+#
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+
+# ==============================================================================
+# (numbering from requirement document TP v1.0, Last updated: 25 Jan 2005 01:00)
+#
+# 3.1.3 Syntax checks for the stored procedure-specific flow control statements
+# IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
+#
+#- 1. Ensure that all subclauses that should be supported are supported.
+#- 2. Ensure that all subclauses that should not be supported are disallowed
+# with an appropriate error message.
+#- 3. Ensure that all supported subclauses are supported only in the
+# correct order.
+#- 4. Ensure that an appropriate error message is returned if a subclause is
+# out-of-order in a stored procedure definition.
+#- 5. Ensure that all subclauses that are defined to be mandatory are indeed
+# required to be mandatory by the MySQL server and tools.
+#- 6. Ensure that any subclauses that are defined to be optional are indeed
+# treated as optional by the MySQL server and tools.
+## 7. Ensure that the IF statement acts correctly for all variants, including
+# cases where statements are nested.
+## 8. Ensure that the CASE statement acts correctly for all variants,
+# including cases where statements are nested.
+## 9. Ensure that the LOOP statement acts correctly for all variants,
+# including cases where statements are nested.
+#- 10. Ensure that the labels enclosing each LOOP statement must match.
+#- 11. Ensure that it is possible to put a beginning label at the start of
+# a LOOP statement without also requiring an ending label at the end of
+# the same statement.
+#- 12. Ensure that it is not possible to put an ending label at the end of
+# a LOOP statement without also requiring a matching beginning label
+# at the start of the same statement.
+#- 13. Ensure that every beginning label must end with a colon (:).
+#- 14. Ensure that every beginning label with the same scope must be unique.
+## 15. Ensure that the LEAVE statement acts correctly for all variants,
+# including cases where statements are nested.
+## 16. Ensure that the ITERATE statement acts correctly for all variants,
+# including cases where statements are nested.
+#- 17. Ensure that the ITERATE statement fails, with an appropriate error
+# message, if it appears in any context other than within LOOP, REPEAT,
+# or WHILE statements.
+## 18. Ensure that the REPEAT statement acts correctly for all variants,
+# including cases where statements are nested.
+#- 19. Ensure that the labels enclosing each REPEAT statement must match.
+#- 20. Ensure that it is possible to put a beginning label at the start of
+# a REPEAT statement without also requiring an ending label at the end
+# of the same statement.
+#- 21. Ensure that it is not possible to put an ending label at the end of
+# a REPEAT statement without also requiring a matching beginning label
+# at the start of the same statement.
+#- 22. Ensure that every beginning label must end with a colon (:).
+#- 23. Ensure that every beginning label with the same scope must be unique.
+## 24. Ensure that the WHILE statement acts correctly for all variants,
+# including cases where statements are nested.
+#- 25. Ensure that the labels enclosing each WHILE statement must match.
+#- 26. Ensure that it is possible to put a beginning label at the start of
+# a WHILE statement without also requiring an ending label at the end
+# of the same statement.
+#- 27. Ensure that it is not possible to put an ending label at the end of
+# a WHILE statement without also requiring a matching beginning label
+# at the start of the same statement.
+#- 28. Ensure that every beginning label must end with a colon (:).
+#- 29. Ensure that every beginning label with the same scope must be unique.
+## 30. Ensure that multiple cases of all possible combinations of the control
+# flow statements, nested within multiple compound statements within
+# a stored procedure, always act correctly and return the expected result.
+#
+# ==============================================================================
+let $message= Section 3.1.3 - Syntax checks for the stored procedure-specific flow
+control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:;
+--source include/show_msg80.inc
+
+#FIXME # 3.1.3: enhance syntax checks with very complicated checks
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.3.7:;
+--source include/show_msg.inc
+let $message=
+Ensure that the IF statement acts correctly for all variants, including cases
+where statements are nested.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp9;
+--enable_warnings
+
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+
+delimiter //;
+CREATE PROCEDURE sp9( action char(20), subaction char(20) )
+BEGIN
+ if action = 'action' then
+ if subaction = 'subaction' then
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction' , 1);
+ else
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 2);
+ END if;
+ else
+ if subaction = 'subaction'
+ then
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction' , 3);
+ elseif subaction = 'subaction1'
+ then
+ BEGIN
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values ('none', 'subaction1', 4);
+ END;
+ else
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 5);
+ END if;
+ END if;
+END//
+delimiter ;//
+
+CALL sp9( 'action', 'subaction' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=1;
+
+CALL sp9( 'temp', 'subaction' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=3;
+
+CALL sp9( 'temp', 'subaction1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=4;
+
+CALL sp9( 'action', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=2;
+
+CALL sp9( 'temp', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=5;
+
+# cleanup 3.1.3.7
+DROP PROCEDURE sp9;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.3.8.:;
+--source include/show_msg.inc
+let $message=
+Ensure that the CASE statement acts correctly for all variants, including cases
+where statements are nested.;
+--source include/show_msg80.inc
+
+--disable_warnings
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp10;
+--enable_warnings
+
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+
+delimiter //;
+CREATE PROCEDURE sp10( action char(20), subaction char(20) )
+BEGIN
+ case action
+ when 'action' then
+ case
+ when subaction = 'subaction_1' then
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 1);
+ when subaction = 'subaction_2' then
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 2);
+ else
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 3);
+ END case;
+ else
+ case
+ when subaction = 'subaction_1' then
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_1' , 4);
+ when subaction = 'subaction_2' then
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_2' , 5);
+ else
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 6);
+ END case;
+ END case;
+END//
+delimiter ;//
+
+CALL sp10( 'action', 'subaction_1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+CALL sp10( 'action', 'subaction_2' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+CALL sp10( 'temp', 'subaction_1' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+CALL sp10( 'temp', 'subaction_2' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+CALL sp10( 'action', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+CALL sp10( 'temp', 'temp' );
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+# cleanup 3.1.3.8
+DROP PROCEDURE sp10;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.3.9 + 3.1.3.15:;
+--source include/show_msg.inc
+let $message=
+09. Ensure that the LOOP statement acts correctly for all variants, including
+. cases where statements are nested.
+15. Ensure that the LEAVE statement acts correctly for all variants, including
+. cases where statements are nested.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp11;
+--enable_warnings
+
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+
+delimiter //;
+CREATE PROCEDURE sp11( )
+BEGIN
+ declare count1 integer default 1;
+ declare count2 integer default 1;
+ label1: loop
+ if count2 > 3 then leave label1;
+ END if;
+ set count1 = 1;
+ label2: loop
+ if count1 > 4 then leave label2;
+ END if;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ set count1 = count1 + 1;
+ iterate label2;
+ END loop label2;
+ set count2 = count2 + 1;
+ iterate label1;
+ END loop label1;
+END//
+delimiter ;//
+
+CALL sp11();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+# cleanup 3.1.3.9
+DROP PROCEDURE sp11;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.3.16:;
+--source include/show_msg.inc
+let $message=
+Ensure that the ITERATE statement acts correctly for all variants, including
+cases where statements are nested.
+(tests for this testcase are also included in other testcases);
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp31316;
+--enable_warnings
+
+delimiter //;
+
+# wrong label at iterate
+# Error: SQLSTATE: 42000 (ER_SP_LILABEL_MISMATCH)
+# Message: %s with no matching label: %s
+--error ER_SP_LILABEL_MISMATCH
+CREATE PROCEDURE sp31316( )
+BEGIN
+ declare count1 integer default 1;
+ declare count2 integer default 1;
+ label1: loop
+ if count2 > 3 then leave label1;
+ END if;
+ set count1 = 1;
+ label2: loop
+ if count1 > 4 then leave label2;
+ END if;
+ insert into temp values( count1, count2);
+ set count1 = count1 + 1;
+ iterate label3;
+ END loop label2;
+ set count2 = count2 + 1;
+ iterate label1;
+ END loop label1;
+END//
+delimiter ;//
+
+# cleanup 3.1.3.16
+#DROP PROCEDURE sp31316;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.3.18:;
+--source include/show_msg.inc
+let $message=
+Ensure that the REPEAT statement acts correctly for all variants, including
+cases where statements are nested.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp17;
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+--enable_warnings
+
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
+
+delimiter //;
+CREATE PROCEDURE sp17( )
+BEGIN
+ declare count1 integer default 1;
+ declare count2 integer default 1;
+ repeat
+ set count1 = count1 + 1;
+ set count2 = 1;
+ label1: repeat
+ set count2 = count2 + 1;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ until count2 > 3
+ END repeat label1;
+ until count1 > 3
+ END repeat;
+END//
+delimiter ;//
+
+CALL sp17();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+# cleanup 3.1.3.18
+DROP PROCEDURE sp17;
+DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.3.24:;
+--source include/show_msg.inc
+let $message=
+Ensure that the WHILE statement acts correctly for all variants, including cases
+where statements are nested.;
+--source include/show_msg80.inc
+
+--disable_warnings
+drop table IF EXISTS res_t21;
+DROP PROCEDURE IF EXISTS sp21;
+--enable_warnings
+
+create table res_t21(name text(10), surname blob(20), age_averylongfieldname_averylongname_1234569 smallint);
+insert into res_t21 values('ashwin', 'mokadam', 25);
+
+delimiter //;
+CREATE PROCEDURE sp21( )
+BEGIN
+ declare count1 integer default 0;
+ declare count2 integer default 0;
+ while count1 < 3 do
+ BEGIN
+ declare ithisissamevariablename int default 100;
+ SELECT ithisissamevariablename;
+ BEGIN
+ declare ithisissamevariablename int default 200;
+ SELECT ithisissamevariablename;
+ END;
+ set count2 = 0;
+ label1: while count2 < 3 do
+ BEGIN
+ declare count1 integer default 7;
+ set count2 = count2 + 1;
+ insert into res_t21 values( 'xyz' , 'pqr', count2);
+ label2: while count1 < 10 do
+ set count1 = count1 + 1;
+ insert into res_t21 values( 'xyz' , 'pqr', count1);
+ END while label2;
+ END;
+ END while label1;
+ set count1 = count1 + 1;
+ END;
+ END while;
+END//
+delimiter ;//
+
+CALL sp21();
+SELECT * from res_t21;
+
+# cleanup 3.1.3.
+DROP PROCEDURE sp21;
+drop table res_t21;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.3.30:;
+--source include/show_msg.inc
+let $message=
+Ensure that multiple cases of all possible combinations of the control flow
+statements, nested within multiple compound statements within a stored
+procedure, always act correctly and return the expected result.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS res_tbl;
+DROP PROCEDURE IF EXISTS sp31330;
+--enable_warnings
+
+create table res_tbl (f1 int, f2 text, f3 blob, f4 date,
+ f5 set('one', 'two', 'three', 'four', 'five') default 'one');
+
+delimiter //;
+#FIXME: can be enhanced more and more ...
+CREATE PROCEDURE sp31330 (path int)
+BEGIN
+ declare count int default 1;
+ declare var1 text;
+ declare var2 blob;
+ declare var3 date;
+ declare var4 set('one', 'two', 'three', 'four', 'five') DEFAULT 'five';
+ case
+ when path=1 then
+ set var3 = '2000-11-09';
+ set var1 = 'flowing through case 1';
+ label1: loop
+ if count > 5 then
+ if var4=1000 then
+ set var2 = 'exiting out of case 1 - invalid SET';
+ END if;
+ if var4='two' then
+ set var2 = 'exiting out of case 1';
+ END if;
+ insert into res_tbl values (1, var1, var2, var3, (count-2));
+ leave label1;
+ elseif count = 5 then
+ set count= count + 2;
+ set var4='two';
+ iterate label1;
+ else
+ set count= count + 1;
+ END if;
+ set var4='one';
+ END loop label1;
+ when path=2 then
+ set var3 = '1989-11-09';
+ set var1 = 'flowing through case 2';
+ set @count3=0;
+ label2: repeat
+ set count=count + 1;
+ set @count2=1;
+ while @count2 <= 5 do
+ set @count2 = @count2 + 1;
+ END while;
+ SELECT @count2;
+ set @count3=@count3 + @count2;
+ until count > 5
+ END repeat label2;
+ set var2 = 'exiting out of case 2';
+ set var4 = count-3;
+ SELECT @count3;
+ insert into res_tbl values (2, var1, var2, var3, var4);
+ ELSE BEGIN
+ set @error_opt='undefined path specified';
+ SELECT @error_opt;
+ END;
+ END case;
+END//
+delimiter ;//
+
+# Error: SQLSTATE: 42000 (ER_SP_WRONG_NO_OF_ARGS)
+# Message: Incorrect number of arguments for %s %s; expected %u, got %u
+--error ER_SP_WRONG_NO_OF_ARGS
+CALL sp31330();
+
+CALL sp31330(1);
+SELECT * from res_tbl;
+
+CALL sp31330(2);
+SELECT * from res_tbl;
+
+CALL sp31330(4);
+
+# cleanup 3.1.3.30
+DROP PROCEDURE sp31330;
+drop table res_tbl;
+
+
+
+# ==============================================================================
+# USE the same .inc to cleanup before and after the test
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+
+# ==============================================================================
+--echo
+--echo . +++ END OF SCRIPT +++
+--echo --------------------------------------------------------------------------------
+# ==============================================================================
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc
new file mode 100644
index 00000000..c4f8496f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc
@@ -0,0 +1,461 @@
+#### suite/funcs_1/storedproc/storedproc_06.inc
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+set GLOBAL sql_mode="";
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+
+# ==============================================================================
+# (numbering from requirement document TP v1.0, Last updated: 25 Jan 2005 01:00)
+#
+# 3.1.6 Privilege checks:
+#
+# 1. Ensure that no user may create a stored procedure without the
+# GRANT CREATE ROUTINE privilege.
+# 2. Ensure that root always has the GRANT CREATE ROUTINE privilege.
+# 3. Ensure that a user with the GRANT CREATE ROUTINE privilege can always
+# create both a procedure and a function, on any appropriate database.
+# 4. Ensure that the default security provision of a stored procedure is
+# SQL SECURITY DEFINER.
+# 5. Ensure that a stored procedure defined with SQL SECURITY DEFINER can be
+# called/executed by any user, using only the privileges (including
+# database access privileges) associated with the user who created
+# the stored procedure.
+# 6. Ensure that a stored procedure defined with SQL SECURITY INVOKER can be
+# called/executed by any user, using only the privileges (including
+# database access privileges) associated with the user executing
+# the stored procedure.
+#
+# ==============================================================================
+let $message= Section 3.1.6 - Privilege Checks:;
+--source include/show_msg80.inc
+
+
+connection default;
+USE db_storedproc_1;
+--source suite/funcs_1/include/show_connection.inc
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.6.1:
+ -----------------
+Ensure that no user may create a stored procedure without the GRANT CREATE
+ROUTINE privilege.;
+--source include/show_msg80.inc
+
+create user 'user_1'@'localhost';
+
+grant all on db_storedproc_1.* to 'user_1'@'localhost';
+revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+connect (user1a, localhost, user_1, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+
+USE db_storedproc_1;
+
+delimiter //;
+--error ER_DBACCESS_DENIED_ERROR
+CREATE PROCEDURE sp1(v1 char(20))
+BEGIN
+ SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+delimiter ;//
+
+disconnect user1a;
+
+# add privilege again and check
+connection default;
+USE db_storedproc_1;
+--source suite/funcs_1/include/show_connection.inc
+
+GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
+connect (user1b, localhost, user_1, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+
+USE db_storedproc_1;
+
+delimiter //;
+CREATE PROCEDURE sp1(v1 char(20))
+BEGIN
+ SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+delimiter ;//
+disconnect user1b;
+
+# cleanup
+connection default;
+USE db_storedproc_1;
+--source suite/funcs_1/include/show_connection.inc
+
+DROP USER 'user_1'@'localhost';
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.6.2:
+ -----------------
+Ensure that root always has the GRANT CREATE ROUTINE privilege.
+(checked by other testscases);
+--source include/show_msg80.inc
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.6.3:
+ -----------------
+Ensure that a user with the GRANT CREATE ROUTINE privilege can always create
+both a procedure and a function, on any appropriate database.
+--source include/show_msg80.inc
+
+
+create user 'user_1'@'localhost';
+
+grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS db_storedproc_1.sp3;
+DROP FUNCTION IF EXISTS db_storedproc_1.fn1;
+--enable_warnings
+
+# disconnect default;
+connect (user2, localhost, user_1, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+
+delimiter //;
+CREATE PROCEDURE sp3(v1 char(20))
+BEGIN
+ SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+delimiter ;//
+
+delimiter //;
+CREATE FUNCTION fn1(v1 int) returns int
+BEGIN
+ return v1;
+END//
+delimiter ;//
+
+disconnect user2;
+
+# cleanup
+connection default;
+USE db_storedproc_1;
+--source suite/funcs_1/include/show_connection.inc
+
+drop user 'user_1'@'localhost';
+DROP PROCEDURE sp3;
+DROP FUNCTION fn1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.6.4:
+ -----------------
+Ensure that the default security provision of a stored procedure is SQL SECURITY
+DEFINER.;
+--source include/show_msg80.inc
+
+CREATE USER 'user_1'@'localhost';
+
+grant update on db_storedproc_1.t6 to 'user_1'@'localhost';
+grant execute on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+
+USE db_storedproc_1;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp4(v1 char(20))
+BEGIN
+ SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
+END//
+delimiter ;//
+
+#disconnect default;
+
+connect (user3, localhost, user_1, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+
+USE db_storedproc_1;
+CALL sp4('a');
+
+--vertical_results
+SELECT SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE,
+ ROUTINE_BODY, ROUTINE_DEFINITION, IS_DETERMINISTIC,
+ SQL_DATA_ACCESS, SECURITY_TYPE, SQL_MODE, ROUTINE_COMMENT
+FROM information_schema.routines
+ WHERE routine_schema LIKE 'db_sto%';
+--horizontal_results
+
+disconnect user3;
+
+# cleanup
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+DROP PROCEDURE sp4;
+DROP USER 'user_1'@'localhost';
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.6.5:
+ -----------------
+Ensure that a stored procedure defined with SQL SECURITY DEFINER can be
+called/executed by any user, using only the privileges (including database
+access privileges) associated with the user who created the stored procedure.;
+--source include/show_msg80.inc
+
+USE db_storedproc_1;
+CREATE TABLE t3165 ( c1 char(20), c2 char(20), c3 date);
+INSERT INTO t3165 VALUES ('inserted', 'outside of SP', NULL);
+
+# creates procedures
+create user 'user_1'@'localhost';
+
+#executes procedure
+create user 'user_2'@'localhost';
+
+grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
+grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
+grant execute on db_storedproc_1.* to 'user_2'@'localhost';
+flush privileges;
+
+connect (user5_1, localhost, user_1, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+
+delimiter //;
+CREATE PROCEDURE sp5_s_i () sql security definer
+BEGIN
+ SELECT * from db_storedproc_1.t3165;
+ insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_s_i', 1000);
+END//
+
+CREATE PROCEDURE sp5_sel () sql security definer
+BEGIN
+ SELECT * from db_storedproc_1.t3165;
+END//
+
+CREATE PROCEDURE sp5_ins () sql security definer
+BEGIN
+ insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
+END//
+delimiter ;//
+
+disconnect user5_1;
+
+connect (user5_2, localhost, user_2, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_s_i();
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_ins();
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_sel();
+
+# now 'add' INSERT to DEFINER
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_sel();
+grant insert on db_storedproc_1.* to 'user_1'@'localhost';
+flush privileges;
+
+connection user5_2;
+--source suite/funcs_1/include/show_connection.inc
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_s_i();
+CALL sp5_ins();
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_sel();
+
+# now 'add' SELECT to DEFINER
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_sel();
+grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
+#grant execute on db_storedproc_1.* to 'user_2'@'localhost';
+flush privileges;
+
+connection user5_2;
+--source suite/funcs_1/include/show_connection.inc
+CALL sp5_s_i();
+CALL sp5_ins();
+CALL sp5_sel();
+
+# now revoke INSERT FROM DEFINER
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+REVOKE INSERT on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+
+connection user5_2;
+--source suite/funcs_1/include/show_connection.inc
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_s_i();
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_ins();
+CALL sp5_sel();
+
+# now revoke SELECT FROM DEFINER
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+REVOKE SELECT on db_storedproc_1.* from 'user_1'@'localhost';
+flush privileges;
+
+connection user5_2;
+--source suite/funcs_1/include/show_connection.inc
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_s_i();
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_ins();
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp5_sel();
+
+# cleanup
+disconnect user5_2;
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+
+DROP PROCEDURE sp5_s_i;
+DROP PROCEDURE sp5_sel;
+DROP PROCEDURE sp5_ins;
+DROP TABLE t3165;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.6.6:
+ -----------------
+Ensure that a stored procedure defined with SQL SECURITY INVOKER can be
+called/executed by any user, using only the privileges (including database
+access privileges) associated with the user executing the stored procedure.;
+--source include/show_msg80.inc
+
+USE db_storedproc_1;
+CREATE TABLE t3166 ( c1 char(30) );
+INSERT INTO db_storedproc_1.t3166 VALUES ('inserted outside SP');
+
+# DEFINER
+create user 'user_1'@'localhost';
+
+# INVOKER
+create user 'user_2'@'localhost';
+
+GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
+GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
+GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+
+connect (user6_1, localhost, user_1, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+
+delimiter //;
+CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
+BEGIN
+ SELECT * from db_storedproc_1.t3166;
+ insert into db_storedproc_1.t3166 values ('inserted from sp3166_s_i');
+END//
+
+CREATE PROCEDURE sp3166_sel () SQL SECURITY INVOKER
+BEGIN
+ SELECT * from db_storedproc_1.t3166;
+END//
+
+CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
+BEGIN
+ insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
+END//
+delimiter ;//
+
+disconnect user6_1;
+
+connect (user6_2, localhost, user_2, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp3166_s_i();
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp3166_ins();
+CALL sp3166_sel();
+
+# now 'add' INSERT to INVOKER
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+CALL sp3166_sel();
+GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+disconnect user6_2;
+
+connect (user6_3, localhost, user_2, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+CALL sp3166_s_i();
+CALL sp3166_ins();
+CALL sp3166_sel();
+disconnect user6_3;
+
+# now 'remove' SELECT from INVOKER
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+CALL sp3166_sel();
+REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+
+connect (user6_4, localhost, user_2, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp3166_s_i();
+CALL sp3166_ins();
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp3166_sel();
+disconnect user6_4;
+
+# now 'remove' EXECUTE FROM INVOKER
+connection default;
+CALL sp3166_s_i();
+--source suite/funcs_1/include/show_connection.inc
+REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+
+connect (user6_5, localhost, user_2, , db_storedproc_1);
+--source suite/funcs_1/include/show_connection.inc
+--error ER_PROCACCESS_DENIED_ERROR
+CALL sp3166_s_i();
+--error ER_PROCACCESS_DENIED_ERROR
+CALL sp3166_ins();
+--error ER_PROCACCESS_DENIED_ERROR
+CALL sp3166_sel();
+disconnect user6_5;
+
+# cleanup
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+
+DROP PROCEDURE sp3166_s_i;
+DROP PROCEDURE sp3166_sel;
+DROP PROCEDURE sp3166_ins;
+DROP TABLE t3166;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+
+# ==============================================================================
+# USE the same .inc to cleanup before and after the test
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+
+set GLOBAL sql_mode=default;
+# ==============================================================================
+--echo
+--echo . +++ END OF SCRIPT +++
+--echo --------------------------------------------------------------------------------
+# ==============================================================================
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_07.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_07.inc
new file mode 100644
index 00000000..ec8bd08c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_07.inc
@@ -0,0 +1,119 @@
+#### suite/funcs_1/storedproc/storedproc_07.inc
+#
+--source include/default_charset.inc
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+
+# ==============================================================================
+# (numbering from requirement document TP v1.0, Last updated: 25 Jan 2005 01:00)
+#
+# 3.1.7 SQL mode checks:
+#
+# 1. Ensure that the sql_mode setting in effect at the time a stored procedure is created is the same setting under which the stored procedure runs when it is called/executed.
+# 2. Ensure that if the sql_mode setting is changed when a stored procedure is run, that the original setting is restored as soon as the stored procedure execution is complete.
+#
+# ==============================================================================
+let $message= Section 3.1.7 - SQL mode checks:;
+--source include/show_msg80.inc
+
+USE db_storedproc;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.7.1:
+ -----------------
+Ensure that the sql_mode setting in effect at the time a stored procedure is
+created is the same setting under which the stored procedure runs when it is
+called/executed.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS temp_tbl;
+DROP TABLE IF EXISTS result;
+--enable_warnings
+
+CREATE TABLE temp_tbl (f1 tinyint);
+CREATE TABLE result (f1 text(200), f2 char(20));
+
+set @@sql_mode='traditional';
+SHOW VARIABLES LIKE 'sql_mode';
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare a tinyint;
+ declare count_ int default 1;
+ declare continue handler for sqlstate '22003' set count_=1000;
+ SHOW VARIABLES LIKE 'sql_mode';
+ SELECT @@sql_mode into @cur_val_sql_mode;
+ insert into temp_tbl values (1000);
+ if count_ = 1000 THEN
+ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
+ ELSE
+ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
+ END if;
+END//
+delimiter ;//
+
+SHOW CREATE PROCEDURE sp1;
+
+set @@sql_mode='';
+SHOW VARIABLES LIKE 'sql_mode';
+
+CALL sp1();
+SELECT * from result;
+
+SHOW VARIABLES LIKE 'sql_mode';
+SELECT @@sql_mode;
+
+# cleanup
+SET @@sql_mode='TRADITIONAL';
+DROP PROCEDURE sp1;
+DROP TABLE temp_tbl;
+DROP TABLE result;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.7.2:
+ -----------------
+Ensure that if the sql_mode setting is changed when a stored procedure is run,
+that the original setting is restored as soon as the stored procedure execution
+is complete.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp2;
+--enable_warnings
+
+--echo ... show initial value
+SHOW VARIABLES LIKE 'sql_mode';
+
+delimiter //;
+CREATE PROCEDURE sp2()
+BEGIN
+ SET @@sql_mode='MAXDB';
+ SHOW VARIABLES LIKE 'sql_mode';
+END//
+delimiter ;//
+
+SHOW CREATE PROCEDURE sp2;
+--echo ... show value prior calling procedure
+SHOW VARIABLES LIKE 'sql_mode';
+
+--echo ... call procedure that changes sql_mode
+CALL sp2();
+
+--echo ... check whether old value is re-set
+SHOW VARIABLES LIKE 'sql_mode';
+
+# cleanup
+DROP PROCEDURE sp2;
+
+
+# ==============================================================================
+# USE the same .inc to cleanup before and after the test
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+
+# ==============================================================================
+let $message= . +++ END OF SCRIPT +++;
+--source include/show_msg80.inc
+# ==============================================================================
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_08.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_08.inc
new file mode 100644
index 00000000..9f0304a3
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_08.inc
@@ -0,0 +1,119 @@
+#### suite/funcs_1/storedproc/storedproc_08.inc
+#
+--source include/default_charset.inc
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+
+# ==============================================================================
+# (numbering from requirement document TP v1.0, Last updated: 25 Jan 2005 01:00)
+#
+# 3.1.8 SHOW statement checks:
+#
+#- 1. Ensure that the definition of a procedure is properly recorded and displayed when a SHOW CREATE PROCEDURE or SHOW CREATE PROCEDURE STATUS statement is executed.
+#- 2. Ensure that the definition of a procedure is not displayed when a SHOW CREATE FUNCTION or SHOW CREATE FUNCTION STATUS statement is executed.
+#- 3. Ensure that an attempt to execute SHOW CREATE PROCEDURE or SHOW CREATE PROCEDURE STATUS, with the name of a non-existent procedure, fails with an appropriate error message.
+#- 4. Ensure that an attempt to execute SHOW CREATE PROCEDURE or SHOW CREATE PROCEDURE STATUS, with the name of a function, fails with an appropriate error message.
+#- 5. Ensure that the definition of a function is properly recorded and displayed when a SHOW CREATE FUNCTION or SHOW CREATE FUNCTION STATUS statement is executed.
+#- 6. Ensure that the definition of a function is not displayed when a SHOW CREATE PROCEDURE or SHOW CREATE PROCEDURE STATUS statement is executed.
+#- 7. Ensure that an attempt to execute SHOW CREATE FUNCTION or SHOW CREATE FUNCTION STATUS, with the name of a non-existent function, fails with an appropriate error message.
+#- 8. Ensure that an attempt to execute SHOW CREATE FUNCTION or SHOW CREATE FUNCTION STATUS, with the name of a procedure, fails with an appropriate error message.
+## 9. Ensure that all stored procedure changes made with ALTER PROCEDURE or ALTER FUNCTION are properly recorded and displayed when a SHOW CREATE PROCEDURE or SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE FUNCTION STATUS statement (respectively) is executed.
+#- 10. Ensure that, when a stored procedure is dropped, its definition no longer appears when a SHOW CREATE PROCEDURE or SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE FUNCTION STATUS statement (respectively) is executed.
+#
+# ==============================================================================
+let $message= Section 3.1.8 - SHOW statement checks:;
+--source include/show_msg80.inc
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.8.9:;
+--source include/show_msg.inc
+let $message=
+Ensure that all stored procedure changes made with ALTER PROCEDURE or ALTER
+FUNCTION are properly recorded and displayed when a SHOW CREATE PROCEDURE or
+SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE
+FUNCTION STATUS statement (respectively) is executed.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn_1;
+DROP FUNCTION IF EXISTS fn_2;
+DROP PROCEDURE IF EXISTS sp_1;
+DROP PROCEDURE IF EXISTS sp_2;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp_1 (i1 int)
+BEGIN
+ set @x=i1;
+END//
+
+CREATE PROCEDURE sp_2 (i1 int) SQL SECURITY INVOKER COMMENT 'created with INVOKER'
+BEGIN
+ set @x=i1;
+END//
+
+CREATE FUNCTION fn_1 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns year
+BEGIN
+ set @x=i1;
+ set @y=@x;
+ return i4;
+END//
+
+CREATE FUNCTION fn_2 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+ RETURNS YEAR
+ SQL SECURITY INVOKER
+ COMMENT 'created with INVOKER'
+BEGIN
+ set @x=i1;
+ set @y=@x;
+ return i4;
+END//
+delimiter ;//
+
+--source suite/funcs_1/storedproc/storedproc_08_show.inc
+
+let $message= ... now change some stuff:;
+--source include/show_msg.inc
+# some of the changes might be 'strange' here, but they are used here ONLY to
+# check that the changes are recorded / showd correct
+ALTER PROCEDURE sp_1 SQL SECURITY INVOKER;
+ALTER PROCEDURE sp_1 COMMENT 'new comment, SP changed to INVOKER';
+
+ALTER PROCEDURE sp_2 SQL SECURITY DEFINER;
+ALTER PROCEDURE sp_2 DROP COMMENT;
+ALTER PROCEDURE sp_2 COMMENT 'SP changed to DEFINER';
+ALTER PROCEDURE sp_2 READS SQL DATA;
+
+ALTER FUNCTION fn_1 SQL SECURITY INVOKER;
+ALTER FUNCTION fn_1 COMMENT 'new comment, FN changed to INVOKER';
+ALTER FUNCTION fn_1 NO SQL;
+
+ALTER FUNCTION fn_2 SQL SECURITY DEFINER;
+ALTER FUNCTION fn_2 COMMENT 'FN changed to DEFINER';
+ALTER FUNCTION fn_2 MODIFIES SQL DATA;
+
+--source suite/funcs_1/storedproc/storedproc_08_show.inc
+
+
+let $message= ... change back to default and check result:;
+--source include/show_msg.inc
+ALTER FUNCTION fn_2 CONTAINS SQL;
+--source suite/funcs_1/storedproc/storedproc_08_show.inc
+
+
+# cleanup 3.1.8.9
+let $message= ... cleanup;
+--source include/show_msg.inc
+DROP FUNCTION fn_1;
+DROP FUNCTION fn_2;
+DROP PROCEDURE sp_1;
+
+
+# ==============================================================================
+# USE the same .inc to cleanup before and after the test
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+
+# ==============================================================================
+let $message= . +++ END OF SCRIPT +++;
+--source include/show_msg80.inc
+# ==============================================================================
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc
new file mode 100644
index 00000000..e6eb2fa0
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc
@@ -0,0 +1,29 @@
+#### suite/funcs_1/storedproc/storedproc_08_show.inc
+#
+# used from .../storedproc_08.inc to show all created / altered routines
+
+--echo
+--echo ... now check what is stored:
+--echo -----------------------------
+
+--vertical_results
+
+--replace_column 24 <modified> 25 <created>
+SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
+
+
+SHOW CREATE FUNCTION fn_1;
+SHOW CREATE FUNCTION fn_2;
+#SHOW CREATE FUNCTION fn_2b;
+
+SHOW CREATE PROCEDURE sp_1;
+SHOW CREATE PROCEDURE sp_2;
+
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn_%';
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS LIKE 'sp_%';
+
+--horizontal_results
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc
new file mode 100644
index 00000000..db8f45d0
--- /dev/null
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc
@@ -0,0 +1,330 @@
+#### suite/funcs_1/storedproc/storedproc_10.inc
+
+# This test cannot be used for the embedded server because we check here
+# privilgeges.
+--source include/not_embedded.inc
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+
+# ==============================================================================
+# (numbering from requirement document TP v1.0, Last updated: 25 Jan 2005 01:00)
+#
+# 3.1.10 CALL checks:
+#
+## 1. Ensure that a properly defined procedure can always be called, assuming
+# the appropriate privileges exist.
+#- 2. Ensure that a procedure cannot be called if the appropriate privileges
+# do not exist.
+## 3. Ensure that a function can never be called.
+## 4. Ensure that a properly defined function can always be executed, assuming
+# the appropriate privileges exist.
+#- 5. Ensure that a function cannot be executed if the appropriate privileges
+# do not exist.
+## 6. Ensure that a procedure can never be executed.
+## 7. Ensure that the ROW_COUNT() SQL function always returns the correct
+# number of rows affected by the execution of a stored procedure.
+## 8. Ensure that the mysql_affected_rows() C API function always returns
+# the correct number of rows affected by the execution of a
+# stored procedure.
+#
+# ==============================================================================
+let $message= Section 3.1.10 - CALL checks:;
+--source include/show_msg80.inc
+
+
+USE db_storedproc;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.10.2 + 3.1.10.5:;
+--source include/show_msg.inc
+let $message=
+2. Ensure that a procedure cannot be called if the appropriate privileges do not
+ exist.
+5. Ensure that a function cannot be executed if the appropriate privileges do
+ not exist.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp31102;
+DROP FUNCTION IF EXISTS fn31105;
+--enable_warnings
+
+# DEFINER
+create user 'user_1'@'localhost';
+# INVOKER
+create user 'user_2'@'localhost';
+
+GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
+GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+
+connect (user2_1, localhost, user_1, , db_storedproc);
+--source suite/funcs_1/include/show_connection.inc
+
+delimiter //;
+CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
+BEGIN
+ SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE FUNCTION fn31105(n INT) RETURNS INT
+ BEGIN
+ DECLARE res INT;
+ SET res = n * n;
+ RETURN res;
+END//
+delimiter ;//
+
+disconnect user2_1;
+
+connect (user2_2, localhost, user_2, , db_storedproc);
+--source suite/funcs_1/include/show_connection.inc
+
+# no privileges exist
+--error ER_PROCACCESS_DENIED_ERROR
+CALL sp31102();
+SELECT fn31105( 9 );
+
+# now 'add' EXECUTE to INVOKER
+connection default;
+USE db_storedproc;
+--source suite/funcs_1/include/show_connection.inc
+# root can execute ...
+CALL sp31102();
+SELECT fn31105( 9 );
+GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+disconnect user2_2;
+
+# new connection
+connect (user2_3, localhost, user_2, , db_storedproc);
+--source suite/funcs_1/include/show_connection.inc
+CALL sp31102();
+SELECT fn31105( 9 );
+disconnect user2_3;
+
+# now 'remove' SELECT from INVOKER
+connection default;
+USE db_storedproc;
+--source suite/funcs_1/include/show_connection.inc
+REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
+FLUSH PRIVILEGES;
+
+# root can still execute
+CALL sp31102();
+SELECT fn31105( 9 );
+
+connect (user2_4, localhost, user_2, , db_storedproc);
+--source suite/funcs_1/include/show_connection.inc
+CALL sp31102();
+SELECT fn31105( 9 );
+disconnect user2_4;
+
+# cleanup
+connection default;
+USE db_storedproc;
+
+--source suite/funcs_1/include/show_connection.inc
+DROP PROCEDURE sp31102;
+DROP FUNCTION fn31105;
+DROP USER 'user_1'@'localhost';
+DROP USER 'user_2'@'localhost';
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.10.3:;
+--source include/show_msg.inc
+let $message=
+Ensure that a function can never be called.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1(a int) returns int
+BEGIN
+ set @b = 0.9 * a;
+ return @b;
+END//
+delimiter ;//
+
+--error ER_SP_DOES_NOT_EXIST
+CALL fn1();
+
+# cleanup
+DROP FUNCTION fn1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.10.6:;
+--source include/show_msg.inc
+let $message=
+Ensure that a procedure can never be executed.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP FUNCTION IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ SELECT * from t10;
+END//
+delimiter ;//
+
+--error ER_SP_DOES_NOT_EXIST
+ SELECT sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.10.7:;
+--source include/show_msg.inc
+let $message=
+Ensure that the ROW_COUNT() SQL function always returns the correct number of
+rows affected by the execution of a stored procedure.;
+--source include/show_msg80.inc
+# Note(mleich): Information taken from a comments in
+# Bug#21818 Return value of ROW_COUNT() is incorrect for
+# ALTER TABLE, LOAD DATA
+# ROW_COUNT() is -1 following any statement which is not DELETE, INSERT
+# or UPDATE.
+# Also, after a CALL statement, ROW_COUNT() will return the value of the
+# last statement in the stored procedure.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp_ins_1;
+DROP PROCEDURE IF EXISTS sp_ins_3;
+DROP PROCEDURE IF EXISTS sp_upd;
+DROP PROCEDURE IF EXISTS sp_ins_upd;
+DROP PROCEDURE IF EXISTS sp_del;
+DROP PROCEDURE IF EXISTS sp_with_rowcount;
+--enable_warnings
+
+CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT);
+INSERT INTO temp SELECT * FROM t10;
+
+delimiter //;
+CREATE PROCEDURE sp_ins_1()
+BEGIN
+ INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000);
+END//
+
+CREATE PROCEDURE sp_ins_3()
+BEGIN
+ INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000);
+ INSERT INTO temp VALUES ('abc', 'xyz', '1989-11-09', 100, 'uvw', 1000);
+ INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000);
+END//
+
+CREATE PROCEDURE sp_upd()
+BEGIN
+ UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc';
+END//
+
+CREATE PROCEDURE sp_ins_upd()
+BEGIN
+ BEGIN
+ INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000);
+ INSERT INTO temp VALUES ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000);
+ INSERT INTO temp VALUES ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000);
+ INSERT INTO temp VALUES ('qwe', 'abc', '2005-11-07', 100, 'uvw', 1000);
+ END;
+ SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1;
+ UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc';
+END//
+
+CREATE PROCEDURE sp_del()
+BEGIN
+ DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2';
+END//
+
+CREATE PROCEDURE sp_with_rowcount()
+BEGIN
+ BEGIN
+ INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000),
+ ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000),
+ ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000),
+ ('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000);
+ END;
+ SELECT row_count() AS 'row_count() after insert';
+ SELECT row_count() AS 'row_count() after select row_count()';
+ SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
+ UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc';
+ SELECT row_count() AS 'row_count() after update';
+ SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
+ DELETE FROM temp WHERE temp.f1 = 'updated_2';
+ SELECT row_count() AS 'row_count() after delete';
+END//
+delimiter ;//
+
+--disable_ps2_protocol
+CALL sp_ins_1();
+SELECT row_count();
+--sorted_result
+SELECT * FROM temp;
+
+CALL sp_ins_3();
+SELECT row_count();
+--sorted_result
+SELECT * FROM temp;
+
+CALL sp_upd();
+SELECT row_count();
+--sorted_result
+SELECT * FROM temp;
+
+CALL sp_ins_upd();
+SELECT row_count();
+--sorted_result
+SELECT * FROM temp;
+
+CALL sp_del();
+SELECT row_count();
+--sorted_result
+SELECT * FROM temp;
+
+DELETE FROM temp;
+CALL sp_with_rowcount();
+SELECT row_count();
+--sorted_result
+SELECT * FROM temp;
+--enable_ps2_protocol
+
+# cleanup
+DROP PROCEDURE sp_ins_1;
+DROP PROCEDURE sp_ins_3;
+DROP PROCEDURE sp_upd;
+DROP PROCEDURE sp_ins_upd;
+DROP PROCEDURE sp_del;
+DROP PROCEDURE sp_with_rowcount;
+DROP TABLE temp;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 3.1.10.8:;
+--source include/show_msg.inc
+let $message=
+Ensure that the mysql_affected_rows() C API function always returns the correct
+number of rows affected by the execution of a stored procedure.;
+--source include/show_msg80.inc
+
+#FIXME: 3.1.10.8: to be added later.
+
+# ==============================================================================
+# USE the same .inc to cleanup before and after the test
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+
+# ==============================================================================
+--echo
+--echo . +++ END OF SCRIPT +++
+--echo --------------------------------------------------------------------------------
+# ==============================================================================
diff --git a/mysql-test/suite/funcs_1/t/charset_collation.test b/mysql-test/suite/funcs_1/t/charset_collation.test
new file mode 100644
index 00000000..d3d7a519
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/charset_collation.test
@@ -0,0 +1,104 @@
+# suite/funcs_1/t/charset_collation.test
+#
+# Tests checking the content of the information_schema tables
+# character_sets
+# collations
+# collation_character_set_applicability
+#
+# Created:
+# 2009-04-28 mleich Replace the charset_collation_* test which failed too often
+# because of changes
+# - in general available character sets and collations
+# - in build types
+# (Bug#40545, Bug#40209, Bug#40618, Bug#38346)
+#
+
+# Create a low privileged user.
+--error 0, ER_CANNOT_USER
+DROP USER dbdict_test@localhost;
+CREATE USER dbdict_test@localhost;
+
+connect (con,localhost,dbdict_test,,);
+################################################################################
+#
+# The original requirements for the following tests were:
+#
+# 3.2.2.2: Ensure that the table (information_schema.character_sets) shows the
+# relevant information on every character set for which the current
+# user or PUBLIC have the USAGE privilege.
+#
+# 3.2.2.3: Ensure that the table (information_schema.character_sets) does not
+# show any information on any character set for which the current user
+# or PUBLIC have no USAGE privilege.
+#
+#
+# 3.2.3.2: Ensure that the table (information_schema.collations) shows the
+# relevant information on every collation for which the current user
+# or PUBLIC have the USAGE privilege.
+#
+# 3.2.3.3: Ensure that the table (information_schema.collations) does not show
+# any information on any collations for which the current user and
+# PUBLIC have no USAGE privilege.
+#
+#
+# 3.2.4.2: Ensure that the table
+# information_schema.collation_character_set_applicability
+# shows the relevant information on every collation/character set
+# combination for which the current user or PUBLIC have the USAGE
+# privilege.
+#
+# 3.2.4.3: Ensure that the table
+# information_schema.collation_character_set_applicability
+# does not show any information on any collation/character set
+# combinations for which the current user and PUBLIC have no
+# USAGE privilege.
+#
+# Notes (2009-04-28 mleich):
+# - The requirements are outdated because grant/revoke privilege for using a
+# characterset/collation were never implemented.
+# Therefore the tests focus on the completeness and correctness of the
+# content (rows and columns) of these tables.
+# - The amount of collations/character sets grows with new MySQL releases.
+# Even within the same release the amount of records within these tables
+# can differ between different build types (community, enterprise, source,...)
+# Therefore we limit the queries to character sets and collations which
+# - exist in all build types
+# - have in all build types the same "state".
+# The character set
+# - utf8 is used for Metadata
+# - ascii is a quite usual
+# The collations <character set>_general_ci and <character set>_bin seem
+# to be available all time.
+#
+################################################################################
+
+let $char_set_condition= character_set_name IN ('utf8mb3','latin1','binary');
+let $collation_condition=
+ (collation_name LIKE CONCAT(character_set_name,'_general_ci')
+ OR
+ collation_name LIKE CONCAT(character_set_name,'_bin'));
+--echo
+eval SELECT *
+FROM information_schema.character_sets
+WHERE $char_set_condition
+ORDER BY character_set_name;
+
+--echo
+eval SELECT *
+FROM information_schema.collations
+WHERE $char_set_condition
+ AND $collation_condition
+ORDER BY collation_name;
+
+--echo
+eval SELECT *
+FROM information_schema.collation_character_set_applicability
+WHERE $char_set_condition
+ AND $collation_condition
+ORDER BY collation_name, character_set_name;
+
+
+# Cleanup
+connection default;
+disconnect con;
+DROP USER dbdict_test@localhost;
diff --git a/mysql-test/suite/funcs_1/t/innodb_bitdata.test b/mysql-test/suite/funcs_1/t/innodb_bitdata.test
new file mode 100644
index 00000000..b178aac5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_bitdata.test
@@ -0,0 +1,17 @@
+#### suite/funcs_1/t/innodb_bitdata.test
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+let $message= NOT YET IMPLEMENTED: bitdata tests;
+--source include/show_msg80.inc
+exit;
+
+# Create some objects needed in many testcases
+USE test;
+--source suite/funcs_1/include/innodb_tb4.inc
+--source suite/funcs_1/bitdata/bitdata_master.test
diff --git a/mysql-test/suite/funcs_1/t/innodb_cursors.test b/mysql-test/suite/funcs_1/t/innodb_cursors.test
new file mode 100644
index 00000000..a75e5cbb
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_cursors.test
@@ -0,0 +1,19 @@
+#### suite/funcs_1/t/innodb_cursors.test
+
+# Innodb tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+let $message= NOT YET IMPLEMENTED: cursor tests;
+--source include/show_msg80.inc
+exit;
+
+# Create some objects needed in many testcases
+USE test;
+--source suite/funcs_1/include/innodb_tb1.inc
+
+--source suite/funcs_1/cursors/cursors_master.test
+
diff --git a/mysql-test/suite/funcs_1/t/innodb_func_view.test b/mysql-test/suite/funcs_1/t/innodb_func_view.test
new file mode 100644
index 00000000..1ca74ff5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_func_view.test
@@ -0,0 +1,16 @@
+###################################################
+# #
+# Functions within VIEWs based on InnoDB tables #
+# #
+###################################################
+
+#
+# NOTE: PLEASE SEE THE DETAILED DESCRIPTION IN
+# suite/funcs_1/views/func_view.inc
+# BEFORE ADDING NEW TEST CASES HERE !!!
+
+let $type= 'InnoDB' ;
+--source include/have_innodb.inc
+
+--source suite/funcs_1/views/func_view.inc
+
diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_02.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_02.test
new file mode 100644
index 00000000..ace4d0cd
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_storedproc_02.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/innodb_storedproc_02.test
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+--source suite/funcs_1/storedproc/storedproc_02.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_03.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_03.test
new file mode 100644
index 00000000..3d1d6134
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_storedproc_03.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/innodb_storedproc_03.test
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+--source suite/funcs_1/storedproc/storedproc_03.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_06.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_06.test
new file mode 100644
index 00000000..7bfc3153
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_storedproc_06.test
@@ -0,0 +1,10 @@
+#### suite/funcs_1/t/innodb_storedproc_06.test
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+
+# 2. Set $engine_type
+set sql_mode="";
+let $engine_type= innodb;
+
+--source suite/funcs_1/storedproc/storedproc_06.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_07.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_07.test
new file mode 100644
index 00000000..dd1396e9
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_storedproc_07.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/innodb_storedproc_07.test
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+--source suite/funcs_1/storedproc/storedproc_07.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_08.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_08.test
new file mode 100644
index 00000000..39c983ad
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_storedproc_08.test
@@ -0,0 +1,10 @@
+#### suite/funcs_1/t/innodb_storedproc_08.test
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+
+# 2. Set $engine_type
+set sql_mode="";
+let $engine_type= innodb;
+
+--source suite/funcs_1/storedproc/storedproc_08.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_10.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_10.test
new file mode 100644
index 00000000..88a44a26
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_storedproc_10.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/innodb_storedproc_10.test
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+--source suite/funcs_1/storedproc/storedproc_10.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_0102.test b/mysql-test/suite/funcs_1/t/innodb_trig_0102.test
new file mode 100644
index 00000000..d5e65d35
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_trig_0102.test
@@ -0,0 +1,10 @@
+#### suite/funcs_1/t/innodb_trig_0102.test
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+--source suite/funcs_1/triggers/triggers_0102.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_03.test b/mysql-test/suite/funcs_1/t/innodb_trig_03.test
new file mode 100644
index 00000000..f2a8fa3c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_trig_03.test
@@ -0,0 +1,11 @@
+#### suite/funcs_1/t/innodb_trig_03.test
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+set sql_mode="";
+let $engine_type= innodb;
+
+--source suite/funcs_1/triggers/triggers_03.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_03e.test b/mysql-test/suite/funcs_1/t/innodb_trig_03e.test
new file mode 100644
index 00000000..bb6bb3d1
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_trig_03e.test
@@ -0,0 +1,26 @@
+#### suite/funcs_1/t/innodb_trig_03e.test
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+--source include/default_charset.inc
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+# Create some objects needed in many testcases
+USE test;
+
+--source suite/funcs_1/triggers/triggers_03e_db_level.inc
+--source suite/funcs_1/triggers/triggers_03e_table_level.inc
+--source suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
+--source suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
+--source suite/funcs_1/triggers/triggers_03e_prepare.inc
+--source suite/funcs_1/triggers/triggers_03e_definer.inc
+--source suite/funcs_1/triggers/triggers_03e_transaction.inc
+--source suite/funcs_1/triggers/triggers_03e_columns.inc
+
diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_0407.test b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test
new file mode 100644
index 00000000..dddb000c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test
@@ -0,0 +1,11 @@
+#### suite/funcs_1/t/innodb_trig_0407.test
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+set sql_mode="";
+let $engine_type= innodb;
+
+--source suite/funcs_1/triggers/triggers_0407.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_08.test b/mysql-test/suite/funcs_1/t/innodb_trig_08.test
new file mode 100644
index 00000000..c870c1a7
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_trig_08.test
@@ -0,0 +1,11 @@
+#### suite/funcs_1/t/innodb_trig_08.test
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+set sql_mode="";
+let $engine_type= innodb;
+
+--source suite/funcs_1/triggers/triggers_08.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_09.test b/mysql-test/suite/funcs_1/t/innodb_trig_09.test
new file mode 100644
index 00000000..ad11465f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_trig_09.test
@@ -0,0 +1,10 @@
+#### suite/funcs_1/t/innodb_trig_09.test
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+--source suite/funcs_1/triggers/triggers_09.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test b/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test
new file mode 100644
index 00000000..b3252499
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test
@@ -0,0 +1,10 @@
+#### suite/funcs_1/t/innodb_trig_1011ext.test
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+--source suite/funcs_1/triggers/triggers_1011ext.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test b/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test
new file mode 100644
index 00000000..32da61ec
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test
@@ -0,0 +1,10 @@
+#### suite/funcs_1/t/innodb_triggers.test
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+--source suite/funcs_1/triggers/trig_frkey.inc
diff --git a/mysql-test/suite/funcs_1/t/innodb_views.test b/mysql-test/suite/funcs_1/t/innodb_views.test
new file mode 100644
index 00000000..dcab8ec3
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/innodb_views.test
@@ -0,0 +1,24 @@
+#### suite/funcs_1/t/innodb_views.test
+
+# InnoDB tables should be used
+#
+# 1. Check if InnoDB is available
+--source include/have_innodb.inc
+# 2. Set $engine_type
+let $engine_type= innodb;
+
+# Create some objects needed in many testcases
+USE test;
+--source suite/funcs_1/include/innodb_tb2.inc
+--disable_warnings
+DROP DATABASE IF EXISTS test1;
+--enable_warnings
+CREATE DATABASE test1;
+USE test1;
+--source suite/funcs_1/include/innodb_tb2.inc
+USE test;
+
+--source suite/funcs_1/views/views_master.inc
+DROP DATABASE test1;
+DROP TABLE test.tb2;
+
diff --git a/mysql-test/suite/funcs_1/t/is_basics_mixed.test b/mysql-test/suite/funcs_1/t/is_basics_mixed.test
new file mode 100644
index 00000000..7d5a1ee3
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_basics_mixed.test
@@ -0,0 +1,506 @@
+# suite/funcs_1/t/is_basics_mixed.test
+#
+# Checks of some basic properties of the INFORMATION_SCHEMA which are not
+# related to a certain INFORMATION_SCHEMA table.
+#
+# This test should not check properties related to storage engines.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test is strict adjusted to the behaviour of the non embedded server.
+# Example of common differences between both servers:
+# USE information_schema; CREATE VIEW tables AS SELECT 'garbage';
+# non embedded server:
+# - errname ER_DBACCESS_DENIED_ERROR
+# - ERROR 42000: Access denied for user 'root'@'localhost' to
+# database 'information_schema'
+# embedded server:
+# - errno 1
+# - Can't create/write to file
+# '.../var/master-data/information_schema/tables.frm~
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source suite/funcs_1/datadict/datadict.pre
+
+# $engine_type must point to storage engine which is all time available.
+# The fastest engine should be preferred.
+let $engine_type = MEMORY;
+
+
+# The INFORMATION_SCHEMA database must exist.
+SHOW DATABASES LIKE 'information_schema';
+
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.20: USE INFORMATION_SCHEMA is supported
+--echo #######################################################################
+# Ensure that USE INFORMATION_SCHEMA allows the user to switch to the
+# INFORMATION_SCHEMA database, for query purposes only.
+#
+# Note: The "for query purposes only" is checked in other tests.
+# High privileged user (root)
+connection default;
+USE test;
+SELECT DATABASE();
+USE information_schema;
+SELECT DATABASE();
+#
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON test.* TO 'testuser1'@'localhost';
+# Low privileged user
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , test);
+SELECT DATABASE();
+USE information_schema;
+SELECT DATABASE();
+#
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+
+
+--echo #######################################################################
+--echo # Testcase TBD1: The INFORMATION_SCHEMA cannot be dropped.
+--echo #######################################################################
+--error ER_DBACCESS_DENIED_ERROR
+DROP DATABASE information_schema;
+
+
+--echo #######################################################################
+--echo # Testcase TBD2: There cannot be a second database INFORMATION_SCHEMA.
+--echo #######################################################################
+--error ER_DBACCESS_DENIED_ERROR
+CREATE DATABASE information_schema;
+
+
+--echo ##################################################################################
+--echo # Testcase 3.2.1.6+3.2.1.7: No user may create an INFORMATION_SCHEMA table or view
+--echo ##################################################################################
+# 3.2.1.6 Ensure that no user may create an INFORMATION_SCHEMA base table.
+# 3.2.1.7 Ensure that no user may create an INFORMATION_SCHEMA view
+#
+
+# 1. High privileged user (root)
+connection default;
+--source suite/funcs_1/datadict/basics_mixed1.inc
+
+# 2. High privileged user (testuser1)
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT ALL ON *.* TO testuser1@localhost;
+SHOW GRANTS FOR testuser1@localhost;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , test);
+--source suite/funcs_1/datadict/basics_mixed1.inc
+
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+
+--echo ###############################################################################
+--echo # Testcase 3.2.1.1+3.2.1.2: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo ###############################################################################
+# 3.2.1.1 Ensure that every INFORMATION_SCHEMA table can be queried with
+# a SELECT statement, just as if it were an ordinary user-defined table.
+# 3.2.1.2 Ensure that queries on an INFORMATION_SCHEMA table can accept all
+# SELECT statement options and are always correctly evaluated.
+#
+# Some notes(mleich):
+# - Currently here only a subset of select statement options is checked, it's
+# still not possible to check here all possible options
+# - The content of many INFORMATION_SCHEMA tables is checked in other tests.
+# - We work here only with a subset of the columns of information_schema.tables
+# because we want have a stable base (all time existing table, stable layout).
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <some_engine>
+eval
+CREATE TABLE db_datadict.t1_first (f1 BIGINT UNIQUE, f2 BIGINT)
+ENGINE = $engine_type;
+--replace_result $engine_type <some_engine>
+eval
+CREATE TABLE db_datadict.t1_second (f1 BIGINT UNIQUE, f2 BIGINT)
+ENGINE = $engine_type;
+
+# SELECT *
+--echo # Attention: The protocolling of the next result set is disabled.
+--disable_result_log
+SELECT * FROM information_schema.tables;
+--enable_result_log
+#
+# SELECT <some columns> + WHERE
+--sorted_result
+SELECT table_name FROM information_schema.tables
+WHERE table_schema = 'db_datadict';
+#
+# SELECT string_function(<some column>) + ORDER BY
+SELECT LENGTH(table_name) FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+#
+# SELECT aggregate_function(<some column>) + WHERE with LIKE
+SELECT count(table_name) FROM information_schema.tables
+WHERE table_schema LIKE 'db_datadic%';
+#
+# SELECT with addition in column list
+--sorted_result
+SELECT CAST((LENGTH(table_schema) + LENGTH(table_name)) AS DECIMAL(15,1))
+FROM information_schema.tables
+WHERE table_schema = 'db_datadict';
+#
+# WHERE with IN + LIMIT
+SELECT table_name FROM information_schema.tables
+WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1;
+SELECT table_name FROM information_schema.tables
+WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1,1;
+#
+# WHERE with AND
+SELECT table_name,table_schema AS my_col FROM information_schema.tables
+WHERE table_name = 't1_first' AND table_schema = 'db_datadict';
+#
+# SELECT HIGH_PRIORITY + WHERE with OR
+--sorted_result
+SELECT HIGH_PRIORITY table_name AS my_col FROM information_schema.tables
+WHERE table_name = 't1_first' OR table_name = 't1_second';
+#
+# Empty result set
+SELECT 1 AS my_col FROM information_schema.tables
+WHERE table_name = 't1_third';
+#
+# SELECT INTO USER VARIABLE
+SELECT table_name,table_schema INTO @table_name,@table_schema
+FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name LIMIT 1;
+SELECT @table_name,@table_schema;
+#
+# SELECT INTO OUTFILE
+let $OUTFILE = $MYSQLTEST_VARDIR/tmp/datadict.out;
+--error 0,1
+remove_file $OUTFILE;
+--replace_result $OUTFILE <OUTFILE>
+--disable_ps2_protocol
+eval SELECT table_name,table_schema
+INTO OUTFILE '$OUTFILE'
+FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
+LINES TERMINATED BY '\n'
+FROM information_schema.tables
+WHERE table_schema = 'db_datadict' ORDER BY table_name;
+--enable_ps2_protocol
+cat_file $OUTFILE;
+remove_file $OUTFILE;
+#
+# UNION
+--sorted_result
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_first'
+UNION ALL
+SELECT table_name FROM information_schema.tables
+WHERE table_name = 't1_second';
+#
+# DISTINCT + SUBQUERY
+SELECT DISTINCT table_schema FROM information_schema.tables
+WHERE table_name IN (SELECT table_name FROM information_schema.tables
+ WHERE table_schema = 'db_datadict')
+ORDER BY table_name;
+#
+# JOIN
+SELECT table_name FROM information_schema.tables t1
+LEFT JOIN information_schema.tables t2 USING(table_name,table_schema)
+WHERE t2.table_schema = 'db_datadict'
+ORDER BY table_name;
+#
+# No schema assigned in SELECT + we are in SCHEMA test
+# --> The table tables does not exist
+USE test;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM tables;
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.1.17+3.2.1.18
+--echo #########################################################################
+# 3.2.1.17: Ensure that the SELECT privilege is granted TO PUBLIC WITH GRANT
+# OPTION on every INFORMATION_SCHEMA table.
+#
+# 3.2.1.18: Ensure that the CREATE VIEW privilege on an INFORMATION_SCHEMA table
+# may be granted to any user.
+#
+# Note (mleich): The requirements are to some extend outdated.
+# Every user is allowed to SELECT on the INFORMATION_SCHEMA.
+# But the result sets depend on the privileges of the user.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <some_engine>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT UNIQUE, f2 BIGINT)
+ENGINE = $engine_type;
+SELECT * FROM db_datadict.t1;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+GRANT CREATE VIEW,SELECT ON db_datadict.* TO testuser1@localhost
+WITH GRANT OPTION;
+GRANT USAGE ON db_datadict.* TO testuser2@localhost;
+FLUSH PRIVILEGES;
+
+# Check 0: Reveal that GRANT <some privilege> ON INFORMATION_SCHEMA is no
+# longer allowed.
+--error ER_DBACCESS_DENIED_ERROR
+GRANT SELECT on information_schema.* TO testuser1@localhost;
+--error ER_DBACCESS_DENIED_ERROR
+GRANT CREATE VIEW ON information_schema.* TO 'u_6_401018'@'localhost';
+
+# Check 1: Show that a "simple" user (<> root) has the permission to SELECT
+# on some INFORMATION_SCHEMA table.
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+SELECT table_schema,table_name FROM information_schema.tables
+WHERE table_schema = 'information_schema' AND table_name = 'tables';
+
+# Check 2: Show the privileges of the user on some INFORMATION_SCHEMA tables.
+SELECT * FROM information_schema.table_privileges
+WHERE table_schema = 'information_schema';
+SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'information_schema';
+
+# Check 3: Show the following
+# 1. If a simple user (testuser1) has the privilege to create a VIEW
+# than this VIEW could use a SELECT on an INFORMATION_SCHEMA table.
+# 2. This user (testuser1) is also able to GRANT the SELECT privilege
+# on this VIEW to another user (testuser2).
+# 3. The other user (testuser2) must be able to SELECT on this VIEW
+# but gets a different result set than testuser1, if the view
+# has SQL SECURITY INVOKER.
+CREATE SQL SECURITY INVOKER VIEW db_datadict.v2 AS
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM information_schema.tables WHERE table_schema = 'db_datadict';
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM db_datadict.v2
+ORDER BY TABLE_NAME;
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM information_schema.tables WHERE table_schema = 'db_datadict'
+ORDER BY TABLE_NAME;
+GRANT SELECT ON db_datadict.v2 to testuser2@localhost;
+#
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict);
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM db_datadict.v2;
+SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
+FROM information_schema.tables WHERE table_schema = 'db_datadict';
+
+# Cleanup
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP DATABASE db_datadict;
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.1.19
+--echo #########################################################################
+# Ensure that no other privilege on an INFORMATION_SCHEMA table is granted, or
+# may be granted, to any user.
+#
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+
+# Initial privileges on the INFORMATION_SCHEMA tables (empty result sets)
+let $my_select1 = SELECT 'empty result set was expected' AS my_col
+FROM information_schema.schema_privileges
+WHERE table_schema = 'information_schema';
+let $my_select2 = SELECT 'empty result set was expected' AS my_col
+FROM information_schema.table_privileges
+WHERE table_schema = 'information_schema';
+let $my_select3 = SELECT 'empty result set was expected' AS my_col
+FROM information_schema.column_privileges
+WHERE table_schema = 'information_schema';
+eval $my_select1;
+eval $my_select2;
+eval $my_select3;
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT ALTER ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT ALTER ROUTINE ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT CREATE ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT CREATE ROUTINE ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT CREATE TEMPORARY TABLES ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT DELETE ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT DROP ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT EXECUTE ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT INDEX ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT INSERT ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT LOCK TABLES ON information_schema.*
+TO 'testuser1'@'localhost';
+
+#FIXME: check GRANT on IS
+--error ER_DBACCESS_DENIED_ERROR
+GRANT UPDATE ON information_schema.*
+TO 'testuser1'@'localhost';
+
+# Has something accidently changed?
+eval $my_select1;
+eval $my_select2;
+eval $my_select3;
+
+# Cleanup
+DROP USER 'testuser1'@'localhost';
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.1.16
+--echo #########################################################################
+# Ensure that no user may use any INFORMATION_SCHEMA table to determine any
+# information on a database and/or its structure unless authorized to get that
+# information.
+# Note: The plan is to create a new database and objects within it so that
+# any INFORMATION_SCHEMA table gets additional rows if possible.
+# A user having no rights on the new database and no rights on objects
+# must nowhere see tha name of the new database.
+--source suite/funcs_1/datadict/basics_mixed3.inc
+
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <some_engine>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT NOT NULL, f3 BIGINT,
+PRIMARY KEY(f1))
+ENGINE = $engine_type;
+CREATE UNIQUE INDEX UIDX ON db_datadict.t1(f3);
+CREATE PROCEDURE db_datadict.sproc1() SELECT 'db_datadict';
+CREATE FUNCTION db_datadict.func1() RETURNS INT RETURN 0;
+CREATE TRIGGER db_datadict.trig1 BEFORE INSERT ON db_datadict.t1
+FOR EACH ROW SET @aux = 1;
+CREATE VIEW db_datadict.v1 AS SELECT * FROM db_datadict.t1;
+CREATE VIEW db_datadict.v2 AS SELECT * FROM information_schema.tables;
+
+--source suite/funcs_1/datadict/basics_mixed3.inc
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT ALL ON test.* TO 'testuser1'@'localhost';
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , test);
+--source suite/funcs_1/datadict/basics_mixed3.inc
+
+# Cleanup
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# Thorough tests checking the requirements above per every INFORMATION_SCHEMA
+# table are within other scripts.
+# We check here only that the requirement is fulfilled even when using a
+# STORED PROCEDURE.
+--disable_warnings
+DROP PROCEDURE IF EXISTS test.p1;
+--enable_warnings
+--error ER_DBACCESS_DENIED_ERROR
+CREATE PROCEDURE test.p1()
+INSERT INTO information_schema.tables
+SELECT * FROM information_schema.tables LIMIT 1;
+
+CREATE PROCEDURE test.p1()
+UPDATE information_schema.columns SET table_schema = 'garbage';
+--error ER_DBACCESS_DENIED_ERROR
+CALL test.p1();
+
+DROP PROCEDURE test.p1;
+--error ER_DBACCESS_DENIED_ERROR
+CREATE PROCEDURE test.p1()
+DELETE FROM information_schema.schemata;
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.17.1+3.2.17.2: To be implemented outside of this script
+--echo #########################################################################
+# 3.2.17.1 Ensure that every INFORMATION_SCHEMA table shows all the correct
+# information, and no incorrect information, for a database to which
+# 100 different users, each of which has a randomly issued set of
+# privileges and access to a randomly chosen set of database objects,
+# have access.
+# The database should contain a mixture of all types of database
+# objects (i.e. tables, views, stored procedures, triggers).
+# 3.2.17.2 Ensure that every INFORMATION_SCHEMA table shows all the correct
+# information, and no incorrect information, for 10 different
+# databases to which 50 different users, each of which has a randomly
+# issued set of privileges and access to a randomly chosen set of
+# database objects in two or more of the databases, have access.
+# The databases should each contain a mixture of all types of database
+# objects (i.e. tables, views, stored procedures, triggers).
+#
+# Note(mleich): These requirements are kept here so that they do not get lost.
+# The tests are not yet implemented.
+# If they are ever developed than they should be stored in other
+# scripts. They will have most probably a long runtime because
+# the current INFORMATION_SCHEMA implementation has some performance
+# issues if a lot of users, privileges and objects are involved.
+#
diff --git a/mysql-test/suite/funcs_1/t/is_character_sets.test b/mysql-test/suite/funcs_1/t/is_character_sets.test
new file mode 100644
index 00000000..22ed5aeb
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_character_sets.test
@@ -0,0 +1,107 @@
+# suite/funcs_1/t/is_character_sets.test
+#
+# Check the layout of information_schema.character_sets and run some
+# functionality related tests.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+let $is_table = CHARACTER_SETS;
+
+# The table INFORMATION_SCHEMA.CHARACTER_SETS must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.2.1: INFORMATION_SCHEMA.CHARACTER_SETS layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.CHARACTER_SETS table has the following
+# columns, in the following order:
+#
+# CHARACTER_SET_NAME (shows a character set name),
+# DEFAULT_COLLATE_NAME (shows the name of the default collation for that
+# character set),
+# DESCRIPTION (shows a descriptive name for that character set),
+# MAXLEN (shows the number of bytes used to store each character supported by
+# that character set).
+#
+eval DESCRIBE information_schema.$is_table;
+eval SHOW CREATE TABLE information_schema.$is_table;
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.character_sets is in is_columns_is.test.
+# Retrieval of information_schema.character_sets content is in
+# charset_collation.inc (sourced by charset_collation_*.test).
+
+
+echo # Testcases 3.2.2.2 and 3.2.2.3 are checked in suite/funcs_1/t/charset_collation*.test;
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.character_sets
+SELECT * FROM information_schema.character_sets;
+
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.character_sets SET description = 'just updated';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.character_sets WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.character_sets;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx ON information_schema.character_sets(character_set_name);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.character_sets DROP PRIMARY KEY;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.character_sets ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.character_sets;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.character_sets RENAME db_datadict.character_sets;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.character_sets
+RENAME information_schema.xcharacter_sets;
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/t/is_check_constraints.test b/mysql-test/suite/funcs_1/t/is_check_constraints.test
new file mode 100644
index 00000000..3ae45e23
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_check_constraints.test
@@ -0,0 +1,141 @@
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+--echo #
+--echo # MDEV-14474: Create INFORMATION_SCHEMA.CHECK_CONSTRAINTS
+--echo #
+
+CREATE user boo1;
+GRANT select,create,alter,drop on foo.* to boo1;
+SHOW GRANTS for boo1;
+CREATE user boo2;
+create database foo;
+# Connect with user boo1
+CONNECT(con1,localhost, boo1,, foo);
+
+SET check_constraint_checks=1;
+CREATE TABLE t0
+(
+ t int, check (t>32) # table constraint
+) ENGINE=myisam;
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t0
+ADD CONSTRAINT CHK_t0_t CHECK(t<100);
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t0
+DROP CONSTRAINT CHK_t0_t;
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t0
+ADD CONSTRAINT CHECK(t<50);
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+CREATE TABLE t1
+( t int CHECK(t>2), # field constraint
+ tt int,
+ CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints
+ CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint
+) ENGINE=InnoDB;
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t1
+DROP CONSTRAINT CHK_tt;
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+CREATE TABLE t2
+(
+name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint
+start_date DATE,
+end_date DATE,
+CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint
+)ENGINE=Innodb;
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t1
+ADD CONSTRAINT CHK_new_ CHECK(t>tt);
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+# Create table with same field and table check constraint name
+CREATE TABLE t3
+(
+a int,
+b int check (b>0), # field constraint named 'b'
+CONSTRAINT b check (b>10), # table constraint
+# `CHECK_CLAUSE` should allow more then `var(64)` constraints
+CONSTRAINT b1 check (b<123456789012345678901234567890123456789012345678901234567890123456789)
+) ENGINE=InnoDB;
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+DISCONNECT con1;
+CONNECT(con2, localhost, boo2,,"*NO-ONE*");
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+DISCONNECT con2;
+CONNECT(con1, localhost, boo1,,foo);
+DROP TABLE t0;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP DATABASE foo;
+
+DISCONNECT con1;
+--CONNECTION default
+DROP USER boo1;
+DROP USER boo2;
+
+--echo #
+--echo # MDEV-18440: Information_schema.check_constraints possible data leak
+--echo #
+
+CREATE USER foo;
+CREATE DATABASE db;
+USE db;
+CREATE TABLE t1 (a int, b int, CONSTRAINT CHECK (b > 0));
+INSERT INTO t1 VALUES (1, 2), (2, 3);
+GRANT SELECT (a) ON t1 TO foo;
+
+SHOW GRANTS FOR foo;
+--sorted_result
+SELECT * FROM information_schema.check_constraints;
+
+CONNECT(con1,localhost, foo,, db);
+SELECT a FROM t1;
+--sorted_result
+SELECT * FROM information_schema.check_constraints;
+
+--CONNECTION default
+
+DROP USER foo;
+DROP DATABASE db;
+
+--echo #
+--echo # MDEV-24601: INFORMATION_SCHEMA doesn't differentiate between
+--echo # column and table-level CHECK constraints
+--echo #
+
+# Mix of table (>0) and field (<0) constraints
+# Note that there are 2 constraints `t2` - this is not allowed MDEV-24601
+use test;
+create table t(check (t0>0),
+ t0 int,
+ t1 int check (t1<0),
+ t2 int check (t2<-1),
+ CONSTRAINT tc_1 check(t1 > 1),
+ CONSTRAINT t2 check(t2 > 1));
+show create table t;
+--sorted_result
+select * from information_schema.table_constraints where CONSTRAINT_TYPE='CHECK';
+--sorted_result
+select * from information_schema.check_constraints;
+drop table t;
diff --git a/mysql-test/suite/funcs_1/t/is_cml_innodb.test b/mysql-test/suite/funcs_1/t/is_cml_innodb.test
new file mode 100644
index 00000000..a37e5c8d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_cml_innodb.test
@@ -0,0 +1,41 @@
+# suite/funcs_1/t/is_cml_innodb.test
+#
+# Check the content of information_schema.columns about tables using
+# UNICODE columns.
+# Variant for storage engine InnoDB
+#
+# Author:
+# 2008-06-04 mleich Create this script based on older scripts and new code.
+#
+
+--source include/have_ucs2.inc
+
+# This test cannot be used for the embedded server because privileges
+# are expected within result sets.
+--source include/not_embedded.inc
+
+--source include/have_innodb.inc
+let $engine_type= InnoDB;
+USE test;
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+eval CREATE TABLE t1
+(
+ f1 CHAR UNICODE,
+ f2 CHAR(0) UNICODE,
+ f3 CHAR(10) UNICODE,
+ f5 VARCHAR(0) UNICODE,
+ f6 VARCHAR(255) UNICODE,
+ f7 VARCHAR(260) UNICODE,
+ f8 TEXT UNICODE,
+ f9 TINYTEXT UNICODE,
+ f10 MEDIUMTEXT UNICODE,
+ f11 LONGTEXT UNICODE
+) ENGINE = $engine_type;
+
+# We look only for the tables created here.
+let $my_where = WHERE table_schema LIKE 'test%';
+--source suite/funcs_1/datadict/columns.inc
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/funcs_1/t/is_cml_memory.test b/mysql-test/suite/funcs_1/t/is_cml_memory.test
new file mode 100644
index 00000000..41602ac8
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_cml_memory.test
@@ -0,0 +1,37 @@
+# suite/funcs_1/t/is_cml_memory.test
+#
+# Check the content of information_schema.columns about tables using
+# UNICODE columns.
+# Variant for storage engine MEMORY
+#
+# Author:
+# 2008-06-04 mleich Create this script based on older scripts and new code.
+#
+
+--source include/have_ucs2.inc
+
+# This test cannot be used for the embedded server because privileges
+# are expected within result sets.
+--source include/not_embedded.inc
+
+let $engine_type= MEMORY;
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+eval CREATE TABLE t1
+(
+ f1 CHAR UNICODE,
+ f2 CHAR(0) UNICODE,
+ f3 CHAR(10) UNICODE,
+ f5 VARCHAR(0) UNICODE,
+ f6 VARCHAR(255) UNICODE,
+ f7 VARCHAR(260) UNICODE
+) ENGINE = $engine_type;
+
+# We look only for the tables created here.
+let $my_where = WHERE table_schema LIKE 'test%';
+--source suite/funcs_1/datadict/columns.inc
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/funcs_1/t/is_cml_myisam.test b/mysql-test/suite/funcs_1/t/is_cml_myisam.test
new file mode 100644
index 00000000..904cefbd
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_cml_myisam.test
@@ -0,0 +1,41 @@
+# suite/funcs_1/t/is_cml_myisam.test
+#
+# Check the content of information_schema.columns about tables using
+# UNICODE columns.
+# Variant for storage engine MyISAM
+#
+# Author:
+# 2008-06-04 mleich Create this script based on older scripts and new code.
+#
+
+--source include/have_ucs2.inc
+
+# This test cannot be used for the embedded server because privileges
+# are expected within result sets.
+--source include/not_embedded.inc
+
+let $engine_type= MyISAM;
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+USE test;
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+eval CREATE TABLE t1
+(
+ f1 CHAR UNICODE,
+ f2 CHAR(0) UNICODE,
+ f3 CHAR(10) UNICODE,
+ f5 VARCHAR(0) UNICODE,
+ f6 VARCHAR(255) UNICODE,
+ f7 VARCHAR(260) UNICODE,
+ f8 TEXT UNICODE,
+ f9 TINYTEXT UNICODE,
+ f10 MEDIUMTEXT UNICODE,
+ f11 LONGTEXT UNICODE
+) ENGINE = $engine_type;
+
+# We look only for the tables created here.
+let $my_where = WHERE table_schema LIKE 'test%';
+--source suite/funcs_1/datadict/columns.inc
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test b/mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test
new file mode 100644
index 00000000..d2a33592
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test
@@ -0,0 +1,108 @@
+# suite/funcs_1/t/is_coll_char_set_appl.test
+#
+# Check the layout of information_schema.collation_character_set_applicability
+# and some functionality related tests.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+let $is_table = COLLATION_CHARACTER_SET_APPLICABILITY;
+
+# The table INFORMATION_SCHEMA.CHARACTER_SET_APPLICABILITY must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.4.1: INFORMATION_SCHEMA.CHARACTER_SET_APPLICABILITY layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.CHARACTER_SET_APPLICABILITY table has the
+# following columns, in the following order:
+#
+# COLLATION_NAME (shows the name of a collation),
+# CHARACTER_SET_NAME (shows the name of a character set to which that
+# collation applies).
+#
+eval DESCRIBE information_schema.$is_table;
+eval SHOW CREATE TABLE information_schema.$is_table;
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.collation_character_set_applicability is in
+# is_columns_is.test.
+# Retrieval of information_schema.collation_character_set_applicability
+# content is in charset_collation.inc (sourced by charset_collation_*.test).
+
+echo # Testcases 3.2.4.2 and 3.2.4.3 are checked in suite/funcs_1/t/charset_collation*.test;
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.collation_character_set_applicability
+SELECT * FROM information_schema.collation_character_set_applicability;
+
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.collation_character_set_applicability
+SET collation_name = 'big6_chinese_ci' WHERE character_set_name = 'big6';
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.collation_character_set_applicability
+SET character_set_name = 't_4711';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.collation_character_set_applicability;
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.collation_character_set_applicability;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx
+ON information_schema.collation_character_set_applicability(collation_name);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.collation_character_set_applicability ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.collation_character_set_applicability;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.collation_character_set_applicability
+RENAME db_datadict.collation_character_set_applicability;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.collation_character_set_applicability
+RENAME information_schema.xcollation_character_set_applicability;
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/t/is_collations.test b/mysql-test/suite/funcs_1/t/is_collations.test
new file mode 100644
index 00000000..db34a7b7
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_collations.test
@@ -0,0 +1,114 @@
+# suite/funcs_1/t/is_collations.test
+#
+# Check the layout of information_schema.collations and some
+# functionality related tests.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+let $is_table = COLLATIONS;
+
+# The table INFORMATION_SCHEMA.COLLATIONS must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.3.1: INFORMATION_SCHEMA.COLLATIONS layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.COLLATIONS table has the following
+# columns, in the following order:
+#
+# COLLATION_NAME (shows a collation name),
+# CHARACTER_SET_NAME (shows the name of the character set to which the
+# collation applies),
+# ID (shows a numeric identifier for that collation/character set combination),
+# IS_DEFAULT (shows whether the collation is the default collation for the
+# character set shown),
+# IS_COMPILED (indicates whether the collation is compiled into the MySQL server),
+# SORTLEN (shows a value related to the amount of memory required to sort
+# strings using this collation/character set combination).
+#
+eval DESCRIBE information_schema.$is_table;
+eval SHOW CREATE TABLE information_schema.$is_table;
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.collations is in is_columns_is.test.
+# Retrieval of information_schema.collations content is in
+# charset_collation.inc (sourced by charset_collation_*.test).
+
+echo # Testcases 3.2.3.2 and 3.2.3.3 are checked in suite/funcs_1/t/charset_collation*.test;
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.collations
+SELECT * FROM information_schema.collations;
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.collations
+ (collation_name,character_set_name,id,is_default,is_compiled,sortlen)
+VALUES ( 'cp1251_bin', 'cp1251',50, '', '',0);
+
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.collations SET description = 'just updated';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.collations WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.collations;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx ON information_schema.collations(character_set_name);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.collations DROP PRIMARY KEY;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.collations ADD f1 INT;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.collations ENABLE KEYS;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.collations;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.collations RENAME db_datadict.collations;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.collations
+RENAME information_schema.xcollations;
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/t/is_column_privileges.test b/mysql-test/suite/funcs_1/t/is_column_privileges.test
new file mode 100644
index 00000000..7c0d7c7c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_column_privileges.test
@@ -0,0 +1,336 @@
+# suite/funcs_1/t/is_column_privileges.test
+#
+# Check the layout of information_schema.column_privileges and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing tables
+# within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = COLUMN_PRIVILEGES;
+
+# The table INFORMATION_SCHEMA.COLUMN_PRIVILEGES must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.5.1: INFORMATION_SCHEMA.COLUMN_PRIVILEGES layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.COLUMN_PRIVILEGES table has the following
+# columns, in the following order:
+#
+# GRANTEE (shows the name of a user who has either granted,
+# or been granted a column privilege),
+# TABLE_CATALOG (always shows NULL),
+# TABLE_SCHEMA (shows the name of the schema, or database, in which the table
+# for which a column privilege has been granted resides),
+# TABLE_NAME (shows the name of the table),
+# COLUMN_NAME (shows the name of the column on which a column privilege has
+# been granted),
+# PRIVILEGE_TYPE (shows the type of privilege that was granted; must be either
+# SELECT, INSERT, UPDATE, or REFERENCES),
+# IS_GRANTABLE (shows whether that privilege was granted WITH GRANT OPTION).
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns
+# about information_schema.column_privileges is in is_columns_is.test.
+
+# Show that TABLE_CATALOG is always NULL.
+SELECT table_catalog, table_schema, table_name, column_name, privilege_type
+FROM information_schema.column_privileges WHERE table_catalog IS NOT NULL;
+
+
+--echo ######################################################################
+--echo # Testcase 3.2.5.2+3.2.5.3+3.2.5.4:
+--echo # INFORMATION_SCHEMA.COLUMN_PRIVILEGES accessible information
+--echo ######################################################################
+# 3.2.5.2: Ensure that the table shows the relevant information on every
+# column privilege which has been granted to the current user or
+# PUBLIC, or which was granted by the current user.
+# 3.2.5.3: Ensure that the table does not show any information on any column
+# privilege which was granted to any user other than the current user
+# or PUBLIC, or which was granted by any user other than
+# the current user.
+# 3.2.5.4: Ensure that the table does not show any information on any
+# privileges that are not column privileges for the current user.
+#
+# Note: Check of content within information_schema.column_privileges about the
+# databases information_schema, mysql and test is in
+# is_column_privileges_is_mysql_test.test
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 INT, f2 DECIMAL, f3 TEXT)
+ENGINE = $other_engine_type;
+
+USE db_datadict;
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+
+GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT INSERT(f1) ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT UPDATE(f2) ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT SELECT(f2) ON db_datadict.t1 TO 'testuser2'@'localhost';
+GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost';
+GRANT SELECT(f3) ON db_datadict.t1 TO 'testuser3'@'localhost';
+
+GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'
+WITH GRANT OPTION;
+GRANT ALL ON db_datadict.* TO 'testuser3'@'localhost';
+
+let $select= SELECT * FROM information_schema.column_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+eval $select;
+
+# Note: WITH GRANT OPTION applies to all privileges on this table
+# and not to the columns mentioned only.
+GRANT UPDATE(f3) ON db_datadict.t1 TO 'testuser1'@'localhost'
+WITH GRANT OPTION;
+
+eval $select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+eval $select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict);
+eval $select;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser3, localhost, testuser3, , db_datadict);
+
+--echo # FIXME: Is it correct that granted TABLES do not occur in COLUMN_PRIVILEGES?
+SELECT * FROM information_schema.table_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee,table_schema,table_name,privilege_type;
+SELECT * FROM information_schema.schema_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee,table_schema,privilege_type;
+eval $select;
+GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser2'@'localhost';
+
+--echo # FIXME: Is it intended that *my* grants to others are *NOT* shown here?
+eval $select;
+
+connection testuser2;
+eval $select;
+
+# Cleanup
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+
+
+--echo ################################################################################
+--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMN_PRIVILEGES modifications
+--echo ################################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+# Note (mleich):
+# The MySQL privilege system allows to GRANT objects before they exist.
+# (Exception: Grant privileges for columns of not existing tables/views.)
+# There is also no migration of privileges if objects (tables, views, columns)
+# are moved to other databases (tables only), renamed or dropped.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.my_table (f1 BIGINT, f2 CHAR(10), f3 DATE)
+ENGINE = $engine_type;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT ALL ON test.* TO 'testuser1'@'localhost';
+
+let $my_select = SELECT * FROM information_schema.column_privileges
+WHERE table_name = 'my_table'
+ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
+let $my_show = SHOW GRANTS FOR 'testuser1'@'localhost';
+eval $my_select;
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , test);
+eval $my_select;
+eval $my_show;
+
+connection default;
+GRANT SELECT (f1,f3) ON db_datadict.my_table TO 'testuser1'@'localhost';
+eval $my_select;
+eval $my_show;
+
+connection testuser1;
+eval $my_select;
+eval $my_show;
+
+connection default;
+ALTER TABLE db_datadict.my_table DROP COLUMN f3;
+GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost';
+eval $my_select;
+eval $my_show;
+
+connection testuser1;
+eval $my_select;
+eval $my_show;
+--error ER_BAD_FIELD_ERROR
+SELECT f1, f3 FROM db_datadict.my_table;
+
+connection default;
+ALTER TABLE db_datadict.my_table CHANGE COLUMN f1 my_col BIGINT;
+eval $my_select;
+eval $my_show;
+
+connection testuser1;
+eval $my_select;
+eval $my_show;
+
+connection default;
+DROP TABLE db_datadict.my_table;
+eval $my_select;
+eval $my_show;
+
+connection testuser1;
+eval $my_select;
+eval $my_show;
+
+connection default;
+REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost';
+eval $my_select;
+eval $my_show;
+
+connection testuser1;
+eval $my_select;
+eval $my_show;
+
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA table are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT)
+ENGINE = $engine_type;
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT (f1) ON db_datadict.t1 TO 'testuser1'@'localhost';
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.column_privileges
+SELECT * FROM information_schema.column_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+UPDATE information_schema.column_privileges SET table_schema = 'test'
+WHERE table_name = 't1';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.column_privileges WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.column_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx_on_tables
+ON information_schema.column_privileges(table_schema);
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.column_privileges ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.column_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.column_privileges
+RENAME db_datadict.column_privileges;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.column_privileges
+RENAME information_schema.xcolumn_privileges;
+
+# Cleanup
+DROP DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+
diff --git a/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test
new file mode 100644
index 00000000..200ee66e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test
@@ -0,0 +1,59 @@
+# suite/funcs_1/t/is_column_privileges_is_mysql_test.test
+#
+# Check the content of information_schema.column_privileges about the databases
+# information_schema and mysql visible to high and low privileged users.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+--echo ##############################################################################
+--echo # Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information
+--echo ##############################################################################
+# 3.2.9.2 Ensure that the table shows the relevant information for every
+# database on which the current user or PUBLIC have privileges.
+# 3.2.9.3 Ensure that the table does not show any information on any databases
+# on which the current user and PUBLIC have no privileges.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+# Create a low privileged user.
+# Note: The database db_datadict is just a "home" for the low privileged user
+# and not in the focus of testing.
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+
+let $my_select = SELECT * FROM information_schema.column_privileges
+WHERE table_schema IN ('information_schema','mysql','test')
+ORDER BY table_schema, table_name, column_name;
+let $my_show1 = SHOW DATABASES LIKE 'information_schema';
+let $my_show2 = SHOW DATABASES LIKE 'mysql';
+let $my_show3 = SHOW DATABASES LIKE 'test';
+eval $my_select;
+eval $my_show1;
+eval $my_show2;
+eval $my_show3;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+eval $my_select;
+eval $my_show1;
+eval $my_show2;
+eval $my_show3;
+
+# Cleanup
+connection default;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/t/is_columns.test b/mysql-test/suite/funcs_1/t/is_columns.test
new file mode 100644
index 00000000..c167740b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_columns.test
@@ -0,0 +1,445 @@
+# suite/funcs_1/t/is_columns.test
+#
+# Check the layout of information_schema.columns and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on its content.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing tables
+# within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+--source include/default_charset.inc
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = COLUMNS;
+
+# The table INFORMATION_SCHEMA.COLUMNS must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.6.1: INFORMATION_SCHEMA.COLUMNS layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.COLUMNS table has the following columns,
+# in the following order:
+#
+# TABLE_CATALOG (always shows NULL),
+# TABLE_SCHEMA (shows the name of the database, or schema, in which an
+# accessible table resides),
+# TABLE_NAME (shows the name of an accessible table),
+# COLUMN_NAME (shows the name of a column within that table),
+# ORDINAL_POSITION (shows the ordinal position of that column in that table),
+# COLUMN_DEFAULT (shows the column's default value),
+# IS_NULLABLE (shows whether the column may accept NULL values),
+# DATA_TYPE (shows the column's defined data type; keyword only),
+# CHARACTER_MAXIMUM_LENGTH (shows, for a string column, the column's defined
+# maximum length in characters; otherwise NULL),
+# CHARACTER_OCTET_LENGTH (shows, for a string column, the column's defined
+# maximum length in octets; otherwise NULL),
+# NUMERIC_PRECISION (shows, for a numeric column, the column's or data type's
+# defined precision; otherwise NULL),
+# NUMERIC_SCALE (shows, for a numeric column, the column's or data type's
+# defined scale; otherwise NULL),
+# CHARACTER_SET_NAME (shows, for a character string column, the column's default
+# character set; otherwise NULL),
+# COLLATION_NAME (shows, for a character string column, the column's default
+# collation; otherwise NULL),
+# COLUMN_TYPE (shows the column's complete, defined data type),
+# COLUMN_KEY (shows whether the column is indexed; possible values are PRI if
+# the column is part of a PRIMARY KEY, UNI if the column is part of a
+# UNIQUE key, MUL if the column is part of an index key that allows
+# duplicates),
+# EXTRA (shows any additional column definition information, e.g. whether the
+# column was defined with the AUTO_INCREMENT attribute),
+# PRIVILEGES (shows the privileges available to the user on the column),
+# COLUMN_COMMENT (shows the comment, if any, defined for the comment;
+# otherwise NULL).
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.columns is in is_columns_is.test.
+
+# Show that TABLE_CATALOG is always 'def'.
+SELECT table_catalog, table_schema, table_name, column_name
+FROM information_schema.columns WHERE table_catalog IS NULL OR table_catalog <> 'def';
+
+
+--echo ###############################################################################
+--echo # Testcase 3.2.6.2 + 3.2.6.3: INFORMATION_SCHEMA.COLUMNS accessible information
+--echo ###############################################################################
+# 3.2.6.2: Ensure that the table shows the relevant information on the columns
+# of every table that is accessible to the current user or to PUBLIC.
+# 3.2.6.3: Ensure that the table does not show any information on the columns
+# of any table which is not accessible to the current user or PUBLIC.
+#
+# Note: Check of content within information_schema.columns about
+# databases is in
+# mysql is_columns_mysql.test
+# information_schema is_columns_is.test
+# test% is_columns_<engine>.test
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE db_datadict.t1
+ (f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT AUTO_INCREMENT,
+ UNIQUE INDEX MUL_IDX(f1,f3), PRIMARY KEY (f4))
+ENGINE = $other_engine_type;
+CREATE VIEW db_datadict.v1 AS SELECT 1 AS f1, 1 AS f2;
+GRANT SELECT(f1, f2) ON db_datadict.t1 TO 'testuser1'@'localhost';
+GRANT SELECT(f2) ON db_datadict.v1 TO 'testuser1'@'localhost';
+
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE db_datadict.t2
+(f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT, PRIMARY KEY (f1,f4))
+ENGINE = $other_engine_type;
+GRANT INSERT(f1, f2) ON db_datadict.t2 TO 'testuser2'@'localhost';
+
+let $my_select= SELECT * FROM information_schema.columns
+ WHERE table_schema = 'db_datadict'
+ORDER BY table_schema, table_name, ordinal_position;
+let $my_show1 = SHOW COLUMNS FROM db_datadict.t1;
+let $my_show2 = SHOW COLUMNS FROM db_datadict.t2;
+let $my_show3 = SHOW COLUMNS FROM db_datadict.v1;
+
+# Point of view of user root.
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval $my_select;
+eval $my_show1;
+eval $my_show2;
+eval $my_show3;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval $my_select;
+eval $my_show1;
+--error ER_TABLEACCESS_DENIED_ERROR
+eval $my_show2;
+eval $my_show3;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict);
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval $my_select;
+--error ER_TABLEACCESS_DENIED_ERROR
+eval $my_show1;
+eval $my_show2;
+--error ER_TABLEACCESS_DENIED_ERROR
+eval $my_show3;
+
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+
+# Cleanup
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP DATABASE IF EXISTS db_datadict;
+
+
+--echo ###############################################################################
+--echo # Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMNS modifications
+--echo ###############################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+SELECT table_name FROM information_schema.columns
+WHERE table_name LIKE 't1_my_table%';
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE test.t1_my_table (f1 CHAR(12))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = $engine_type;
+# Settings used in CREATE TABLE must be visible in information_schema.columns.
+--vertical_results
+SELECT * FROM information_schema.columns
+WHERE table_name = 't1_my_table';
+--horizontal_results
+#
+# Check modification of TABLE_NAME
+SELECT table_name FROM information_schema.columns
+WHERE table_name LIKE 't1_my_table%';
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT table_name FROM information_schema.columns
+WHERE table_name LIKE 't1_my_table%';
+#
+# Check modification of TABLE_SCHEMA
+SELECT table_schema,table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT table_schema,table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check modification of COLUMN_NAME
+SELECT table_name, column_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12);
+SELECT table_name, column_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check modification of COLUMN size
+SELECT table_name, column_name, character_maximum_length,
+ character_octet_length, column_type
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(20);
+SELECT table_name, column_name, character_maximum_length,
+ character_octet_length, column_type
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check modification of COLUMN type
+SELECT table_name, column_name, character_maximum_length,
+ character_octet_length, column_type
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col VARCHAR(20);
+SELECT table_name, column_name, character_maximum_length,
+ character_octet_length, column_type
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check modify COLUMN DEFAULT
+SELECT table_name, column_name, column_default
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) DEFAULT 'hello';
+SELECT table_name, column_name, column_default
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check modify IS_NULLABLE
+SELECT table_name, column_name, is_nullable
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) NOT NULL;
+SELECT table_name, column_name, is_nullable
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check modify COLLATION
+SELECT table_name, column_name, collation_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) COLLATE 'latin1_general_cs';
+SELECT table_name, column_name, collation_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check modify CHARACTER SET
+SELECT table_name, column_name, character_maximum_length,
+ character_octet_length, character_set_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) CHARACTER SET utf8;
+SELECT table_name, column_name, character_maximum_length,
+ character_octet_length, character_set_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check modify COLUMN_COMMENT
+SELECT table_name, column_name, column_comment
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN first_col CHAR(10) COMMENT 'Hello';
+SELECT table_name, column_name, column_comment
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check ADD COLUMN
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+ADD COLUMN second_col CHAR(10);
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check switch ordinal position of column
+SELECT table_name, column_name, ordinal_position
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+ALTER TABLE db_datadict.t1_my_tablex
+MODIFY COLUMN second_col CHAR(10) FIRST;
+SELECT table_name, column_name, ordinal_position
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+#
+# Check DROP COLUMN
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+DROP COLUMN first_col;
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check set COLUMN UNIQUE
+SELECT table_name, column_name, column_key
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+ALTER TABLE db_datadict.t1_my_tablex
+ADD UNIQUE INDEX IDX(second_col);
+SELECT table_name, column_name, column_key
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check impact of DROP TABLE
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name, column_name
+FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check a VIEW
+CREATE VIEW test.t1_my_tablex
+AS SELECT 1 AS "col1", 'A' collate latin1_german1_ci AS "col2";
+--vertical_results
+SELECT * FROM information_schema.columns
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_name, column_name;
+--horizontal_results
+DROP VIEW test.t1_my_tablex;
+SELECT table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+#
+# Check impact of DROP SCHEMA
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = $engine_type AS
+SELECT 1;
+SELECT table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.columns
+WHERE table_name = 't1_my_tablex';
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA table are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+DROP TABLE IF EXISTS test.t1;
+--enable_warnings
+CREATE DATABASE db_datadict;
+CREATE TABLE test.t1 (f1 BIGINT);
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.columns (table_schema,table_name,column_name)
+VALUES('test','t1', 'f2');
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.columns (table_schema,table_name,column_name)
+VALUES('test','t2', 'f1');
+
+--error ER_DBACCESS_DENIED_ERROR
+UPDATE information_schema.columns SET table_name = 't4' WHERE table_name = 't1';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.columns WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.columns;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX i3 ON information_schema.columns(table_name);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.columns ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.columns;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.columns RENAME db_datadict.columns;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.columns RENAME information_schema.xcolumns;
+
+# Cleanup
+DROP TABLE test.t1;
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/t/is_columns_innodb.test b/mysql-test/suite/funcs_1/t/is_columns_innodb.test
new file mode 100644
index 00000000..275c9805
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_columns_innodb.test
@@ -0,0 +1,26 @@
+# suite/funcs_1/t/is_columns_innodb.test
+#
+# Check the content of information_schema.columns about tables within
+# the databases created by the user.
+# Variant for storage engine InnoDB
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source include/default_charset.inc
+
+let $engine_type= InnoDB;
+--source suite/funcs_1/datadict/datadict_load.inc
+
+# We look only for the tables created by datadict_load.inc.
+let $my_where = WHERE table_schema LIKE 'test%';
+--source suite/funcs_1/datadict/columns.inc
+
+--source suite/funcs_1/include/cleanup.inc
diff --git a/mysql-test/suite/funcs_1/t/is_columns_is.test b/mysql-test/suite/funcs_1/t/is_columns_is.test
new file mode 100644
index 00000000..e1771dfa
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_columns_is.test
@@ -0,0 +1,23 @@
+# suite/funcs_1/t/is_columns_is.test
+#
+# Check the content of information_schema.columns about tables within
+# the database information_schema.
+# Variant for the non embedded server
+# The expected results must equal is_columns_is_embedded except that
+# columns.privileges are not empty.
+#
+# Note: The INFORMATION_SCHEMA table PROFILING is optional (exists in MySQL
+# Community version only) and therefore we exclude it from retrieval.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+
+let $my_where = WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%';
+--source suite/funcs_1/datadict/columns.inc
diff --git a/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test
new file mode 100644
index 00000000..bb9cc2a6
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test
@@ -0,0 +1,21 @@
+# suite/funcs_1/t/is_columns_is_embedded.test
+#
+# Check the content of information_schema.columns about tables within
+# the database information_schema.
+# Variant for the embedded server
+# The expected results must equal is_columns_is except that
+# columns.privileges is empty.
+#
+# Note: The INFORMATION_SCHEMA table PROFILING is optional (exists in MySQL
+# Community version only) and therefore we exclude it from retrieval.
+#
+# Author:
+# 2008-06-06 mleich Create this variant for the embedded server
+#
+
+--source include/have_innodb.inc
+--source include/is_embedded_no_privileges.inc
+
+let $my_where = WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%';
+--source suite/funcs_1/datadict/columns.inc
diff --git a/mysql-test/suite/funcs_1/t/is_columns_memory.test b/mysql-test/suite/funcs_1/t/is_columns_memory.test
new file mode 100644
index 00000000..f5ed6b6e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_columns_memory.test
@@ -0,0 +1,30 @@
+# suite/funcs_1/t/is_columns_memory.test
+#
+# Check the content of information_schema.columns about tables within
+# the databases created by the user.
+# Variant for storage engine MEMORY
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+--source include/default_charset.inc
+
+--enable_prepare_warnings
+
+let $engine_type= MEMORY;
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+--source suite/funcs_1/datadict/datadict_load.inc
+
+# We look only for the tables created by datadict_load.inc.
+let $my_where = WHERE table_schema LIKE 'test%';
+--source suite/funcs_1/datadict/columns.inc
+
+--disable_prepare_warnings
+
+--source suite/funcs_1/include/cleanup.inc
diff --git a/mysql-test/suite/funcs_1/t/is_columns_myisam.test b/mysql-test/suite/funcs_1/t/is_columns_myisam.test
new file mode 100644
index 00000000..97a23717
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_columns_myisam.test
@@ -0,0 +1,30 @@
+# suite/funcs_1/t/is_columns_myisam.test
+#
+# Check the content of information_schema.columns about tables within
+# the databases created by the user.
+# Variant for storage engine MyISAM and the non embedded server
+# The expected results must equal is_columns_myisam_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source include/default_charset.inc
+
+--enable_prepare_warnings
+
+let $engine_type= MyISAM;
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+--source suite/funcs_1/datadict/datadict_load.inc
+
+# We look only for the tables created by datadict_load.inc.
+let $my_where = WHERE table_schema LIKE 'test%';
+--source suite/funcs_1/datadict/columns.inc
+
+--disable_prepare_warnings
+
+--source suite/funcs_1/include/cleanup.inc
diff --git a/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test
new file mode 100644
index 00000000..3679cdeb
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test
@@ -0,0 +1,24 @@
+# suite/funcs_1/t/is_columns_myisam_embedded.test
+#
+# Check the content of information_schema.columns about tables within
+# the databases created by the user.
+# Variant for storage engine MyISAM and the embedded server
+# The expected results must equal is_columns_myisam except that all users
+# have all privileges (affects some result sets).
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+--source include/is_embedded_no_privileges.inc
+
+let $engine_type= MyISAM;
+--enable_prepare_warnings
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+--source suite/funcs_1/datadict/datadict_load.inc
+
+# We look only for the tables created by datadict_load.inc.
+let $my_where = WHERE table_schema LIKE 'test%';
+--source suite/funcs_1/datadict/columns.inc
+
+--source suite/funcs_1/include/cleanup.inc
diff --git a/mysql-test/suite/funcs_1/t/is_columns_mysql.test b/mysql-test/suite/funcs_1/t/is_columns_mysql.test
new file mode 100644
index 00000000..0566241b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_columns_mysql.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/is_columns_mysql.test
+#
+# Check the content of information_schema.columns about tables within
+# the database mysql.
+# Variant for the non embedded server
+# The expected results must equal is_columns_mysql_embedded except that
+# columns.privileges are not empty.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+
+let $my_where = WHERE table_schema = 'mysql';
+--source suite/funcs_1/datadict/columns.inc
diff --git a/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test
new file mode 100644
index 00000000..9ef1b6d8
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test
@@ -0,0 +1,16 @@
+# suite/funcs_1/t/is_columns_mysql_embedded.test
+#
+# Check the content of information_schema.columns about tables within
+# the database mysql.
+# Variant for the embedded server
+# The expected results must equal is_columns_mysql except that
+# columns.privileges is empty.
+#
+# Author:
+# 2008-06-06 mleich Create this variant for the embedded server
+#
+
+--source include/is_embedded_no_privileges.inc
+
+let $my_where = WHERE table_schema = 'mysql';
+--source suite/funcs_1/datadict/columns.inc
diff --git a/mysql-test/suite/funcs_1/t/is_engines.test b/mysql-test/suite/funcs_1/t/is_engines.test
new file mode 100644
index 00000000..1a361d21
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines.test
@@ -0,0 +1,124 @@
+# suite/funcs_1/t/is_engines.test
+#
+# Check the layout of information_schema.engines
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing tables
+# within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+# Some results of the subtests depend on the storage engines assigned.
+#
+# Author:
+# 2008-02-29 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = ENGINES;
+
+# The table INFORMATION_SCHEMA.ENGINES must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.ENGINES layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.ENGINES table has the following columns,
+# in the following order:
+#
+# ENGINE
+# SUPPORT
+# COMMENT
+# TRANSACTIONS
+# XA
+# SAVEPOINTS
+#
+# Value Meaning
+# YES The feature is supported and is active.
+# NO The feature is not supported = The server was compiled without
+# support for the feature.
+# DISABLED The feature is supported but has been disabled.
+#
+eval DESCRIBE information_schema.$is_table;
+eval SHOW CREATE TABLE information_schema.$is_table;
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.engines is in is_columns_is.test.
+
+# FIXME: Check the regression tests and implement tests checking the
+# functionality if missing.
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = $engine_type;
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.engines
+SELECT * FROM information_schema.engines;
+
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.engines SET engine = '1234567';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.engines WHERE support IN ('DEFAULT','YES');
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.engines;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx_on_engines ON information_schema.engines(engine);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.engines DROP PRIMARY KEY;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.engines ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.engines;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.engines RENAME db_datadict.engines;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.engines RENAME information_schema.xengines;
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/t/is_engines_archive.test b/mysql-test/suite/funcs_1/t/is_engines_archive.test
new file mode 100644
index 00000000..b34433b6
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines_archive.test
@@ -0,0 +1,15 @@
+# suite/funcs_1/t/is_engines_archive.test
+#
+# Check the content of information_schema.engines
+# Variant for storage engine ARCHIVE
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+
+let $engine_type= ARCHIVE;
+--source include/have_archive.inc
+--vertical_results
+eval SELECT * FROM information_schema.engines
+WHERE ENGINE = '$engine_type';
diff --git a/mysql-test/suite/funcs_1/t/is_engines_blackhole.test b/mysql-test/suite/funcs_1/t/is_engines_blackhole.test
new file mode 100644
index 00000000..dd7ed885
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines_blackhole.test
@@ -0,0 +1,15 @@
+# suite/funcs_1/t/is_engines_blackhole.test
+#
+# Check the content of information_schema.engines
+# Variant for storage engine BLACKHOLE
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+
+let $engine_type= BLACKHOLE;
+--source include/have_blackhole.inc
+--vertical_results
+eval SELECT * FROM information_schema.engines
+WHERE ENGINE = '$engine_type';
diff --git a/mysql-test/suite/funcs_1/t/is_engines_csv.test b/mysql-test/suite/funcs_1/t/is_engines_csv.test
new file mode 100644
index 00000000..c087cd22
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines_csv.test
@@ -0,0 +1,15 @@
+# suite/funcs_1/t/is_engines_csv.test
+#
+# Check the content of information_schema.engines
+# Variant for storage engine CSV
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+
+let $engine_type= CSV;
+--source include/have_csv.inc
+--vertical_results
+eval SELECT * FROM information_schema.engines
+WHERE ENGINE = '$engine_type';
diff --git a/mysql-test/suite/funcs_1/t/is_engines_federated.test b/mysql-test/suite/funcs_1/t/is_engines_federated.test
new file mode 100644
index 00000000..45ed8d10
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines_federated.test
@@ -0,0 +1,15 @@
+# suite/funcs_1/t/is_engines_federated.test
+#
+# Check the content of information_schema.engines
+# Variant for storage engine FEDERATED
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+--source include/not_embedded.inc # loading engines not generally possible in embedded
+let $engine_type= FEDERATED;
+--source suite/federated/have_federatedx.inc
+--vertical_results
+eval SELECT * FROM information_schema.engines
+WHERE ENGINE = '$engine_type';
diff --git a/mysql-test/suite/funcs_1/t/is_engines_innodb.test b/mysql-test/suite/funcs_1/t/is_engines_innodb.test
new file mode 100644
index 00000000..b78cb647
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines_innodb.test
@@ -0,0 +1,16 @@
+# suite/funcs_1/t/is_engines_innodb.test
+#
+# Check the content of information_schema.engines
+# Variant for storage engine InnoDB
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+
+let $engine_type= InnoDB;
+--source include/have_innodb.inc
+--vertical_results
+--replace_regex /Percona-XtraDB, //
+eval SELECT * FROM information_schema.engines
+WHERE ENGINE = '$engine_type';
diff --git a/mysql-test/suite/funcs_1/t/is_engines_memory.test b/mysql-test/suite/funcs_1/t/is_engines_memory.test
new file mode 100644
index 00000000..c9e24958
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines_memory.test
@@ -0,0 +1,14 @@
+# suite/funcs_1/t/is_engines_memory.test
+#
+# Check the content of information_schema.engines
+# Variant for storage engine MEMORY
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+
+let $engine_type= MEMORY;
+--vertical_results
+eval SELECT * FROM information_schema.engines
+WHERE ENGINE = '$engine_type';
diff --git a/mysql-test/suite/funcs_1/t/is_engines_merge.test b/mysql-test/suite/funcs_1/t/is_engines_merge.test
new file mode 100644
index 00000000..45755860
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines_merge.test
@@ -0,0 +1,14 @@
+# suite/funcs_1/t/is_engines_innodb.test
+#
+# Check the content of information_schema.engines
+# Variant for storage engine InnoDB
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+
+let $engine_type= MRG_MYISAM;
+--vertical_results
+eval SELECT * FROM information_schema.engines
+WHERE ENGINE = '$engine_type';
diff --git a/mysql-test/suite/funcs_1/t/is_engines_myisam.test b/mysql-test/suite/funcs_1/t/is_engines_myisam.test
new file mode 100644
index 00000000..d7e9a28b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines_myisam.test
@@ -0,0 +1,14 @@
+# suite/funcs_1/t/is_tables_myisam.test
+#
+# Check the content of information_schema.engines
+# Variant for storage engine MyISAM
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+
+let $engine_type= MyISAM;
+--vertical_results
+eval SELECT * FROM information_schema.engines
+WHERE ENGINE = '$engine_type';
diff --git a/mysql-test/suite/funcs_1/t/is_events.test b/mysql-test/suite/funcs_1/t/is_events.test
new file mode 100644
index 00000000..69d1af6b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_events.test
@@ -0,0 +1,168 @@
+# suite/funcs_1/t/is_events.test
+#
+# Check the layout of information_schema.events and some functionality of it.
+#
+# This test is not intended for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+#
+# Author:
+# 2008-02-29 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+#
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = EVENTS;
+
+# The table INFORMATION_SCHEMA.EVENTS must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.EVENTS layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.EVENTS table has the following columns,
+# in the following order:
+#
+# EVENT_CATALOG always NULL
+# EVENT_SCHEMA The name of the schema (database) to which this
+# event belongs.
+# EVENT_NAME The name of the event.
+# DEFINER The user who created the event.
+# 'user_name'@'host_name' format!
+# TIME_ZONE The time zone in effect when schedule for the event was
+# last modified
+# EVENT_BODY The language used for the statements in the event's
+# DO clause. (always SQL)
+# EVENT_DEFINITION The text of the SQL statement making up the event's
+# DO clause.
+# EVENT_TYPE One of the two values ONE TIME or RECURRING.
+# EXECUTE_AT one-time event: DATETIME value specified in the AT clause
+# of the CREATE EVENT statement used to
+# create the event
+# or of the last ALTER EVENT statement that modified
+# the event.
+# INTERVAL_VALUE recurring events; numeric portion of the event's
+# EVERY clause.
+# INTERVAL_FIELD recurring events: units portion of the EVERY clause
+# governing the timing of the event, prefixed with
+# 'INTERVAL_'. Example: 'INTERVAL_DAY'
+# SQL_MODE The SQL mode in effect at the time the event was created
+# or altered.
+# STARTS For recurring event whose definition includes a STARTS
+# clause, this column contains the corresponding
+# DATETIME value. If there is no STARTS clause affecting
+# the timing of the event, this column is empty.
+# ENDS For a recurring event whose definition includes a ENDS
+# clause, this column contains the corresponding DATETIME
+# value. If there is no ENDS clause affecting the timing
+# of the event, this column contains NULL.
+# STATUS ENABLED, DISABLED or SLAVESIDE_DISABLED
+# ON_COMPLETION PRESERVE or NOT PRESERVE.
+# CREATED Date and time of event creation
+# LAST_ALTERED Date and time of the last event modification
+# never modified -> value = CREATED
+# LAST_EXECUTED Date and time of start of last event execution
+# never executed -> value IS NULL.
+# EVENT_COMMENT The text of a comment. Default: empty string.
+# ORIGINATOR The server ID of the MySQL server on which the event was
+# created; used in replication. Default: 0
+# CHARACTER_SET_CLIENT Session value of the character_set_client system variable
+# when the event was created.
+# COLLATION_CONNECTION Session value of the collation_connection system
+# variable when the event was created.
+# DATABASE_COLLATION Collation of the database with which the event
+# is associated.
+#
+eval DESCRIBE information_schema.$is_table;
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+eval SHOW CREATE TABLE information_schema.$is_table;
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.events is in is_columns_is.test.
+
+# Check event_catalog event_body, event_type, event_type, status, on_completion
+SELECT event_catalog, event_name, event_body, event_type, event_type,
+ status, on_completion
+FROM information_schema.events
+WHERE event_catalog IS NOT NULL or
+ event_body NOT IN ('SQL') or
+ event_type NOT IN ('ONE TIME','RECURRING') or
+ status NOT IN ('ENABLED','DISABLED','SLAVESIDE_DISABLED') or
+ on_completion NOT IN ('PRESERVE','NOT PRESERVE');
+
+# FIXME: Check the regression tests and implement tests checking the
+# functionality if missing.
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = $engine_type;
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.events
+SELECT * FROM information_schema.events;
+
+--error ER_DBACCESS_DENIED_ERROR,ER_NON_UPDATABLE_TABLE
+UPDATE information_schema.events SET event_name = '1234567'
+WHERE table_name = 't1';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.events WHERE event_catalog IS NULL;
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.events;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx_on_events ON information_schema.events(event_name);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.events DROP PRIMARY KEY;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.events ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.events;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.events RENAME db_datadict.events;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.events RENAME information_schema.xevents;
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/t/is_key_column_usage.test b/mysql-test/suite/funcs_1/t/is_key_column_usage.test
new file mode 100644
index 00000000..8a911231
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_key_column_usage.test
@@ -0,0 +1,20 @@
+# suite/funcs_1/t/is_key_column_usage.test
+#
+# Check the layout of information_schema.key_column_usage and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on it.
+# Variant for the non embedded server
+# The expected results must equal is_key_column_usage_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_key_column_usage.inc
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source suite/funcs_1/datadict/is_key_column_usage.inc
diff --git a/mysql-test/suite/funcs_1/t/is_key_column_usage_embedded.test b/mysql-test/suite/funcs_1/t/is_key_column_usage_embedded.test
new file mode 100644
index 00000000..d7e5b1dd
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_key_column_usage_embedded.test
@@ -0,0 +1,21 @@
+# suite/funcs_1/t/is_key_column_usage_embedded.test
+#
+# Check the layout of information_schema.key_column_usage and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on it.
+# Variant for the embedded server
+# The expected results must equal is_key_column_usage except that all users
+# have all privileges (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_key_column_usage.inc
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+--source include/have_innodb.inc
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+--source suite/funcs_1/datadict/is_key_column_usage.inc
diff --git a/mysql-test/suite/funcs_1/t/is_routines.test b/mysql-test/suite/funcs_1/t/is_routines.test
new file mode 100644
index 00000000..30a0e02c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_routines.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/is_routines.test
+#
+# Check the layout of information_schema.routines and the impact of
+# CREATE/ALTER/DROP PROCEDURE/FUNCTION ... on it.
+# Variant for the non embedded server
+# The expected results must equal is_routines_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_routines.inc
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source suite/funcs_1/datadict/is_routines.inc
diff --git a/mysql-test/suite/funcs_1/t/is_routines_embedded.test b/mysql-test/suite/funcs_1/t/is_routines_embedded.test
new file mode 100644
index 00000000..86e11456
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_routines_embedded.test
@@ -0,0 +1,20 @@
+# suite/funcs_1/t/is_routines_embedded.test
+#
+# Check the layout of information_schema.routines and the impact of
+# CREATE/ALTER/DROP PROCEDURE/FUNCTION ... on it.
+# Variant for the embedded server
+# The expected results must equal is_routines except that all users
+# have all privileges (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_routines.inc
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+--source suite/funcs_1/datadict/is_routines.inc
diff --git a/mysql-test/suite/funcs_1/t/is_schema_privileges.test b/mysql-test/suite/funcs_1/t/is_schema_privileges.test
new file mode 100644
index 00000000..8d0ec916
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_schema_privileges.test
@@ -0,0 +1,317 @@
+# suite/funcs_1/t/is_schema_privileges.test
+#
+# Check the layout of information_schema.schema_privileges and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing schemas
+# information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = SCHEMA_PRIVILEGES;
+
+# The table INFORMATION_SCHEMA.SCHEMA_PRIVILEGES must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.15.1: INFORMATION_SCHEMA.SCHEMA_PRIVILEGES layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.SCHEMA_PRIVILEGES table has the following
+# columns, in the following order:
+#
+# GRANTEE (shows a user to whom a schema privilege has been granted),
+# TABLE_CATALOG (always shows NULL),
+# TABLE_SCHEMA (shows the name of the database, or schema, on which the
+# privilege has been granted),
+# PRIVILEGE_TYPE (shows the granted privilege),
+# IS_GRANTABLE (shows whether the privilege was granted WITH GRANT OPTION)
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns
+# about information_schema.schema_privileges is in is_columns_is.test.
+
+# Show that TABLE_CATALOG is always NULL.
+SELECT GRANTEE, TABLE_CATALOG, TABLE_SCHEMA, PRIVILEGE_TYPE
+FROM information_schema.schema_privileges WHERE table_catalog IS NOT NULL;
+
+
+--echo ###############################################################################
+--echo # Testcase 3.2.15.2-3.2.15.4 INFORMATION_SCHEMA.SCHEMA_PRIVILEGES accessibility
+--echo ###############################################################################
+# 3.2.15.2 Ensure that the table shows the relevant information on every
+# schema-level privilege which has been granted to the current user
+# or to PUBLIC, or has been granted by the current user.
+# FIXME: Why is "or has been granted by the current user" invisible?
+# 3.2.15.3 Ensure that the table does not show any information on any
+# schema-level privileges which have been granted to users
+# other than the current user or to PUBLIC, or that have been
+# granted by any user other than the current user.
+# 3.2.15.4 Ensure that the table does not show any information on any
+# privileges that are not schema-level privileges for the
+# current user.
+#
+# Note: Check of content within information_schema.schema_privileges about the
+# databases information_schema, mysql and test is in
+# is_schema_privileges_is_mysql_test.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict_1;
+DROP DATABASE IF EXISTS db_datadict_2;
+DROP DATABASE IF EXISTS db_datadict_3;
+--enable_warnings
+CREATE DATABASE db_datadict_1;
+CREATE DATABASE db_datadict_2;
+CREATE DATABASE db_datadict_3;
+eval
+CREATE TABLE db_datadict_2.t1(f1 INT, f2 INT, f3 INT)
+ENGINE = $engine_type;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+
+GRANT INSERT ON db_datadict_1.* TO 'testuser1'@'localhost';
+GRANT INSERT ON db_datadict_2.t1 TO 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict_4.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+GRANT SELECT ON db_datadict_3.* TO 'testuser2'@'localhost';
+GRANT SELECT ON db_datadict_1.* TO 'testuser2'@'localhost';
+
+let $my_select = SELECT * FROM information_schema.schema_privileges
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY grantee,table_schema,privilege_type;
+let $show_testuser1 = SHOW GRANTS FOR 'testuser1'@'localhost';
+let $show_testuser2 = SHOW GRANTS FOR 'testuser2'@'localhost';
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, ,"*NO-ONE*");
+GRANT SELECT ON db_datadict_4.* TO 'testuser2'@'localhost';
+--echo # Root granted INSERT db_datadict_1 to me -> visible
+--echo # Root granted SELECT db_datadict_1 to testuser2 -> invisible
+--echo # Root granted INSERT db_datadict_2.t1 (no schema-level priv!)
+--echo # but not db_datadict_2 to me -> invisible
+--echo # Root granted SELECT db_datadict_3. to testuser2 but not to me -> invisible
+--echo # Root granted SELECT db_datadict_4. to me -> visible
+--echo # I granted SELECT db_datadict_4. to testuser2 -> invisible (reality), visible(requirement)
+--echo # FIXME
+eval $my_select;
+eval $show_testuser1;
+--error ER_DBACCESS_DENIED_ERROR
+eval $show_testuser2;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, ,"*NO-ONE*");
+--echo # Root granted SELECT db_datadict_1 to me -> visible
+--echo # Root granted INSERT db_datadict_1 to testuser1 -> invisible
+--echo # Root granted INSERT db_datadict_2.t1 but not db_datadict_1 to testuser1 -> invisible
+--echo # Root granted SELECT db_datadict_3. to me -> visible
+--echo # testuser1 granted SELECT db_datadict_4. to me -> visible
+eval $my_select;
+--error ER_DBACCESS_DENIED_ERROR
+eval $show_testuser1;
+eval $show_testuser2;
+
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+eval $my_select;
+eval $show_testuser1;
+eval $show_testuser2;
+
+# Cleanup
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP DATABASE db_datadict_1;
+DROP DATABASE db_datadict_2;
+DROP DATABASE db_datadict_3;
+
+
+--echo ################################################################################
+--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMA_PRIVILEGES modifications
+--echo ################################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+# Note (mleich):
+# The MySQL privilege system allows to GRANT objects before they exist.
+# (Exception: Grant privileges for columns of not existing tables/views.)
+# There is also no migration of privileges if objects (tables, views, columns)
+# are moved to other databases (tables only), renamed or dropped.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--error 0,ER_CANNOT_USER
+DROP USER 'the_user'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON test.* TO 'testuser1'@'localhost';
+
+let $my_select = SELECT * FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict'
+ORDER BY grantee,table_schema,privilege_type;
+
+############ Check grant SCHEMA
+eval $my_select;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , test);
+eval $my_select;
+connection default;
+GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost';
+eval $my_select;
+eval $my_select;
+############ Check RENAME SCHEMA
+# Implement this if RENAME SCHEMA is again available.
+# Note(mleich): I expect that RENAME has no impact on the result sets, because
+# the schema_name is not migrated.
+# connection default;
+# RENAME SCHEMA db_datadict TO db_datadictx;
+# eval $my_select;
+# eval $my_select;
+# RENAME SCHEMA db_datadictx TO db_datadict;
+############ Check extend PRIVILEGES (affects PRIVILEGE_TYPE) on SCHEMA
+connection default;
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+eval $my_select;
+eval $my_select;
+############ Check extend PRIVILEGES (affects IS_GRANTABLE) on SCHEMA
+--echo # Switch to connection default
+connection default;
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+eval $my_select;
+eval $my_select;
+############ Check DROP SCHEMA
+# No impact, because there is no "maintenance" of privileges.
+connection default;
+DROP SCHEMA db_datadict;
+eval $my_select;
+eval $my_select;
+############ Check REVOKE PRIVILEGE
+connection default;
+REVOKE UPDATE ON db_datadict.* FROM 'testuser1'@'localhost';
+eval $my_select;
+eval $my_select;
+############ Check RENAME USER
+connection default;
+RENAME USER 'testuser1'@'localhost' TO 'the_user'@'localhost';
+eval $my_select;
+eval $my_select;
+disconnect testuser1;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (the_user, localhost, the_user, , test);
+eval $my_select;
+disconnect the_user;
+############ Check DROP USER
+connection default;
+eval $my_select;
+DROP USER 'the_user'@'localhost';
+eval $my_select;
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA table are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT)
+ENGINE = $engine_type;
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.schema_privileges
+SELECT * FROM information_schema.schema_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+UPDATE information_schema.schema_privileges SET table_schema = 'test'
+WHERE table_name = 't1';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.schema_privileges
+WHERE table_schema = 'db_datadict';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.schema_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx_on_tables
+ON information_schema.schema_privileges(table_schema);
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.schema_privileges ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.schema_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.schema_privileges
+RENAME db_datadict.schema_privileges;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.schema_privileges
+RENAME information_schema.xschema_privileges;
+
+# Cleanup
+DROP DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+
diff --git a/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test
new file mode 100644
index 00000000..f1e0d571
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test
@@ -0,0 +1,58 @@
+# suite/funcs_1/t/is_schema_privileges_is_mysql_test.test
+#
+# Check the content of information_schema.schema_privileges about the databases
+# information_schema, mysql and test visible to high and low privileged users.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+--echo ##############################################################################
+--echo # Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information
+--echo ##############################################################################
+# 3.2.9.2 Ensure that the table shows the relevant information for every
+# database on which the current user or PUBLIC have privileges.
+# 3.2.9.3 Ensure that the table does not show any information on any databases
+# on which the current user and PUBLIC have no privileges.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+# Create a low privileged user.
+# Note: The database db_datadict is just a "home" for the low privileged user
+# and not in the focus of testing.
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+
+let $my_select = SELECT * FROM information_schema.schema_privileges
+WHERE table_schema IN ('information_schema','mysql','test')
+ORDER BY grantee, table_schema, privilege_type;
+let $my_show1 = SHOW DATABASES LIKE 'information_schema';
+let $my_show2 = SHOW DATABASES LIKE 'mysql';
+let $my_show3 = SHOW DATABASES LIKE 'test';
+eval $my_select;
+eval $my_show1;
+eval $my_show2;
+eval $my_show3;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+eval $my_select;
+eval $my_show1;
+eval $my_show2;
+eval $my_show3;
+
+# Cleanup
+connection default;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/t/is_schemata.test b/mysql-test/suite/funcs_1/t/is_schemata.test
new file mode 100644
index 00000000..e262869e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_schemata.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/is_schemata.test
+#
+# Check the layout of information_schema.schemata, permissions and the impact of
+# CREATE/ALTER/DROP SCHEMA on it.
+# Variant for the non embedded server
+# The expected results must equal is_schemata_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_schemata.inc
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source suite/funcs_1/datadict/is_schemata.inc
diff --git a/mysql-test/suite/funcs_1/t/is_schemata_embedded.test b/mysql-test/suite/funcs_1/t/is_schemata_embedded.test
new file mode 100644
index 00000000..5fbb023d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_schemata_embedded.test
@@ -0,0 +1,20 @@
+# suite/funcs_1/t/is_schemata_embedded.test
+#
+# Check the layout of information_schema.schemata, permissions and the impact of
+# CREATE/ALTER/DROP SCHEMA on it.
+# Variant for the embedded server
+# The expected results must equal is_schemata except that all users
+# have all privileges (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_schemata.inc
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+--source suite/funcs_1/datadict/is_schemata.inc
diff --git a/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test
new file mode 100644
index 00000000..76c0b497
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test
@@ -0,0 +1,59 @@
+# suite/funcs_1/t/is_schemata_is_mysql_test.test
+#
+# Check the content of information_schema.schemata about the databases
+# information_schema and mysql visible to high and low privileged users.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+--source include/default_charset.inc
+
+--echo #################################################################################
+--echo # Testcases 3.2.9.2 + 3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information
+--echo #################################################################################
+# 3.2.9.2 Ensure that the table shows the relevant information for every
+# database on which the current user or PUBLIC have privileges.
+# 3.2.9.3 Ensure that the table does not show any information on any databases
+# on which the current user and PUBLIC have no privileges.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+
+# Create a low privileged user.
+# Note: The database db_datadict is just a "home" for the low privileged user
+# and not in the focus of testing.
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+
+let $my_select = SELECT * FROM information_schema.schemata
+WHERE schema_name IN ('information_schema','mysql','test')
+ORDER BY schema_name;
+let $my_show1 = SHOW DATABASES LIKE 'information_schema';
+let $my_show2 = SHOW DATABASES LIKE 'mysql';
+let $my_show3 = SHOW DATABASES LIKE 'test';
+eval $my_select;
+eval $my_show1;
+eval $my_show2;
+eval $my_show3;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+eval $my_select;
+eval $my_show1;
+eval $my_show2;
+eval $my_show3;
+
+# Cleanup
+connection default;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
diff --git a/mysql-test/suite/funcs_1/t/is_statistics.test b/mysql-test/suite/funcs_1/t/is_statistics.test
new file mode 100644
index 00000000..9f317eee
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_statistics.test
@@ -0,0 +1,376 @@
+# suite/funcs_1/t/is_statistics.test
+#
+# Check the layout of information_schema.statistics and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on its content.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing tables
+# within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = STATISTICS;
+
+# The table INFORMATION_SCHEMA.STATISTICS must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.14.1: INFORMATION_SCHEMA.STATISTICS layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.STATISTICS table has the following columns,
+# in the following order:
+#
+# TABLE_CATALOG (always shows NULL),
+# TABLE_SCHEMA (shows the database, or schema, in which a table indexed by
+# an accessible index resides),
+# TABLE_NAME (shows the name of the indexed table),
+# NON_UNIQUE (shows whether the index may contain duplicate values;
+# 0 if it cannot, 1 if it can),
+# INDEX_SCHEMA (shows the database, or schema, in which an accessible
+# index resides),
+# INDEX_NAME (shows the name of an index which the current user may access),
+# SEQ_IN_INDEX (shows the ordinal position of an indexed column within
+# the index),
+# COLUMN_NAME (shows the name of a column that comprises some, or all, of an
+# index key),
+# COLLATION (shows how the column is sorted in the index; either A for ascending
+# or NULL for unsorted columns),
+# CARDINALITY (shows the number of unique values in the index),
+# SUB_PART (shows the number of indexed characters if the index is
+# a prefix index),
+# PACKED (shows how the index key is packed),
+# NULLABLE (shows whether the index column may contain NULL values),
+# INDEX_TYPE (shows the index type; either BTREE, FULLTEXT, HASH or RTREE),
+# COMMENT (shows a comment on the index, if any).
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.statistics is in is_columns_is.test.
+
+# Show that TABLE_CATALOG is always NULL.
+SELECT table_catalog, table_schema, table_name, index_schema, index_name
+FROM information_schema.statistics WHERE table_catalog IS NOT NULL
+ORDER BY table_schema, table_name, index_schema, index_name;
+
+
+--echo ####################################################################################
+--echo # Testcase 3.2.14.2 + 3.2.14.3: INFORMATION_SCHEMA.STATISTICS accessible information
+--echo ####################################################################################
+# 3.2.14.2 Ensure that the table shows the relevant information on every index
+# which the current user or PUBLIC may access (usually because
+# privileges on the indexed table have been granted).
+# 3.2.14.3 Ensure that the table does not show any information on any indexes
+# which the current user and PUBLIC may not access.
+#
+# Note: Check of content within information_schema.statistics about
+# database is in
+# mysql is_statistics_mysql.test
+# information_schema is_statistics_is.test
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+DROP DATABASE IF EXISTS db_datadict_2;
+--enable_warnings
+CREATE DATABASE db_datadict;
+CREATE DATABASE db_datadict_2;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+GRANT ALL ON test.* TO 'testuser1'@'localhost';
+GRANT ALL ON test.* TO 'testuser2'@'localhost';
+
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1
+ (f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2))
+ENGINE = $engine_type;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t2
+ (f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2))
+ENGINE = $engine_type;
+
+eval
+CREATE TABLE db_datadict_2.t3
+ (f1 INT NOT NULL, f2 INT, f5 DATE,
+ PRIMARY KEY(f1), INDEX f2f1_ind(f2,f1), UNIQUE(f5))
+ENGINE = $engine_type;
+eval
+CREATE TABLE db_datadict_2.t4
+ (f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2))
+ENGINE = $engine_type;
+
+let $my_select = SELECT * FROM information_schema.statistics
+WHERE table_schema LIKE 'db_datadict%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+let $my_show1 = SHOW GRANTS FOR 'testuser1'@'localhost';
+let $my_show2 = SHOW GRANTS FOR 'testuser2'@'localhost';
+eval $my_select;
+eval $my_show1;
+eval $my_show2;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , test);
+# nothing visible for testuser1
+eval $my_select;
+eval $my_show1;
+--error ER_DBACCESS_DENIED_ERROR
+eval $my_show2;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , test);
+# nothing visible for testuser2
+eval $my_select;
+--error ER_DBACCESS_DENIED_ERROR
+eval $my_show1;
+eval $my_show2;
+
+connection default;
+GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost' WITH GRANT OPTION;
+GRANT SELECT(f1,f5) ON db_datadict_2.t3 TO 'testuser1'@'localhost';
+eval $my_select;
+eval $my_show1;
+eval $my_show2;
+
+connection testuser1;
+eval $my_select;
+eval $my_show1;
+--error ER_DBACCESS_DENIED_ERROR
+eval $my_show2;
+
+connection testuser2;
+eval $my_select;
+--error ER_DBACCESS_DENIED_ERROR
+eval $my_show1;
+eval $my_show2;
+
+connection default;
+REVOKE SELECT,GRANT OPTION ON db_datadict.t1 FROM 'testuser1'@'localhost';
+eval $my_show1;
+
+# nothing visible for testuser1
+connection testuser1;
+eval $my_select;
+eval $my_show1;
+
+# Cleanup
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP DATABASE db_datadict;
+DROP DATABASE db_datadict_2;
+
+
+--echo #########################################################################
+--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.STATISTICS modifications
+--echo #########################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP TABLE IF EXISTS test.t1_my_table;
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE test.t1_1 (f1 BIGINT,
+ f2 TEXT, f2x TEXT, f3 CHAR(10), f3x CHAR(10), f4 BIGINT, f4x BIGINT,
+ f5 POINT, f5x POINT NOT NULL)
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = $other_engine_type;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE test.t1_2 (f1 BIGINT, f2 BIGINT)
+ENGINE = $engine_type;
+
+# Tables without primary key or index do not show up
+# in information_schema.statistics.
+SELECT table_name FROM information_schema.statistics
+WHERE table_name LIKE 't1_%';
+# Check ADD PRIMARY KEY (two columns)
+ALTER TABLE test.t1_1 ADD PRIMARY KEY (f1,f3);
+SELECT * FROM information_schema.statistics
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+# Check DROP PRIMARY KEY
+ALTER TABLE test.t1_1 DROP PRIMARY KEY;
+SELECT table_name FROM information_schema.statistics
+WHERE table_name LIKE 't1_%';
+# Check ADD PRIMARY KEY (one column)
+ALTER TABLE test.t1_1 ADD PRIMARY KEY (f1);
+SELECT * FROM information_schema.statistics
+WHERE table_name LIKE 't1_%';
+# Some variations on index definitions
+# 1. No name assigned, one column
+ALTER TABLE test.t1_1 ADD INDEX (f4);
+# 2. Name assigned, two columns
+CREATE INDEX f3_f1 ON test.t1_1 (f3,f1);
+# 3. Unique index
+CREATE UNIQUE INDEX f4x_uni ON test.t1_1 (f4x);
+# 4. Index using HASH
+CREATE INDEX f2_hash USING HASH ON test.t1_2 (f2);
+# 5. Index with comment (feature introduced in 5.2)
+--error ER_PARSE_ERROR
+CREATE INDEX f1_idx ON test.t1_2 (f1) COMMENT = 'COMMENT';
+# 6. NOT NULL
+CREATE INDEX not_null ON test.t1_1 (f3x);
+# 7. Prefix index
+CREATE INDEX f2_prefix ON test.t1_1 (f2(20));
+#
+SELECT * FROM information_schema.statistics
+WHERE table_name LIKE 't1_%' AND index_name <> 'PRIMARY'
+ORDER BY table_schema,table_name,index_name,seq_in_index,column_name;
+--horizontal_results
+DROP TABLE test.t1_2;
+#
+# Check modification of TABLE_NAME
+SELECT DISTINCT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1';
+RENAME TABLE test.t1_1 TO test.t1_1x;
+SELECT DISTINCT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+#
+# Check modification of TABLE_SCHEMA
+SELECT DISTINCT table_schema,table_name FROM information_schema.statistics
+WHERE table_name LIKE 't1_1%';
+RENAME TABLE test.t1_1x TO db_datadict.t1_1x;
+SELECT DISTINCT table_schema,table_name FROM information_schema.statistics
+WHERE table_name LIKE 't1_1%';
+#
+# Check impact of DROP TABLE
+SELECT DISTINCT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+DROP TABLE db_datadict.t1_1x;
+SELECT DISTINCT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+#
+# Check a temporary table (not visible)
+--replace_result $engine_type <engine_type>
+eval
+CREATE TEMPORARY TABLE test.t1_1x (PRIMARY KEY(f1,f2))
+ENGINE = $engine_type
+ AS SELECT 1 AS f1, 2 AS f2;
+--vertical_results
+SELECT * FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+--horizontal_results
+DROP TEMPORARY TABLE test.t1_1x;
+#
+# Check impact of DROP SCHEMA
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1_1x (PRIMARY KEY(f1))
+ENGINE = $engine_type
+ AS SELECT 1 AS f1, 2 AS f2;
+SELECT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.statistics
+WHERE table_name = 't1_1x';
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT)
+ENGINE = $engine_type;
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.statistics
+SELECT * FROM information_schema.statistics;
+
+--error ER_DBACCESS_DENIED_ERROR
+UPDATE information_schema.statistics SET table_schema = 'test'
+WHERE table_name = 't1';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.statistics WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.statistics;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx_on_statistics
+ON information_schema.statistics(table_schema);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.statistics DROP PRIMARY KEY;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.statistics ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.statistics;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.statistics RENAME db_datadict.statistics;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.statistics RENAME information_schema.xstatistics;
+
+# Cleanup
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/t/is_statistics_is.test b/mysql-test/suite/funcs_1/t/is_statistics_is.test
new file mode 100644
index 00000000..0cf5df64
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_statistics_is.test
@@ -0,0 +1,14 @@
+# suite/funcs_1/t/is_statistics_is.test
+#
+# Check the content of information_schema.statistics about tables within
+# the database information_schema for a high and a low privileged user.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+let $my_where = WHERE table_schema = 'information_schema';
+--source suite/funcs_1/datadict/statistics.inc
+
diff --git a/mysql-test/suite/funcs_1/t/is_statistics_mysql.test b/mysql-test/suite/funcs_1/t/is_statistics_mysql.test
new file mode 100644
index 00000000..2ddada4f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_statistics_mysql.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/is_statistics_mysql.test
+#
+# Check the content of information_schema.statistics about tables within
+# the database mysql for a high and a low privileged user.
+# Variant for the non embedded server
+# The expected results must equal is_statistics_mysql_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+let $database = mysql;
+let $my_where = WHERE table_schema = 'mysql';
+--source suite/funcs_1/datadict/statistics.inc
diff --git a/mysql-test/suite/funcs_1/t/is_statistics_mysql_embedded.test b/mysql-test/suite/funcs_1/t/is_statistics_mysql_embedded.test
new file mode 100644
index 00000000..6c315990
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_statistics_mysql_embedded.test
@@ -0,0 +1,20 @@
+# suite/funcs_1/t/is_statistics_mysql_embedded.test
+#
+# Check the content of information_schema.statistics about tables within
+# the database mysql for a high and a low privileged user.
+# Variant for the embedded server
+# The expected results must equal is_statistics_mysql except that all users
+# have all privileges (affects some result sets).
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+--source include/have_innodb.inc
+let $database = mysql;
+let $my_where = WHERE table_schema = 'mysql';
+--source suite/funcs_1/datadict/statistics.inc
diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints.test b/mysql-test/suite/funcs_1/t/is_table_constraints.test
new file mode 100644
index 00000000..b4d550fc
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_table_constraints.test
@@ -0,0 +1,318 @@
+# suite/funcs_1/t/is_table_constraints.test
+#
+# Check the layout of information_schema.table_constraints and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing tables
+# within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_typee.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+
+let $engine_type = MyISAM;
+
+let $is_table = TABLE_CONSTRAINTS;
+
+# The table INFORMATION_SCHEMA.TABLE_CONSTRAINTS must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+--echo #########################################################################
+--echo # Testcase 3.2.10.1: INFORMATION_SCHEMA.TABLE_CONSTRAINTS layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.TABLE_CONSTRAINTS table has the following
+# columns, in the following order:
+#
+# CONSTRAINT_CATALOG (always shows NULL),
+# CONSTRAINT_SCHEMA (shows the database, or schema, in which
+# a constraint an accessible table resides),
+# CONSTRAINT_NAME (shows the name of a constraint defined on
+# an accessible table),
+# TABLE_SCHEMA (shows the database, or schema, in which the
+# table resides),
+# TABLE_NAME (shows the name of the table),
+# CONSTRAINT_TYPE (shows the type of the constraint; either
+# 'primary key', 'foreign key', 'unique', 'check').
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.table_constraints is in is_columns_is.test.
+
+# Show that CONSTRAINT_CATALOG IS NULL
+SELECT constraint_catalog, constraint_schema, constraint_name,
+ table_schema, table_name
+FROM information_schema.table_constraints
+WHERE constraint_catalog IS NOT NULL
+ORDER BY constraint_schema, table_name, constraint_name;
+
+--echo #########################################################################################
+--echo # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information
+--echo #########################################################################################
+# 3.2.7.2: Ensure that the table shows the relevant information on every
+# column, defined to be part of an index key, which is accessible to
+# the current user or to PUBLIC.
+# 3.2.7.3: Ensure that the table does not show any information on any indexed
+# column that is not accessible to the current user or PUBLIC.
+#
+# Note: Check of content within table_constraints about tables within
+# database is checked in
+# mysql is_table_constraints_mysql
+# information_schema is_table_constraints_is
+#
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <some_engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT,
+ f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2))
+ENGINE = $engine_type;
+CREATE UNIQUE INDEX my_idx1 ON db_datadict.t1(f6,f1);
+CREATE UNIQUE INDEX my_idx2 ON db_datadict.t1(f3);
+--replace_result $engine_type <some_engine_type>
+eval
+CREATE TABLE db_datadict.t2 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT,
+ f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2))
+ENGINE = $engine_type;
+
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT(f5), UPDATE(f6) ON db_datadict.t1 TO 'testuser1'@'localhost';
+SHOW GRANTS FOR 'testuser1'@'localhost';
+
+let $my_select = SELECT * FROM information_schema.table_constraints
+WHERE table_schema = 'db_datadict'
+ORDER BY table_schema,table_name, constraint_name;
+let $my_show1 = SHOW INDEXES FROM db_datadict.t1;
+let $my_show2 = SHOW INDEXES FROM db_datadict.t2;
+
+eval $my_select;
+# 1 Table Note: We intentinally suppress the protocolling of all
+# 2 Non_unique output being not of interest or depending on
+# 3 Key_name storage engine used for the table.
+# 4 Seq_in_index
+# 5 Column_name
+# 6 Collation
+# 7 Cardinality
+# 8 Sub_part
+# 9 Packed
+# 10 Null
+# 11 Index_type
+# 12 Comment
+--replace_column 6 ### 7 ### 8 ### 9 ### 10 ### 11 ### 12 ###
+eval $my_show1;
+--replace_column 6 ### 7 ### 8 ### 9 ### 10 ### 11 ### 12 ###
+eval $my_show2;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+SHOW GRANTS FOR 'testuser1'@'localhost';
+eval $my_select;
+--replace_column 6 ### 7 ### 8 ### 9 ### 10 ### 11 ### 12 ###
+eval $my_show1;
+--error ER_TABLEACCESS_DENIED_ERROR
+eval $my_show2;
+
+# Cleanup
+connection default;
+disconnect testuser1;
+DROP USER 'testuser1'@'localhost';
+DROP DATABASE db_datadict;
+
+
+--echo #########################################################################################
+--echo # Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_CONSTRAINTS modifications
+--echo #########################################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+CREATE DATABASE db_datadict;
+
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name LIKE 't1_my_table%';
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE test.t1_my_table
+ (f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1))
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+ENGINE = $engine_type;
+# Settings used in CREATE TABLE must be visible
+# in information_schema.table_constraints.
+SELECT constraint_name, table_schema, table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_table';
+#
+# Check modification of TABLE_NAME
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name LIKE 't1_my_table%';
+RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name LIKE 't1_my_table%';
+#
+# Check modification of TABLE_SCHEMA
+SELECT table_schema,table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
+SELECT table_schema,table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+#
+let $my_select = SELECT constraint_schema, constraint_name, table_schema,
+table_name, constraint_type
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex'
+ORDER BY table_schema,table_name, constraint_name;
+#
+# Check ADD INDEX being not UNIQUE (does not show up in table_constraints)
+eval $my_select;
+CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2);
+eval $my_select;
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+#
+# Check ADD UNIQUE INDEX without name explicit assigned
+eval $my_select;
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2);
+eval $my_select;
+DROP INDEX f2 ON db_datadict.t1_my_tablex;
+#
+# Check ADD UNIQUE INDEX with name explicit assigned
+eval $my_select;
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,f1);
+eval $my_select;
+DROP INDEX my_idx ON db_datadict.t1_my_tablex;
+eval $my_select;
+ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2);
+eval $my_select;
+#
+# Check DROP COLUMN (removing an UNIQUE INDEX)
+eval $my_select;
+ALTER TABLE db_datadict.t1_my_tablex
+DROP COLUMN f2;
+eval $my_select;
+#
+# Check impact of DROP TABLE
+SELECT table_name
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+DROP TABLE db_datadict.t1_my_tablex;
+SELECT table_name
+FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+#
+# No UNIQUE CONSTRAINT -> no entry in key_column_usage
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1_my_tablex
+ENGINE = $engine_type AS
+SELECT 1 AS f1;
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+# UNIQUE CONSTRAINT -> entry in key_column_usage
+ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1);
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+#
+# Check impact of DROP SCHEMA
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+DROP DATABASE db_datadict;
+SELECT table_name FROM information_schema.table_constraints
+WHERE table_name = 't1_my_tablex';
+#
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT, UNIQUE(f1))
+ENGINE = $engine_type;
+
+--error ER_DBACCESS_DENIED_ERROR
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.table_constraints
+ (constraint_schema, constraint_name, table_name)
+VALUES ( 'mysql', 'primary', 'db');
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.table_constraints
+SELECT * FROM information_schema.table_constraints;
+
+--error ER_DBACCESS_DENIED_ERROR
+UPDATE information_schema.table_constraints
+SET table_name = 'db1' WHERE constraint_name = 'primary';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.table_constraints WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.table_constraints;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX i3 ON information_schema.table_constraints(table_name);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.table_constraints ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.table_constraints;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.table_constraints
+RENAME db_datadict.table_constraints;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.table_constraints
+RENAME information_schema.xtable_constraints;
+
+# Cleanup
+DROP TABLE db_datadict.t1;
+DROP DATABASE db_datadict;
+
diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints_is.test b/mysql-test/suite/funcs_1/t/is_table_constraints_is.test
new file mode 100644
index 00000000..61051263
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_table_constraints_is.test
@@ -0,0 +1,14 @@
+# suite/funcs_1/t/is_table_constraints_is.test
+#
+# Check the content of information_schema.table_constraints about tables within
+# the database information_schema with different privileged users.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+let $table_schema = information_schema;
+--source suite/funcs_1/datadict/table_constraints.inc
+
diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test
new file mode 100644
index 00000000..5a9cbd35
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test
@@ -0,0 +1,18 @@
+# suite/funcs_1/t/is_table_constraints_mysql.test
+#
+# Check the content of information_schema.table_constraints about tables within
+# the database mysql (= the system tables) with different privileged users.
+# Variant for the non embedded server
+# The expected results must equal is_table_constraints_mysql_embedded
+# except that the privilege system works (affects some result sets).
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+let $table_schema = mysql;
+--source suite/funcs_1/datadict/table_constraints.inc
diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints_mysql_embedded.test b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql_embedded.test
new file mode 100644
index 00000000..dbe00798
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql_embedded.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/is_table_constraints_mysql_embedded.test
+#
+# Check the content of information_schema.table_constraints about tables within
+# the database mysql (= the system tables) with different privileged users.
+# Variant for the embedded server
+# The expected results must equal is_table_constraints_mysql
+# except that all users have all privileges (affects some result sets).
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+--source include/have_innodb.inc
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+let $table_schema = mysql;
+--source suite/funcs_1/datadict/table_constraints.inc
diff --git a/mysql-test/suite/funcs_1/t/is_table_privileges.test b/mysql-test/suite/funcs_1/t/is_table_privileges.test
new file mode 100644
index 00000000..df28f2ca
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_table_privileges.test
@@ -0,0 +1,347 @@
+# suite/funcs_1/t/is_table_privileges.test
+#
+# Check the layout of information_schema.table_privileges and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing tables
+# within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = TABLE_PRIVILEGES;
+
+# The table INFORMATION_SCHEMA.TABLE_PRIVILEGES must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.11.1: INFORMATION_SCHEMA.TABLE_PRIVILEGES layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.TABLE_PRIVILEGES table has the following
+# columns, in the following order:
+#
+# GRANTEE (shows the name of a user who has either granted, or been granted a
+# table privilege),
+# TABLE_CATALOG (always shows NULL),
+# TABLE_SCHEMA (shows the name of the schema, or database, in which the table
+# for which a privilege has been granted resides),
+# TABLE_NAME (shows the name of the table),
+# PRIVILEGE_TYPE (shows the type of privilege that was granted; must be either
+# SELECT, INSERT, UPDATE, DELETE, REFERENCES, ALTER, INDEX, DROP or
+# CREATE VIEW),
+# IS_GRANTABLE (shows whether that privilege was granted WITH GRANT OPTION).
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns
+# about information_schema.table_privileges is in is_columns_is.test.
+
+# Show that TABLE_CATALOG is always NULL.
+SELECT table_catalog, table_schema, table_name, privilege_type
+FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL;
+
+--echo ######################################################################
+--echo # Testcase 3.2.11.2+3.2.11.3+3.2.11.4:
+--echo # INFORMATION_SCHEMA.TABLE_PRIVILEGES accessible information
+--echo ######################################################################
+# 3.2.11.2: Ensure that the table shows the relevant information on every
+# table privilege which has been granted to the current user or
+# PUBLIC, or which was granted by the current user.
+# 3.2.11.3: Ensure that the table does not show any information on any table
+# privilege which was granted to any user other than the current
+# user or PUBLIC, or which was granted by any user other than the
+# current user.
+# 3.2.11.4: Ensure that the table does not show any information on any
+# privileges that are not table privileges for the current user.
+#
+# To be implemented:
+# Check of content within information_schema.table_privileges about
+# databases like 'information_schema' or 'mysql'.
+# 2008-02-15 Neither root nor a just created low privileged user has table
+# privileges within these schemas.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.tb1(f1 INT, f2 INT, f3 INT)
+ENGINE = $engine_type;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT CREATE, SELECT ON db_datadict.*
+TO 'testuser1'@'localhost' WITH GRANT OPTION;
+GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION;
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+
+let $my_select = SELECT * FROM information_schema.table_privileges
+WHERE table_name LIKE 'tb%'
+ORDER BY grantee,table_schema,table_name,privilege_type;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE tb3 (f1 TEXT)
+ENGINE = $other_engine_type;
+GRANT SELECT ON db_datadict.tb3 TO 'testuser3'@'localhost';
+eval $my_select;
+SHOW GRANTS FOR 'testuser1'@'localhost';
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict);
+# we see only table privileges for this user, and not any other privileges
+eval $my_select;
+SHOW GRANTS FOR 'testuser2'@'localhost';
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser3, localhost, testuser3, , db_datadict);
+# we see only table privileges for this user, and not any other privileges
+eval $my_select;
+SHOW GRANTS FOR 'testuser3'@'localhost';
+
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+
+# we see only 'public' table privileges
+eval $my_select;
+SHOW GRANTS FOR 'testuser1'@'localhost';
+SHOW GRANTS FOR 'testuser2'@'localhost';
+SHOW GRANTS FOR 'testuser3'@'localhost';
+
+# Cleanup
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE db_datadict;
+
+
+--echo ################################################################################
+--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_PRIVILEGES modifications
+--echo ################################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+# Note (mleich):
+# The MySQL privilege system allows to GRANT objects before they exist.
+# (Exception: Grant privileges for columns of not existing tables/views.)
+# There is also no migration of privileges if objects (tables,views,columns)
+# are moved to other databases (tables only), renamed or dropped.
+#
+--disable_warnings
+DROP TABLE IF EXISTS test.t1_table;
+DROP VIEW IF EXISTS test.t1_view;
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE test.t1_table (f1 BIGINT)
+DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
+COMMENT = 'Initial Comment' ENGINE = $engine_type;
+CREATE VIEW test.t1_view AS SELECT 1;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'the_user'@'localhost';
+#
+# Check granted TABLE and VIEW
+SELECT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%';
+GRANT ALL ON test.t1_table TO 'testuser1'@'localhost';
+GRANT ALL ON test.t1_view TO 'testuser1'@'localhost';
+SELECT * FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY grantee, table_schema, table_name, privilege_type;
+#
+# Check modification of GRANTEE (migration of permissions)
+SELECT DISTINCT grantee, table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY grantee, table_name;
+RENAME USER 'testuser1'@'localhost' TO 'the_user'@'localhost';
+# FIXME: mleich Workaround for bug to be reported
+# It looks like an immediate reloading of the system tables is missing in case
+# of RENAME USER.
+FLUSH PRIVILEGES;
+SELECT DISTINCT grantee, table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY grantee, table_name;
+--error ER_NONEXISTING_GRANT
+SHOW GRANTS FOR 'testuser1'@'localhost';
+SHOW GRANTS FOR 'the_user'@'localhost';
+#
+# Check modification of TABLE_SCHEMA (no migration of permissions)
+SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+RENAME TABLE test.t1_table TO db_datadict.t1_table;
+--error ER_FORBID_SCHEMA_CHANGE
+RENAME TABLE test.t1_view TO db_datadict.t1_view;
+SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_schema,table_name;
+SHOW GRANTS FOR 'the_user'@'localhost';
+REVOKE ALL PRIVILEGES ON test.t1_table FROM 'the_user'@'localhost';
+REVOKE ALL PRIVILEGES ON test.t1_view FROM 'the_user'@'localhost';
+DROP VIEW test.t1_view;
+CREATE VIEW db_datadict.t1_view AS SELECT 1;
+GRANT ALL ON db_datadict.t1_table TO 'the_user'@'localhost';
+GRANT ALL ON db_datadict.t1_view TO 'the_user'@'localhost';
+#
+# Check modification of TABLE_NAME (no migration of permissions)
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+RENAME TABLE db_datadict.t1_table TO db_datadict.t1_tablex;
+RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx;
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+RENAME TABLE db_datadict.t1_tablex TO db_datadict.t1_table;
+RENAME TABLE db_datadict.t1_viewx TO db_datadict.t1_view;
+#
+# Check impact of DROP TABLE/VIEW (no removal of permissions)
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+DROP TABLE db_datadict.t1_table;
+DROP VIEW db_datadict.t1_view;
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+#
+# Check impact of DROP SCHEMA (no removal of permissions)
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1_table
+ENGINE = $engine_type AS
+SELECT 1;
+CREATE VIEW db_datadict.t1_view AS SELECT 1;
+GRANT ALL ON db_datadict.t1_table TO 'the_user'@'localhost';
+GRANT ALL ON db_datadict.t1_view TO 'the_user'@'localhost';
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+DROP DATABASE db_datadict;
+SELECT DISTINCT table_name FROM information_schema.table_privileges
+WHERE table_name LIKE 't1_%'
+ORDER BY table_name;
+
+# Cleanup
+DROP USER 'the_user'@'localhost';
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA table are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--disable_warnings
+DROP DATABASE IF EXISTS db_datadict;
+--enable_warnings
+CREATE DATABASE db_datadict;
+--replace_result $engine_type <engine_type>
+eval
+CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT)
+ENGINE = $engine_type;
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+GRANT SELECT (f1) ON db_datadict.t1 TO 'testuser1'@'localhost';
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.table_privileges
+SELECT * FROM information_schema.table_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+UPDATE information_schema.table_privileges SET table_schema = 'test'
+WHERE table_name = 't1';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.table_privileges WHERE table_name = 't1';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.table_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX my_idx_on_tables
+ON information_schema.table_privileges(table_schema);
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.table_privileges ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.table_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.table_privileges
+RENAME db_datadict.table_privileges;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.table_privileges
+RENAME information_schema.xtable_privileges;
+
+# Cleanup
+DROP DATABASE db_datadict;
+DROP USER 'testuser1'@'localhost';
+
diff --git a/mysql-test/suite/funcs_1/t/is_tables.test b/mysql-test/suite/funcs_1/t/is_tables.test
new file mode 100644
index 00000000..1c7620ff
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/tables.test
+#
+# Check the layout of information_schema.tables and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+# Variant for the non embedded server
+# The expected results must equal is_tables_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_tables.inc
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source suite/funcs_1/datadict/is_tables.inc
diff --git a/mysql-test/suite/funcs_1/t/is_tables_embedded.test b/mysql-test/suite/funcs_1/t/is_tables_embedded.test
new file mode 100644
index 00000000..d3c59fff
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables_embedded.test
@@ -0,0 +1,20 @@
+# suite/funcs_1/t/is_tables_embedded.test
+#
+# Check the layout of information_schema.tables and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+# Variant for the embedded server
+# The expected results must equal is_tables except that all users
+# have all privileges (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_tables.inc
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+--source suite/funcs_1/datadict/is_tables.inc
diff --git a/mysql-test/suite/funcs_1/t/is_tables_innodb.test b/mysql-test/suite/funcs_1/t/is_tables_innodb.test
new file mode 100644
index 00000000..ed6b7e60
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables_innodb.test
@@ -0,0 +1,22 @@
+# suite/funcs_1/t/is_tables_innodb.test
+#
+# Check the content of information_schema.tables about tables within
+# the databases created by the user.
+# Variant for storage engine InnoDB
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+--source include/have_innodb.inc
+let $engine_type= InnoDB;
+
+# We look only for the tables created by suite/funcs_1/datadict/tables.inc
+let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE';
+--source suite/funcs_1/datadict/tables.inc
diff --git a/mysql-test/suite/funcs_1/t/is_tables_is.test b/mysql-test/suite/funcs_1/t/is_tables_is.test
new file mode 100644
index 00000000..09f257ed
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables_is.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/is_tables_is.test
+#
+# Check the content of information_schema.tables about tables within
+# the database information_schema.
+#
+# Note: The INFORMATION_SCHEMA table PROFILING is optional (exists in MySQL
+# Community version only) and therefore we exclude it from retrieval.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+let $my_where = WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+AND table_name not like 'xtradb_%';
+--source suite/funcs_1/datadict/tables1.inc
diff --git a/mysql-test/suite/funcs_1/t/is_tables_is_embedded.test b/mysql-test/suite/funcs_1/t/is_tables_is_embedded.test
new file mode 100644
index 00000000..1d2a7d67
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables_is_embedded.test
@@ -0,0 +1,23 @@
+# suite/funcs_1/t/is_tables_is_embedded.test
+#
+# Check the layout of information_schema.tables and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+# Variant for the embedded server
+# The expected results must equal is_tables except that all users
+# have all privileges (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_tables.inc
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+let $my_where = WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling' AND table_name not like 'innodb_%'
+AND table_name not like 'xtradb_%';
+--source suite/funcs_1/datadict/tables1.inc
diff --git a/mysql-test/suite/funcs_1/t/is_tables_memory.test b/mysql-test/suite/funcs_1/t/is_tables_memory.test
new file mode 100644
index 00000000..68909aee
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables_memory.test
@@ -0,0 +1,22 @@
+# suite/funcs_1/t/is_tables_memory.test
+#
+# Check the content of information_schema.tables about tables within
+# the databases created by the user.
+# Variant for storage engine MEMORY
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+let $engine_type= MEMORY;
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+# We look only for the tables created by suite/funcs_1/datadict/tables.inc
+let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE';
+--source suite/funcs_1/datadict/tables.inc
diff --git a/mysql-test/suite/funcs_1/t/is_tables_myisam.test b/mysql-test/suite/funcs_1/t/is_tables_myisam.test
new file mode 100644
index 00000000..c3f7c87b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables_myisam.test
@@ -0,0 +1,21 @@
+# suite/funcs_1/t/is_tables_myisam.test
+#
+# Check the content of information_schema.tables about tables within
+# the databases created by the user.
+# Variant for storage engine MyISAM and the non embedded server
+# The expected results must equal is_columns_myisam_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+let $engine_type= MyISAM;
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+# We look only for the tables created by suite/funcs_1/datadict/tables.inc
+let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE';
+--source suite/funcs_1/datadict/tables.inc
diff --git a/mysql-test/suite/funcs_1/t/is_tables_myisam_embedded.test b/mysql-test/suite/funcs_1/t/is_tables_myisam_embedded.test
new file mode 100644
index 00000000..d4595900
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables_myisam_embedded.test
@@ -0,0 +1,22 @@
+# suite/funcs_1/t/is_tables_myisam_embedded.test
+#
+# Check the content of information_schema.tables about tables within
+# the databases created by the user.
+# Variant for storage engine MyISAM and the embedded server
+# The expected results must equal is_tabless_myisam except that
+# that the privilege system works (affects some result sets).
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+let $engine_type= MyISAM;
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
+# We look only for the tables created by suite/funcs_1/datadict/tables.inc
+let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE';
+--source suite/funcs_1/datadict/tables.inc
diff --git a/mysql-test/suite/funcs_1/t/is_tables_mysql.test b/mysql-test/suite/funcs_1/t/is_tables_mysql.test
new file mode 100644
index 00000000..22dc5d6e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables_mysql.test
@@ -0,0 +1,18 @@
+# suite/funcs_1/t/is_tables_mysql.test
+#
+# Check the content of information_schema.tables about tables within
+# the database mysql (= the system tables).
+# Variant for the non embedded server
+# The expected results must equal is_tables_mysql_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+let $my_where = WHERE table_schema = 'mysql';
+--source suite/funcs_1/datadict/tables1.inc
diff --git a/mysql-test/suite/funcs_1/t/is_tables_mysql_embedded.test b/mysql-test/suite/funcs_1/t/is_tables_mysql_embedded.test
new file mode 100644
index 00000000..60251370
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_tables_mysql_embedded.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/is_tables_mysql_embedded.test
+#
+# Check the content of information_schema.tables about tables within
+# the database mysql (= the system tables).
+# Variant for the embedded server
+# The expected results must equal is_tables_mysql except that all users
+# have all privileges (affects some result sets).
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+--source include/have_innodb.inc
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+let $my_where = WHERE table_schema = 'mysql';
+--source suite/funcs_1/datadict/tables1.inc
diff --git a/mysql-test/suite/funcs_1/t/is_triggers.test b/mysql-test/suite/funcs_1/t/is_triggers.test
new file mode 100644
index 00000000..fd42cb4e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_triggers.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/is_triggers.test
+#
+# Check the layout of information_schema.triggers and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+# Variant for the non embedded server
+# The expected results must equal is_triggers_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_triggers.inc
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source suite/funcs_1/datadict/is_triggers.inc
diff --git a/mysql-test/suite/funcs_1/t/is_triggers_embedded.test b/mysql-test/suite/funcs_1/t/is_triggers_embedded.test
new file mode 100644
index 00000000..d8e99c77
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_triggers_embedded.test
@@ -0,0 +1,20 @@
+# suite/funcs_1/t/is_triggers_embedded.test
+#
+# Check the layout of information_schema.triggers and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+# Variant for the embedded server
+# The expected results must equal is_triggers except that all users
+# have all privileges (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_triggers.inc
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+--source suite/funcs_1/datadict/is_triggers.inc
diff --git a/mysql-test/suite/funcs_1/t/is_user_privileges.test b/mysql-test/suite/funcs_1/t/is_user_privileges.test
new file mode 100644
index 00000000..814e4db9
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_user_privileges.test
@@ -0,0 +1,389 @@
+# suite/funcs_1/t/is_user_privileges.test
+#
+# Check the layout of information_schema.user_privileges, permissions and
+# the impact of CREATE/ALTER/DROP SCHEMA on it.
+#
+# Note:
+# This test is not intended
+# - to show information about the all time existing tables
+# within the databases information_schema and mysql
+# - for checking storage engine properties
+# Therefore please do not alter $engine_type and $other_engine_type.
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+let $engine_type = MEMORY;
+let $other_engine_type = MyISAM;
+
+let $is_table = USER_PRIVILEGES;
+
+let $REGEX_VERSION_ID=/$mysql_get_server_version/VERSION_ID/;
+let $REGEX_PASSWORD_LAST_CHANGED=/password_last_changed": [0-9]*/password_last_changed": #/;
+let $REGEX_GLOBAL_PRIV=$REGEX_PASSWORD_LAST_CHANGED $REGEX_VERSION_ID;
+
+# The table INFORMATION_SCHEMA.USER_PRIVILEGES must exist
+eval SHOW TABLES FROM information_schema LIKE '$is_table';
+
+--echo #######################################################################
+--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
+--echo #######################################################################
+# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT
+# statement, just as if it were an ordinary user-defined table.
+#
+--source suite/funcs_1/datadict/is_table_query.inc
+
+
+--echo #########################################################################
+--echo # Testcase 3.2.16.1: INFORMATION_SCHEMA.USER_PRIVILEGES layout
+--echo #########################################################################
+# Ensure that the INFORMATION_SCHEMA.USER_PRIVILEGES table has the following columns,
+# in the following order:
+#
+# GRANTEE (shows a user to whom a user privilege has been granted),
+# TABLE_CATALOG (always shows NULL),
+# PRIVILEGE_TYPE (shows the granted privilege),
+# IS_GRANTABLE (shows whether the privilege was granted WITH GRANT OPTION).
+#
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval DESCRIBE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW CREATE TABLE information_schema.$is_table;
+--source suite/funcs_1/datadict/datadict_bug_12777.inc
+eval SHOW COLUMNS FROM information_schema.$is_table;
+
+# Note: Retrieval of information within information_schema.columns about
+# information_schema.user_privileges is in is_columns_is.test.
+
+# Show that TABLE_CATALOG is always 'def'.
+SELECT grantee, table_catalog, privilege_type
+FROM information_schema.user_privileges
+WHERE table_catalog IS NULL OR table_catalog <> 'def';
+
+
+--echo ##########################################################################
+--echo # Testcases 3.2.16.2+3.2.16.3+3.2.16.4: INFORMATION_SCHEMA.USER_PRIVILEGES
+--echo # accessible information
+--echo ##########################################################################
+# 3.2.16.2: Ensure that the table shows the relevant information on every user
+# privilege which has been granted to the current user or to PUBLIC,
+# or has been granted by the current user.
+# 3.2.16.3: Ensure that the table does not show any information on any user
+# privileges which have been granted to users other than the current
+# user or have been granted by any user other than the current user.
+# 3.2.16.4: Ensure that the table does not show any information on any
+# privileges that are not user privileges for the current user.
+#
+CREATE DATABASE db_datadict;
+
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser2'@'localhost';
+CREATE USER 'testuser2'@'localhost';
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser3'@'localhost';
+CREATE USER 'testuser3'@'localhost';
+
+GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
+
+GRANT INSERT ON *.* TO 'testuser2'@'localhost';
+GRANT UPDATE ON *.* TO 'testuser2'@'localhost';
+
+let $my_select1= SELECT * FROM information_schema.user_privileges
+WHERE grantee LIKE '''testuser%'''
+ORDER BY grantee, table_catalog, privilege_type;
+let $my_select2= SELECT host,user,json_detailed(priv) FROM mysql.global_priv
+WHERE user LIKE 'testuser%' ORDER BY host, user;
+let $my_show= SHOW GRANTS;
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+
+--echo #
+--echo # Add GRANT OPTION db_datadict.* to testuser1;
+GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser1, localhost, testuser1, , db_datadict);
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+eval $my_show;
+
+--echo
+--echo # Now add SELECT on *.* to testuser1;
+
+connection default;
+GRANT SELECT ON *.* TO 'testuser1'@'localhost';
+--echo #
+--echo # Here <SELECT NO> is shown correctly for testuser1;
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+
+GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+--echo #
+--echo # Here <SELECT YES> is shown correctly for testuser1;
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+
+# check that this appears
+connection testuser1;
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser2, localhost, testuser2, , db_datadict);
+--vertical_results
+eval $my_select1;
+--error ER_TABLEACCESS_DENIED_ERROR
+eval $my_select2;
+--horizontal_results
+eval $my_show;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (testuser3, localhost, testuser3, ,"*NO-ONE*");
+--vertical_results
+eval $my_select1;
+--error ER_TABLEACCESS_DENIED_ERROR
+eval $my_select2;
+--horizontal_results
+eval $my_show;
+
+--echo
+--echo # Revoke privileges from testuser1;
+connection default;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost';
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+
+# check for changes
+connection testuser1;
+--vertical_results
+eval $my_select1;
+--error ER_TABLEACCESS_DENIED_ERROR
+eval $my_select2;
+--horizontal_results
+eval $my_show;
+
+# OK, testuser1 has no privs here
+--error ER_TABLEACCESS_DENIED_ERROR
+CREATE TABLE db_datadict.tb_55 ( c1 TEXT );
+--vertical_results
+eval $my_select1;
+--error ER_TABLEACCESS_DENIED_ERROR
+eval $my_select2;
+--horizontal_results
+eval $my_show;
+# OK, testuser1 has no privs here
+--error ER_TABLEACCESS_DENIED_ERROR
+CREATE TABLE db_datadict.tb_66 ( c1 TEXT );
+
+--echo
+--echo # Add ALL on db_datadict.* (and select on mysql.global_priv) to testuser1;
+connection default;
+GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+
+connection testuser1;
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+eval $my_show;
+
+# OK, testuser1 has no privs here
+--error ER_TABLEACCESS_DENIED_ERROR
+CREATE TABLE db_datadict.tb_56 ( c1 TEXT );
+
+# using 'USE' lets the server read the privileges new, so now the CREATE works
+USE db_datadict;
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+eval $my_show;
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE tb_57 ( c1 TEXT )
+ENGINE = $other_engine_type;
+
+--echo
+--echo # Revoke privileges from testuser1;
+connection default;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost';
+--vertical_results
+eval $my_select1;
+--replace_regex $REGEX_GLOBAL_PRIV
+eval $my_select2;
+--horizontal_results
+
+# check for changes
+connection testuser1;
+--vertical_results
+eval $my_select1;
+--error ER_TABLEACCESS_DENIED_ERROR
+eval $my_select2;
+--horizontal_results
+eval $my_show;
+# WORKS, as the existing old privileges are used!
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE db_datadict.tb_58 ( c1 TEXT )
+ENGINE = $other_engine_type;
+# existing privileges are "read" new when USE is called, user has no privileges
+--error ER_DBACCESS_DENIED_ERROR
+USE db_datadict;
+#FIXME 3.2.16: check that it is correct that this now 'works': --error ER_TABLEACCESS_DENIED_ERROR
+--replace_result $other_engine_type <other_engine_type>
+eval
+CREATE TABLE db_datadict.tb_59 ( c1 TEXT )
+ENGINE = $other_engine_type;
+
+# Cleanup
+connection default;
+disconnect testuser1;
+disconnect testuser2;
+disconnect testuser3;
+DROP USER 'testuser1'@'localhost';
+DROP USER 'testuser2'@'localhost';
+DROP USER 'testuser3'@'localhost';
+DROP DATABASE IF EXISTS db_datadict;
+
+
+--echo ########################################################################################
+--echo # Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.USER_PRIVILEGES modifications
+--echo ########################################################################################
+# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or
+# column) automatically inserts all relevant information on that
+# object into every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.14: Ensure that the alteration of any existing database object
+# automatically updates all relevant information on that object in
+# every appropriate INFORMATION_SCHEMA table.
+# 3.2.1.15: Ensure that the dropping of any existing database object
+# automatically deletes all relevant information on that object from
+# every appropriate INFORMATION_SCHEMA table.
+#
+let $my_select = SELECT * FROM information_schema.user_privileges
+WHERE grantee = '''testuser1''@''localhost''';
+let $my_show = SHOW GRANTS FOR 'testuser1'@'localhost';
+--vertical_results
+eval $my_select;
+--horizontal_results
+--error ER_NONEXISTING_GRANT
+eval $my_show;
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+--vertical_results
+eval $my_select;
+--horizontal_results
+eval $my_show;
+GRANT SELECT, FILE ON *.* TO 'testuser1'@'localhost';
+--vertical_results
+eval $my_select;
+--horizontal_results
+eval $my_show;
+DROP USER 'testuser1'@'localhost';
+--vertical_results
+eval $my_select;
+--horizontal_results
+--error ER_NONEXISTING_GRANT
+eval $my_show;
+
+
+--echo ########################################################################
+--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
+--echo # DDL on INFORMATION_SCHEMA tables are not supported
+--echo ########################################################################
+# 3.2.1.3: Ensure that no user may execute an INSERT statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.5: Ensure that no user may execute a DELETE statement on any
+# INFORMATION_SCHEMA table.
+# 3.2.1.8: Ensure that no user may create an index on an
+# INFORMATION_SCHEMA table.
+# 3.2.1.9: Ensure that no user may alter the definition of an
+# INFORMATION_SCHEMA table.
+# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table.
+# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any
+# other database.
+# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
+# in an INFORMATION_SCHEMA table.
+#
+--error 0,ER_CANNOT_USER
+DROP USER 'testuser1'@'localhost';
+CREATE USER 'testuser1'@'localhost';
+
+--error ER_DBACCESS_DENIED_ERROR
+INSERT INTO information_schema.user_privileges
+SELECT * FROM information_schema.user_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+UPDATE information_schema.user_privileges
+SET PRIVILEGE_TYPE = 'gaming';
+
+--error ER_DBACCESS_DENIED_ERROR
+DELETE FROM information_schema.user_privileges
+WHERE grantee = '''testuser1''@''localhost''';
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE information_schema.user_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE INDEX i1 ON information_schema.user_privileges(grantee);
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.user_privileges ADD f1 INT;
+
+--error ER_DBACCESS_DENIED_ERROR
+DROP TABLE information_schema.user_privileges;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.user_privileges
+RENAME db_datadict.user_privileges;
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE information_schema.user_privileges
+RENAME information_schema.xuser_privileges;
+
+# Cleanup
+DROP USER 'testuser1'@'localhost';
+
diff --git a/mysql-test/suite/funcs_1/t/is_views.test b/mysql-test/suite/funcs_1/t/is_views.test
new file mode 100644
index 00000000..b8c9c114
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_views.test
@@ -0,0 +1,19 @@
+# suite/funcs_1/t/is_views.test
+#
+# Check the layout of information_schema.views and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+# Variant for the non embedded server
+# The expected results must equal is_views_embedded except that
+# that the privilege system works (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_views.inc
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+--source include/not_embedded.inc
+--source suite/funcs_1/datadict/is_views.inc
diff --git a/mysql-test/suite/funcs_1/t/is_views_embedded.test b/mysql-test/suite/funcs_1/t/is_views_embedded.test
new file mode 100644
index 00000000..66b4f59e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_views_embedded.test
@@ -0,0 +1,20 @@
+# suite/funcs_1/t/is_views_embedded.test
+#
+# Check the layout of information_schema.views and the impact of
+# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it.
+# Variant for the embedded server
+# The expected results must equal is_views except that all users
+# have all privileges (affects some result sets).
+#
+# There is detailed information about this test within
+# suite/funcs_1/datadict/is_views.inc
+#
+# Author:
+# 2008-06-06 mleich Create this this variant for the embedded server.
+#
+
+if (`SELECT VERSION() NOT LIKE '%embedded%'`)
+{
+ --skip Test requires: embedded server
+}
+--source suite/funcs_1/datadict/is_views.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_bitdata.test b/mysql-test/suite/funcs_1/t/memory_bitdata.test
new file mode 100644
index 00000000..096c6618
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_bitdata.test
@@ -0,0 +1,17 @@
+#### suite/funcs_1/t/memory_bitdata
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+let $message= NOT YET IMPLEMENTED: bitdata tests;
+--source include/show_msg80.inc
+exit;
+
+# Create some objects needed in many testcases
+USE test;
+--source suite/funcs_1/include/memory_tb4.inc
+
+--source suite/funcs_1/bitdata/bitdata_master.test
diff --git a/mysql-test/suite/funcs_1/t/memory_cursors.test b/mysql-test/suite/funcs_1/t/memory_cursors.test
new file mode 100644
index 00000000..20e12e34
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_cursors.test
@@ -0,0 +1,18 @@
+#### suite/funcs_1/t/memory_cursors.test
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+let $message= NOT YET IMPLEMENTED: cursor tests;
+--source include/show_msg80.inc
+exit;
+
+# Create some objects needed in many testcases
+USE test;
+--source suite/funcs_1/include/memory_tb1.inc
+
+--source suite/funcs_1/cursors/cursors_master.test
+
diff --git a/mysql-test/suite/funcs_1/t/memory_func_view.test b/mysql-test/suite/funcs_1/t/memory_func_view.test
new file mode 100644
index 00000000..3549e7ce
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_func_view.test
@@ -0,0 +1,16 @@
+###################################################
+# #
+# Functions within VIEWs based on Memory tables #
+# #
+###################################################
+
+#
+# NOTE: PLEASE SEE THE DETAILED DESCRIPTION IN
+# suite/funcs_1/views/func_view.inc
+# BEFORE ADDING NEW TEST CASES HERE !!!
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $type= 'MEMORY' ;
+
+--source suite/funcs_1/views/func_view.inc
+
diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_02.test b/mysql-test/suite/funcs_1/t/memory_storedproc_02.test
new file mode 100644
index 00000000..d0f2eb97
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_storedproc_02.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/memory_storedproc_02.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+--source suite/funcs_1/storedproc/storedproc_02.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_03.test b/mysql-test/suite/funcs_1/t/memory_storedproc_03.test
new file mode 100644
index 00000000..3de1998f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_storedproc_03.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/memory_storedproc_03.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+--source suite/funcs_1/storedproc/storedproc_03.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_06.test b/mysql-test/suite/funcs_1/t/memory_storedproc_06.test
new file mode 100644
index 00000000..620c96e2
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_storedproc_06.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/memory_storedproc_06.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+--source suite/funcs_1/storedproc/storedproc_06.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_07.test b/mysql-test/suite/funcs_1/t/memory_storedproc_07.test
new file mode 100644
index 00000000..f314f0f4
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_storedproc_07.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/memory_storedproc_07.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+--source suite/funcs_1/storedproc/storedproc_07.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_08.test b/mysql-test/suite/funcs_1/t/memory_storedproc_08.test
new file mode 100644
index 00000000..553ae86f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_storedproc_08.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/memory_storedproc_08.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+--source suite/funcs_1/storedproc/storedproc_08.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_10.test b/mysql-test/suite/funcs_1/t/memory_storedproc_10.test
new file mode 100644
index 00000000..76322573
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_storedproc_10.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/memory_storedproc_10.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+--source suite/funcs_1/storedproc/storedproc_10.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0102.test b/mysql-test/suite/funcs_1/t/memory_trig_0102.test
new file mode 100644
index 00000000..6ac7f0f9
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_trig_0102.test
@@ -0,0 +1,10 @@
+#### suite/funcs_1/t/memory_trig_0102.test
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+--source suite/funcs_1/include/bug28309_skip.inc
+
+--source suite/funcs_1/triggers/triggers_0102.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_trig_03.test b/mysql-test/suite/funcs_1/t/memory_trig_03.test
new file mode 100644
index 00000000..077cacde
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_trig_03.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/memory_trig_03.test
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+--source suite/funcs_1/triggers/triggers_03.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_trig_03e.test b/mysql-test/suite/funcs_1/t/memory_trig_03e.test
new file mode 100644
index 00000000..5224143a
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_trig_03e.test
@@ -0,0 +1,24 @@
+#### suite/funcs_1/t/memory_triggers.test
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+--source include/default_charset.inc
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+# Create some objects needed in many testcases
+USE test;
+
+--source suite/funcs_1/triggers/triggers_03e_db_level.inc
+--source suite/funcs_1/triggers/triggers_03e_table_level.inc
+--source suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
+--source suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
+--source suite/funcs_1/triggers/triggers_03e_prepare.inc
+--source suite/funcs_1/triggers/triggers_03e_definer.inc
+--source suite/funcs_1/triggers/triggers_03e_columns.inc
+
diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0407.test b/mysql-test/suite/funcs_1/t/memory_trig_0407.test
new file mode 100644
index 00000000..4eb6ec2d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_trig_0407.test
@@ -0,0 +1,10 @@
+#### suite/funcs_1/t/memory_trig_0407.test
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+--source suite/funcs_1/include/bug28309_skip.inc
+
+--source suite/funcs_1/triggers/triggers_0407.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_trig_08.test b/mysql-test/suite/funcs_1/t/memory_trig_08.test
new file mode 100644
index 00000000..6b799ecd
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_trig_08.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/memory_trig_08.test
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+--source suite/funcs_1/triggers/triggers_08.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_trig_09.test b/mysql-test/suite/funcs_1/t/memory_trig_09.test
new file mode 100644
index 00000000..37a8c06b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_trig_09.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/memory_trig_09.test
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+
+--source suite/funcs_1/triggers/triggers_09.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test
new file mode 100644
index 00000000..6a90764e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test
@@ -0,0 +1,10 @@
+#### suite/funcs_1/t/memory_trig_1011ext.test
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+--source suite/funcs_1/include/bug28309_skip.inc
+
+--source suite/funcs_1/triggers/triggers_1011ext.inc
diff --git a/mysql-test/suite/funcs_1/t/memory_views.test b/mysql-test/suite/funcs_1/t/memory_views.test
new file mode 100644
index 00000000..8e33324e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/memory_views.test
@@ -0,0 +1,24 @@
+#### suite/funcs_1/t/memory_views.test
+
+# Memory tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= memory;
+--source suite/funcs_1/include/bug28309_skip.inc
+
+# Create some objects needed in many testcases
+USE test;
+--source suite/funcs_1/include/memory_tb2.inc
+--disable_warnings
+DROP DATABASE IF EXISTS test1;
+--enable_warnings
+CREATE DATABASE test1;
+USE test1;
+--source suite/funcs_1/include/memory_tb2.inc
+USE test;
+
+--source suite/funcs_1/views/views_master.inc
+DROP DATABASE test1;
+DROP TABLE test.tb2;
+
diff --git a/mysql-test/suite/funcs_1/t/myisam_bitdata.test b/mysql-test/suite/funcs_1/t/myisam_bitdata.test
new file mode 100644
index 00000000..90d2fad4
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_bitdata.test
@@ -0,0 +1,17 @@
+#### suite/funcs_1/t/myisam_bitdata.test
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+let $message= NOT YET IMPLEMENTED: bitdata tests;
+--source include/show_msg80.inc
+exit;
+
+# Create some objects needed in many testcases
+USE test;
+--source suite/funcs_1/include/myisam_tb4.inc
+
+--source suite/funcs_1/bitdata/bitdata_master.test
diff --git a/mysql-test/suite/funcs_1/t/myisam_cursors.test b/mysql-test/suite/funcs_1/t/myisam_cursors.test
new file mode 100644
index 00000000..bd949486
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_cursors.test
@@ -0,0 +1,18 @@
+#### suite/funcs_1/t/myisam_cursors.test
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+let $message= NOT YET IMPLEMENTED: cursor tests;
+--source include/show_msg80.inc
+exit;
+
+# Create some objects needed in many testcases
+USE test;
+--source suite/funcs_1/include/myisam_tb1.inc
+
+--source suite/funcs_1/cursors/cursors_master.test
+
diff --git a/mysql-test/suite/funcs_1/t/myisam_func_view.test b/mysql-test/suite/funcs_1/t/myisam_func_view.test
new file mode 100644
index 00000000..abf5a220
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_func_view.test
@@ -0,0 +1,16 @@
+###################################################
+# #
+# Functions within VIEWs based on MYISAM tables #
+# #
+###################################################
+
+#
+# NOTE: PLEASE SEE THE DETAILED DESCRIPTION IN
+# suite/funcs_1/views/func_view.inc
+# BEFORE ADDING NEW TEST CASES HERE !!!
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $type= 'MYISAM' ;
+
+--source suite/funcs_1/views/func_view.inc
+
diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_02.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_02.test
new file mode 100644
index 00000000..be017494
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_02.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/myisam_storedproc_02.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/storedproc/storedproc_02.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_03.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_03.test
new file mode 100644
index 00000000..9a4caad5
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_03.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/myisam_storedproc_03.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/storedproc/storedproc_03.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_06.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_06.test
new file mode 100644
index 00000000..ff36116a
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_06.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/myisam_storedproc_06.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/storedproc/storedproc_06.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_07.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_07.test
new file mode 100644
index 00000000..65a1e152
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_07.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/myisam_storedproc_07.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/storedproc/storedproc_07.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_08.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_08.test
new file mode 100644
index 00000000..1e4f5da4
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_08.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/myisam_storedproc_08.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/storedproc/storedproc_08.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_10.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_10.test
new file mode 100644
index 00000000..69ce8a2b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_10.test
@@ -0,0 +1,7 @@
+#### suite/funcs_1/t/myisam_storedproc_10.test
+#
+
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/storedproc/storedproc_10.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_0102.test b/mysql-test/suite/funcs_1/t/myisam_trig_0102.test
new file mode 100644
index 00000000..4cb8e190
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_trig_0102.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/myisam_trig_0102.test
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/triggers/triggers_0102.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_03.test b/mysql-test/suite/funcs_1/t/myisam_trig_03.test
new file mode 100644
index 00000000..fe46df80
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_trig_03.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/myisam_trig_03.test
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/triggers/triggers_03.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_03e.test b/mysql-test/suite/funcs_1/t/myisam_trig_03e.test
new file mode 100644
index 00000000..280f935b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_trig_03e.test
@@ -0,0 +1,24 @@
+#### suite/funcs_1/t/myisam_trig_03e.test
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+--source include/default_charset.inc
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+# Create some objects needed in many testcases
+USE test;
+
+--source suite/funcs_1/triggers/triggers_03e_db_level.inc
+--source suite/funcs_1/triggers/triggers_03e_table_level.inc
+--source suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
+--source suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
+--source suite/funcs_1/triggers/triggers_03e_prepare.inc
+--source suite/funcs_1/triggers/triggers_03e_definer.inc
+--source suite/funcs_1/triggers/triggers_03e_columns.inc
+
diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_0407.test b/mysql-test/suite/funcs_1/t/myisam_trig_0407.test
new file mode 100644
index 00000000..f97d4cad
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_trig_0407.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/myisam_trig_0407.test
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/triggers/triggers_0407.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_08.test b/mysql-test/suite/funcs_1/t/myisam_trig_08.test
new file mode 100644
index 00000000..e00e6f12
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_trig_08.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/myisam_trig_08.test
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/triggers/triggers_08.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_09.test b/mysql-test/suite/funcs_1/t/myisam_trig_09.test
new file mode 100644
index 00000000..87a359da
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_trig_09.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/myisam_trig_09.test
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/triggers/triggers_09.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test
new file mode 100644
index 00000000..e1df5cae
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test
@@ -0,0 +1,9 @@
+#### suite/funcs_1/t/myisam_trig_1011ext.test
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+let $engine_type= myisam;
+
+--source suite/funcs_1/triggers/triggers_1011ext.inc
diff --git a/mysql-test/suite/funcs_1/t/myisam_views-big.test b/mysql-test/suite/funcs_1/t/myisam_views-big.test
new file mode 100644
index 00000000..60fe1b8e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/myisam_views-big.test
@@ -0,0 +1,38 @@
+#### suite/funcs_1/t/myisam_views.test
+# Valgrind is to slow for this test
+--source include/not_valgrind.inc
+# because of a pair of slow Solaris Sparc machines in pb2,
+# this test is marked as big:
+--source include/big_test.inc
+# This test often times out with MSAN
+--source include/not_msan.inc
+
+# MyISAM tables should be used
+#
+# Set $engine_type
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+--enable_prepare_warnings
+let $engine_type= myisam;
+
+# Create some objects needed in many testcases
+USE test;
+--source suite/funcs_1/include/myisam_tb2.inc
+--disable_warnings
+DROP DATABASE IF EXISTS test1;
+--enable_warnings
+CREATE DATABASE test1;
+USE test1;
+--source suite/funcs_1/include/myisam_tb2.inc
+USE test;
+
+let $message= Attention: The nesting level @max_level in Testcase 3.3.1.A6
+ (Complicated nested VIEWs) has to be limited to 20 because of
+ MyISAM(only) performance issues Bug#11948;
+--source include/show_msg80.inc
+SET @limit1 = 20;
+--disable_prepare_warnings
+--source suite/funcs_1/views/views_master.inc
+
+DROP DATABASE test1;
+DROP TABLE test.tb2;
+
diff --git a/mysql-test/suite/funcs_1/t/processlist_priv_no_prot.test b/mysql-test/suite/funcs_1/t/processlist_priv_no_prot.test
new file mode 100644
index 00000000..88563b04
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/processlist_priv_no_prot.test
@@ -0,0 +1,30 @@
+############ suite/funcs_1/t/processlist_priv_no_prot.test #############
+# #
+# Testing of privileges around #
+# SELECT ... PROCESSLIST/SHOW PROCESSLIST #
+# #
+# The prepared statement variant of this test is #
+# suite/funcs_1/t/b_processlist_priv_ps.test. #
+# #
+# There is important documentation within #
+# suite/funcs_1/datadict/processlist_priv.inc #
+# #
+# Creation: #
+# 2007-08-14 mleich Create this test as part of #
+# WL#3982 Test information_schema.processlist #
+# #
+########################################################################
+
+# One subtest is skipped because of
+# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
+let $fixed_bug_30395= 0;
+
+# This test does not make sense on the embedded server because processlist
+# will be empty.
+--source include/not_embedded.inc
+
+# The file with expected results fits only to a run without
+# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
+--source include/no_protocol.inc
+
+--source suite/funcs_1/datadict/processlist_priv.inc
diff --git a/mysql-test/suite/funcs_1/t/processlist_priv_ps.test b/mysql-test/suite/funcs_1/t/processlist_priv_ps.test
new file mode 100644
index 00000000..cafe0a6a
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/processlist_priv_ps.test
@@ -0,0 +1,33 @@
+############# suite/funcs_1/t/processlist_priv_ps.test #################
+# #
+# Testing of privileges around #
+# SELECT ... PROCESSLIST/SHOW PROCESSLIST #
+# #
+# The no (ps/sp/view/cursor) protocol variant of this test is #
+# suite/funcs_1/t/a_processlist_priv_no_prot.test. #
+# #
+# There is important documentation within #
+# suite/funcs_1/datadict/processlist_priv.inc #
+# #
+# Creation: #
+# 2007-08-14 mleich Create this test as part of #
+# WL#3982 Test information_schema.processlist #
+# #
+########################################################################
+
+# This test does not make sense on the embedded server because processlist
+# will be empty.
+--source include/not_embedded.inc
+
+# One subtest is skipped because of
+# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
+let $fixed_bug_30395= 0;
+
+# The file with expected results fits only to a run with "--ps-protocol".
+if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0
+ OR $PS_PROTOCOL = 0`)
+{
+ --skip Test requires: ps-protocol enabled, other protocols disabled
+}
+
+--source suite/funcs_1/datadict/processlist_priv.inc
diff --git a/mysql-test/suite/funcs_1/t/processlist_val_no_prot.test b/mysql-test/suite/funcs_1/t/processlist_val_no_prot.test
new file mode 100644
index 00000000..a03d3774
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/processlist_val_no_prot.test
@@ -0,0 +1,25 @@
+############# suite/funcs_1/t/processlist_val_no_prot.test #############
+# #
+# Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
+# #
+# The prepared statement variant of this test is #
+# suite/funcs_1/t/b_processlist_val_ps.test. #
+# #
+# There is important documentation within #
+# suite/funcs_1/datadict/processlist_val.inc #
+# #
+# Creation: #
+# 2007-08-09 mleich Implement this test as part of #
+# WL#3982 Test information_schema.processlist #
+# #
+########################################################################
+
+# This test does not make sense on the embedded server because processlist
+# will be empty.
+--source include/not_embedded.inc
+
+# The file with expected results fits only to a run without
+# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
+--source include/no_protocol.inc
+
+--source suite/funcs_1/datadict/processlist_val.inc
diff --git a/mysql-test/suite/funcs_1/t/processlist_val_ps.test b/mysql-test/suite/funcs_1/t/processlist_val_ps.test
new file mode 100644
index 00000000..15467270
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/processlist_val_ps.test
@@ -0,0 +1,28 @@
+################ suite/funcs_1/t/processlist_val_ps.test ###############
+# #
+# Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
+# #
+# The no (ps/sp/view/cursor) protocol variant of this test is #
+# suite/funcs_1/t/a_processlist_val_no_prot.test. #
+# #
+# There is important documentation within #
+# suite/funcs_1/datadict/processlist_val.inc #
+# #
+# Creation: #
+# 2007-08-09 mleich Implement this test as part of #
+# WL#3982 Test information_schema.processlist #
+# #
+########################################################################
+
+# This test does not make sense on the embedded server because processlist
+# will be empty.
+--source include/not_embedded.inc
+
+# The file with expected results fits only to a run with "--ps-protocol".
+if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0
+ OR $PS_PROTOCOL = 0`)
+{
+ --skip Test requires: ps-protocol enabled, other protocols disabled
+}
+
+--source suite/funcs_1/datadict/processlist_val.inc
diff --git a/mysql-test/suite/funcs_1/t/row_count_func-master.opt b/mysql-test/suite/funcs_1/t/row_count_func-master.opt
new file mode 100644
index 00000000..c189eede
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/row_count_func-master.opt
@@ -0,0 +1 @@
+--secure-file-priv=$MYSQL_TMP_DIR
diff --git a/mysql-test/suite/funcs_1/t/row_count_func.test b/mysql-test/suite/funcs_1/t/row_count_func.test
new file mode 100644
index 00000000..fb207681
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/row_count_func.test
@@ -0,0 +1,131 @@
+--echo
+--echo # --
+--echo # -- Test case for Bug#21818.
+--echo # --
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+
+--echo
+--echo # -- Check 1.
+
+--disable_warnings
+--enable_info
+--echo SELECT * FROM t1 INTO OUTFILE "MYSQL_TMP_DIR/bug21818.txt";
+--disable_query_log # to avoid $MYSQL_TMP_DIR in query log
+--disable_ps2_protocol
+--eval SELECT * FROM t1 INTO OUTFILE "$MYSQL_TMP_DIR/bug21818.txt"
+--enable_ps2_protocol
+--enable_query_log
+--disable_info
+
+--echo
+--disable_ps2_protocol
+SELECT ROW_COUNT();
+--enable_ps2_protocol
+
+--echo
+--echo # -- Check 2.
+
+--enable_info
+SELECT a FROM t1 LIMIT 1 INTO @a;
+--disable_info
+
+--echo
+--disable_ps2_protocol
+SELECT ROW_COUNT();
+--enable_ps2_protocol
+
+--enable_warnings
+--echo
+--echo # -- Check 3.
+
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest1;
+--enable_warnings
+
+--enable_info
+CREATE DATABASE mysqltest1;
+--disable_info
+
+--echo
+--disable_ps2_protocol
+SELECT ROW_COUNT();
+--enable_ps2_protocol
+
+DROP DATABASE mysqltest1;
+
+--echo
+--echo # -- Check 4.
+
+DELETE FROM t1;
+
+--enable_info
+--echo LOAD DATA INFILE 'MYSQL_TMP_DIR/bug21818.txt' INTO TABLE t1(a);
+--disable_query_log # to avoid $MYSQL_TMP_DIR in query log
+--eval LOAD DATA INFILE '$MYSQL_TMP_DIR/bug21818.txt' INTO TABLE t1(a)
+--enable_query_log
+--disable_info
+
+--echo
+--disable_ps2_protocol
+SELECT ROW_COUNT();
+--enable_ps2_protocol
+
+--remove_file $MYSQL_TMP_DIR/bug21818.txt
+
+--echo
+--echo # -- Check 5.
+
+--enable_info
+ALTER TABLE t1 ADD COLUMN b VARCHAR(255);
+--disable_info
+
+--echo
+--disable_ps2_protocol
+SELECT ROW_COUNT();
+--enable_ps2_protocol
+
+--echo
+DROP TABLE t1;
+
+--echo
+--echo # -- Check 6.
+
+--disable_warnings
+DROP TABLE IF EXISTS t2;
+--enable_warnings
+
+CREATE TABLE t1(a INT);
+CREATE TABLE t2(a INT);
+
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t2 VALUES (ROW_COUNT());
+
+SELECT * FROM t2;
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo
+--echo # -- Check 7 (check that SQL errors reset row_count to -1).
+
+CREATE TABLE t1(a INT);
+
+INSERT INTO t1 VALUES (1), (2), (3);
+--error ER_SP_DOES_NOT_EXIST
+SELECT f1();
+
+--disable_ps2_protocol
+SELECT ROW_COUNT();
+--enable_ps2_protocol
+
+DROP TABLE t1;
+
+--echo
+--echo # -- End of test case for Bug#21818.
diff --git a/mysql-test/suite/funcs_1/t/storedproc.test b/mysql-test/suite/funcs_1/t/storedproc.test
new file mode 100644
index 00000000..8712919e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/storedproc.test
@@ -0,0 +1,29551 @@
+# suite/funcs_1/t/storedproc.test
+#
+# Check general properties of stored procedures.
+#
+# Last Modification:
+# 2008-08-27 mleich - Fix Bug#37744 Expected result of "<engine>_storedproc"
+# test is inconsistent
+# - remove variation of storage engines
+# - restore global sort_buffer_size after some subtest
+#
+############################################################################
+
+--disable_ps_protocol
+--source include/default_charset.inc
+set sql_mode="";
+
+# Bug#37746 - Arithmetic range ("int") is smaller than expected
+# This code is in place to ensure this test is only skipped
+# for the Win64 platform
+if(`SELECT CONVERT(@@version_compile_os using latin1) IN ("Win64")`)
+{
+--skip Bug#37746 2009-07-07 pcrews Arithmetic range ("int") is smaller than expected
+}
+
+
+
+
+# This test cannot be used for the embedded server because we check here
+# privileges.
+--source include/not_embedded.inc
+
+# It is assumed that the storage engine used for some tables has no impact on
+# the outcome of this test. Therefor we use simply the fastest engine.
+let $engine_type= memory;
+
+--source suite/funcs_1/storedproc/load_sp_tb.inc
+
+
+# ==============================================================================
+echo;
+echo
+Section 3.1.1 - Syntax checks for the CREATE PROCEDURE, CREATE
+FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW
+CREATE PROCEDURE, SHOW CREATE FUNCTION, SHOW CREATE PROCEDURE STATUS, SHOW
+CREATE FUNCTION STATUS, and CALL statements:;
+echo --------------------------------------------------------------------------------;
+
+
+# ------------------------------------------------------------------------------
+echo;
+echo
+Testcase 4.1.1:
+---------------
+Ensure that all clauses that should be supported are supported
+CREATE PROCEDURE;
+echo --------------------------------------------------------------------------------;
+
+USE db_storedproc;
+
+--disable_warnings
+--error ER_TOO_LONG_IDENT
+DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934;
+--enable_warnings
+
+--error ER_TOO_LONG_IDENT
+CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934 (f1 char(20) )
+ SELECT * from t1 where f2 = f1;
+--error ER_TOO_LONG_IDENT
+CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934('aaaa');
+
+--disable_warnings
+--error ER_TOO_LONG_IDENT
+DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde;
+--enable_warnings
+
+delimiter //;
+--error ER_TOO_LONG_IDENT
+CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( f1 TINYTEXT )
+ LANGUAGE SQL DETERMINISTIC SQL SECURITY DEFINER COMMENT 'this is simple'
+BEGIN
+ SET @v1 = f1;
+ SELECT @v1, @v1;
+END//
+delimiter ;//
+
+--error ER_TOO_LONG_IDENT
+CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( f1 BINARY )
+ LANGUAGE SQL DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SET @v1 = f1;
+ SELECT @v1;
+END//
+delimiter ;//
+
+CALL sp1( 34 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( f1 BLOB )
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ set @v1 = f1;
+ SELECT @v1;
+END//
+delimiter ;//
+
+CALL sp1( 34 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( f1 INT )
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SET @v1 = f1;
+ SELECT @v1;
+END//
+delimiter ;//
+
+CALL sp1( 34 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_TOO_BIG_PRECISION
+CREATE PROCEDURE sp1( f1 DECIMAL(256, 30) )
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SET @v1 = f1;
+ SELECT @v1;
+END//
+DROP PROCEDURE IF EXISTS sp1//
+
+--error ER_TOO_BIG_PRECISION
+CREATE PROCEDURE sp1( f1 DECIMAL(66, 30) )
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SET @v1 = f1;
+ SELECT @v1;
+END//
+DROP PROCEDURE IF EXISTS sp1//
+delimiter ;//
+
+
+# Check assignment of float values to DECIMAL(65, 30) parameters of
+# PRODDUREs and FUNCTIONs.
+###########################################################################
+# - The assignment of float values causes that conversions with OS/compiler
+# specific math libraries are involved.
+# --> The content depends on the testing box and simple printing
+# of content will often lead to differences.
+# - We have the same conversions when assigning float values to columns
+# of tables.
+# --> Reveal that we have a consistent behaviour per testing box.
+#
+# Checks that floating point values assigned to objects of type DECIMAL
+# end up with correct DECIMAL values (truncated to a border of the DECIMAL
+# value range or reasonable nearby the floating point value) must be done
+# in other tests.
+###########################################################################
+--disable_warnings
+DROP TABLE IF EXISTS t1_aux;
+DROP PROCEDURE IF EXISTS sproc_1;
+DROP FUNCTION IF EXISTS func_1;
+--enable_warnings
+CREATE TABLE t1_aux ( f1 DECIMAL(65, 30) );
+INSERT INTO t1_aux SET f1 = NULL;
+delimiter //;
+CREATE PROCEDURE sproc_1(f1 DECIMAL(65, 30), OUT f2 DECIMAL(65, 30))
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SET f2 = NULL;
+ SET f2 = f1;
+ SET @v2_proc = f1;
+END//
+CREATE FUNCTION func_1(f1 DECIMAL(65, 30)) RETURNS DECIMAL(65,30)
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ RETURN f1;
+END//
+delimiter ;//
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS WHERE db = 'db_storedproc';
+
+let $test_value = 1.7976931348623157493578e+308;
+--source suite/funcs_1/storedproc/param_check.inc
+#
+# Check all ...E+nnn
+let digits= 100;
+let $run= 1;
+while ($run)
+{
+ let $test_value = 0.1234567890987654321e+$digits;
+ --source suite/funcs_1/storedproc/param_check.inc
+ let $run = `SELECT $digits > 0`;
+ if ($run)
+ {
+ dec $digits;
+ }
+}
+# Check all ...E-nnn
+let digits= 100;
+let $run= 1;
+while ($run)
+{
+ let $test_value = 0.1234567890987654321e-$digits;
+ --source suite/funcs_1/storedproc/param_check.inc
+ let $run = `SELECT $digits > 0`;
+ if ($run)
+ {
+ dec $digits;
+ }
+}
+
+# Cleanup
+DROP PROCEDURE sproc_1;
+DROP FUNCTION func_1;
+DROP TABLE t1_aux;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( f1 ENUM("value1", "value1") )
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp1( "value1" );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( f1 SET("value1", "value1") )
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp1( "value1, value1" );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( f1 ENUM("value1", "value1") )
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp1( "value1" );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+CREATE PROCEDURE sp1( f1 TEXT ) LANGUAGE SQL SELECT f1;
+
+CALL sp1( 'abc' );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS LIKE 'sp1';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+CREATE PROCEDURE sp1( f1 text ) deterministic SELECT f1;
+CALL sp1( 'abc' );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS LIKE 'sp1';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+CREATE PROCEDURE sp1( f1 TEXT ) NOT DETERMINISTIC SELECT f1;
+CALL sp1( 'abc' );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS LIKE 'sp1';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+CREATE PROCEDURE sp1( f1 TEXT ) SQL SECURITY DEFINER SELECT f1;
+CALL sp1( 'abc' );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS LIKE 'sp1';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+CREATE PROCEDURE sp1( f1 TEXT ) SQL SECURITY INVOKER SELECT f1;
+CALL sp1( 'abc' );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS LIKE 'sp1';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+CREATE PROCEDURE sp1( f1 TEXT ) COMMENT 'this is simple' SELECT f1;
+CALL sp1( 'abc' );
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE STATUS LIKE 'sp1';
+
+# cleanup
+DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934;
+DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde;
+DROP PROCEDURE sp1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.2:
+ ---------------
+ Ensure that all clauses that should be supported are supported
+ CREATE FUNCTION;
+--source include/show_msg80.inc
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+CREATE FUNCTION fn1 (s CHAR(20)) RETURNS CHAR(50)
+ RETURN CONCAT('hello, ', s, '!');
+SELECT fn1('world');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 MEDIUMTEXT ) RETURNS MEDIUMTEXT
+ LANGUAGE SQL DETERMINISTIC SQL SECURITY DEFINER COMMENT 'this is simple'
+BEGIN
+ SET @v1 = 'hello';
+ SET f1 = CONCAT( @v1, f1 );
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn1( ' world');
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SET f1 = 1 + f1;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn1( 126 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+# 1425: Too big scale 63 specified for column ''. Maximum is 39.
+--error ER_TOO_BIG_SCALE
+CREATE FUNCTION fn1( f1 DECIMAL(63, 61) ) RETURNS DECIMAL(63, 61)
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SET f1 = 1000000 + f1;
+ RETURN f1;
+END//
+delimiter ;//
+
+--error ER_SP_DOES_NOT_EXIST
+SELECT fn1( 1.3326e+8 );
+
+delimiter //;
+CREATE FUNCTION fn1( f1 DECIMAL(63, 30) ) RETURNS DECIMAL(63, 30)
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ SET f1 = 1000000 + f1;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn1( 1.3326e+8 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 ENUM("value1", "value1") ) RETURNS DECIMAL(63, 30)
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ RETURN f1;
+END//
+delimiter ;//
+
+# warnings for this select disabled due to diffs with/without --ps-protocol:
+# without ps-protocol the following warning is shown:
+# +Note 1291 Column '' has duplicated value 'value1' in SET
+# +Warning 1265 Data truncated for column 'f1' at row 1
+# Reported as BUG#33396
+--disable_warnings
+SELECT fn1( "value1" );
+--enable_warnings
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 SET("value1", "value1") ) RETURNS DECIMAL(63, 30)
+ LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
+BEGIN
+ RETURN f1;
+END//
+delimiter ;//
+
+# warnings for this select disabled due to diffs with/without --ps-protocol:
+# without ps-protocol the following warning is shown:
+# +Note 1291 Column '' has duplicated value 'value1' in SET
+# +Warning 1265 Data truncated for column 'f1' at row 1
+# Reported as BUG#33396
+--disable_warnings
+SELECT fn1( "value1, value1" );
+--enable_warnings
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT LANGUAGE SQL
+BEGIN
+ SET f1 = 1 + f1;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn1( 126 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT DETERMINISTIC
+BEGIN
+ SET f1 = 1 + f1;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn1( 126 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT NOT DETERMINISTIC
+BEGIN
+ SET f1 = 1 + f1;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn1( 126 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT SQL SECURITY DEFINER
+BEGIN
+ SET f1 = 1 + f1;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn1( 126 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT SQL SECURITY INVOKER
+BEGIN
+ SET f1 = 1 + f1;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn1( 126 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT COMMENT 'this is simple'
+BEGIN
+ SET f1 = 1 + f1;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn1( 126 );
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+# cleanup
+DROP FUNCTION fn1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.3:
+ ---------------
+ Ensure that all clauses that should be supported are supported
+ SHOW CREATE PROC;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+CREATE PROCEDURE sp1 (f1 char(20) )
+ SELECT * from t1 where f2 = f1;
+
+--replace_column 5 <modified> 6 <created>
+show CREATE PROCEDURE sp1;
+
+# cleanup
+DROP PROCEDURE sp1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.4:
+ ---------------
+show create function;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+CREATE FUNCTION fn1 (s char(20)) returns char(50)
+ return concat('hello, ', s, '!');
+
+--replace_column 5 <modified> 6 <created>
+show CREATE FUNCTION fn1;
+
+# cleanup
+DROP FUNCTION fn1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.5:
+ ---------------
+SHOW PROCEDURE status;
+--source include/show_msg80.inc
+
+
+CREATE PROCEDURE sp5()
+ SELECT * from t1;
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE status like 'sp5';
+
+# cleanup
+DROP PROCEDURE sp5;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.6:
+ ---------------
+show function status;
+--source include/show_msg80.inc
+
+
+delimiter //;
+CREATE FUNCTION fn5(a int) returns int
+BEGIN
+ set @b = 0.9 * a;
+ return @b;
+END//
+delimiter ;//
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn5';
+
+# cleanup
+DROP FUNCTION fn5;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.7:
+ ---------------
+CALL procedure;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp7a;
+DROP PROCEDURE IF EXISTS sp7b;
+DROP PROCEDURE IF EXISTS sp7c;
+--enable_warnings
+
+CREATE PROCEDURE sp7a(a char(20))
+ SELECT * from t1 where t1.f2 = a;
+
+CALL sp7a( 'xyz' );
+
+CREATE PROCEDURE sp7b (a char (20), out b char(20))
+ SELECT f1 into b from t1 where t1.f2= a;
+
+CALL sp7b('xyz', @out_param);
+SELECT @out_param;
+
+delimiter //;
+CREATE PROCEDURE sp7c (a char (20), out b char(20), inout c int)
+BEGIN
+SELECT f1 into b from t1 where t1.f2=a;
+ update t1 set t1.f2=999 where t1.f4=c;
+SELECT f2 into c from t1 where t1.f2=999;
+END//
+delimiter ;//
+
+--disable_warnings
+set @c=1;
+CALL sp7c('xyz', @out_param, @c);
+SELECT @out_param;
+SELECT @c;
+--enable_warnings
+
+# cleanup
+DROP PROCEDURE sp7a;
+DROP PROCEDURE sp7b;
+DROP PROCEDURE sp7c;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.8:
+ ---------------
+calling function;
+--source include/show_msg80.inc
+
+
+CREATE FUNCTION fn8(a char(20)) returns char(50)
+return concat('hello, ', a, '!');
+SELECT fn8('world');
+
+# cleanup
+DROP FUNCTION fn8;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.9:
+ ---------------
+drop procedure;
+--source include/show_msg80.inc
+
+--sorted_result
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='sp9';
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp9;
+--enable_warnings
+
+--sorted_result
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='sp9';
+
+CREATE PROCEDURE sp9()SELECT * from t1;
+
+--sorted_result
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='sp9';
+
+DROP PROCEDURE sp9;
+
+--sorted_result
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='sp9';
+
+CREATE PROCEDURE sp9()SELECT * from t1;
+
+--sorted_result
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='sp9';
+
+DROP PROCEDURE IF EXISTS sp9;
+
+--sorted_result
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='sp9';
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.10:
+ ----------------
+DROP FUNCTION;
+--source include/show_msg80.inc
+
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn10;
+--enable_warnings
+
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+
+
+CREATE FUNCTION fn10() returns int return 100;
+
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+
+DROP FUNCTION fn10;
+
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+
+CREATE FUNCTION fn10() returns int return 100;
+
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+
+DROP FUNCTION IF EXISTS fn10;
+
+--replace_column 13 created 14 modified
+SELECT * from mysql.proc where specific_name='fn10' and type='function';
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.11:
+ ----------------
+alter proc;
+--source include/show_msg80.inc
+
+
+create user 'user_1'@'localhost';
+grant execute on db_storedproc.* to 'user_1'@'localhost';
+flush privileges;
+drop table IF EXISTS mysql.t1;
+create table mysql.t1( f1 char );
+DROP PROCEDURE IF EXISTS sp11;
+CREATE PROCEDURE sp11() insert into mysql.t1 values('a');
+--replace_column 13 created 14 modified
+SELECT security_type from mysql.proc where specific_name='sp11';
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect (u_1, localhost, user_1, , db_storedproc);
+--source suite/funcs_1/include/show_connection.inc
+
+CALL sp11();
+
+connection default;
+USE db_storedproc;
+--source suite/funcs_1/include/show_connection.inc
+
+alter procedure sp11 sql security invoker;
+--replace_column 13 created 14 modified
+SELECT security_type from mysql.proc where specific_name='sp11';
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connection u_1;
+--source suite/funcs_1/include/show_connection.inc
+USE db_storedproc;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL sp11();
+
+commit work;
+disconnect u_1;
+connection default;
+--source suite/funcs_1/include/show_connection.inc
+
+alter procedure sp11 sql security DEFINER;
+--replace_column 13 created 14 modified
+SELECT security_type from mysql.proc where specific_name='sp11';
+CALL sp11();
+
+# cleanup
+DROP USER 'user_1'@'localhost';
+DROP PROCEDURE sp11;
+drop table mysql.t1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.12:
+ ----------------
+alter function;
+--source include/show_msg80.inc
+
+
+CREATE FUNCTION fn12() returns int
+ return 100;
+SELECT security_type from mysql.proc where specific_name='fn12';
+--replace_column 13 created 14 modified
+SELECT fn12();
+
+alter function fn12 sql security invoker;
+SELECT security_type from mysql.proc where specific_name='fn12';
+--replace_column 13 created 14 modified
+SELECT fn12();
+
+alter function fn12 sql security DEFINER;
+SELECT security_type from mysql.proc where specific_name='fn12';
+--replace_column 13 created 14 modified
+SELECT fn12();
+
+# cleanup
+DROP FUNCTION fn12;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.13:
+ ----------------
+alter proc;
+--source include/show_msg80.inc
+
+
+DROP PROCEDURE IF EXISTS sp11;
+CREATE PROCEDURE sp11()
+ SELECT * from t1;
+
+SELECT comment from mysql.proc where specific_name='sp11';
+--replace_column 13 created 14 modified
+alter procedure sp11 comment 'this is simple';
+SELECT comment from mysql.proc where specific_name='sp11';
+--replace_column 13 created 14 modified
+
+# cleanup
+DROP PROCEDURE sp11;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.14:
+ ----------------
+alter function;
+--source include/show_msg80.inc
+
+DROP FUNCTION IF EXISTS fn12;
+CREATE FUNCTION fn12() returns int
+ return 100;
+ SELECT comment from mysql.proc where specific_name='fn12';
+--replace_column 13 created 14 modified
+
+ alter function fn12 comment 'this is simple';
+ SELECT comment from mysql.proc where specific_name='fn12';
+--replace_column 13 created 14 modified
+
+# cleanup
+DROP FUNCTION fn12;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.15:
+ ----------------
+Ensure that any invalid stored procedure name is never accepted, and that an
+appropriate error message is returned when the name is rejected;
+--source include/show_msg80.inc
+
+
+--error ER_SP_NO_DROP_SP
+CREATE PROCEDURE sp1()
+DROP PROCEDURE sp1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE !_sp1( f1 char(20) )
+SELECT * from t1 where f2 = f1;
+
+CREATE PROCEDURE function()
+ SELECT * from t1 where f2=f1;
+DROP PROCEDURE function;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE accessible()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE add()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE all()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE alter()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE analyze()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE and()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE as()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE asc()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE asensitive()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE before()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE between()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE bigint()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE binary()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE blob()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE both()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE by()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE call()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE cascade()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE case()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE change()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE char()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE character()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE check()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE collate()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE column()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE condition()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE constraint()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE continue()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE convert()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE create()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE cross()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE current_date()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE current_time()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE current_timestamp()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE current_user()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE cursor()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE database()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE databases()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE day_hour()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE day_microsecond()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE day_minute()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE day_second()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE dec()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE decimal()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE declare()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE default()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE delayed()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE delete()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE desc()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE describe()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE deterministic()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE distinct()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE distinctrow()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE div()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE double()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE drop()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE dual()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE each()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE else()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE elseif()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE enclosed()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE escaped()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE exists()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE exit()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE explain()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE false()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE fetch()
+ SELECT * from t1 where f2=f1;
+
+#--error ER_PARSE_ERROR
+CREATE PROCEDURE fields()
+ SELECT * from t1 where f2=f1;
+DROP PROCEDURE fields;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE float()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE for()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE force()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE foreign()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE from()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE fulltext()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE grant()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE group()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE having()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE high_priority()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE hour_microsecond()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE hour_minute()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE hour_second()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE if()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE ignore()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE in()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE index()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE infile()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE inner()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE inout()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE insensitive()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE insert()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE int()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE int1()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE int2()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE int3()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE int4()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE int8()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE integer()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE interval()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE into()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE is()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE iterate()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE join()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE key()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE keys()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE kill()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE leading()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE leave()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE left()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE like()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE limit()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE linear()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE lines()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE load()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE localtime()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE localtimestamp()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE lock()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE long()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE longblob()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE longtext()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE loop()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE low_priority()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE master_ssl_verify_server_cert()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE match()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE mediumblob()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE mediumint()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE mediumtext()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE middleint()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE minute_microsecond()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE minute_second()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE mod()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE modifies()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE natural()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE not()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE no_write_to_binlog()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE null()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE numeric()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE on()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE optimize()
+ SELECT * from t1 where f2=f1;
+
+CREATE PROCEDURE option()
+ SELECT * from t1 where f2=f1;
+DROP PROCEDURE option;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE optionally()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE or()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE order()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE out()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE outer()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE outfile()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE precision()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE primary()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE procedure()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE purge()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE range()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE read()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE reads()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE real()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE references()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE regexp()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE release()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE rename()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE repeat()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE replace()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE require()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE restrict()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE return()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE revoke()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE right()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE rlike()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE schema()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE schemas()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE second_microsecond()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE select()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sensitive()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE separator()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE set()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE show()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE smallint()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE spatial()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE specific()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sql()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sqlexception()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sqlstate()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sqlwarning()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sql_big_result()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sql_calc_found_rows()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sql_small_result()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE ssl()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE starting()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE straight_join()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE table()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE terminated()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE then()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE tinyblob()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE tinyint()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE tinytext()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE to()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE trailing()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE trigger()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE true()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE undo()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE union()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE unique()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE unlock()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE unsigned()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE update()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE usage()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE use()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE using()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE utc_date()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE utc_time()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE utc_timestamp()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE values()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE varbinary()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE varchar()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE varcharacter()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE varying()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE when()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE where()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE while()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE with()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE write()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE xor()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE year_month()
+ SELECT * from t1 where f2=f1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE zerofill()
+ SELECT * from t1 where f2=f1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.15:
+ ----------------
+Ensure that any invalid function name is never accepted, and that an appropriate
+error message is returned when the name is rejected;
+--source include/show_msg80.inc
+
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION !_fn1(f1 char) returns char
+ return f1;
+
+--disable_warnings
+--error ER_PARSE_ERROR
+CREATE FUNCTION char(f1 char) returns char
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION char binary(f1 char binary) returns char binary
+ return f1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION char ascii(f1 char ascii) returns char ascii
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION char not null(f1 char not null) returns char not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION char binary not null(f1 char binary not null) returns char binary not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION char ascii not null(f1 char ascii not null) returns char ascii not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION tinytext(f1 tinytext) returns tinytext
+ return f1;
+
+#--error ER_PARSE_ERROR
+CREATE FUNCTION text(f1 text) returns text
+ return f1;
+ DROP FUNCTION text;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION mediumtext(f1 mediumtext) returns mediumtext
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION longtext(f1 longtext) returns longtext
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION tinytext not null(f1 tinytext not null) returns tinytext not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION text not null(f1 text not null) returns text not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION mediumtext not null(f1 mediumtext not null) returns mediumtext not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION longtext not null(f1 longtext not null) returns longtext not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION tinyblob(f1 tinyblob) returns tinyblob
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION blob(f1 blob) returns blob
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION mediumblob(f1 mediumblob) returns mediumblob
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION longblob(f1 longblob) returns longblob
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION tinyblob not null(f1 tinyblob not null) returns tinyblob not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION blob not null(f1 blob not null) returns blob not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION mediumblob not null(f1 mediumblob not null) returns mediumblob not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION longblob not null(f1 longblob not null) returns longblob not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION binary(f1 binary) returns binary
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION binary not null(f1 binary not null) returns binary not null
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION tinyint(f1 tinyint) returns tinyint
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION tinyint unsigned(f1 tinyint unsigned) returns tinyint unsigned
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION tinyint zerofill(f1 tinyint zerofill) returns tinyint zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION tinyint unsigned zerofill(f1 tinyint unsigned zerofill) returns tinyint unsigned zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION smallint(f1 smallint) returns smallint
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION smallint unsigned(f1 smallint unsigned) returns smallint unsigned
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION smallint zerofill(f1 smallint zerofill) returns smallint zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION smallint unsigned zerofill(f1 smallint unsigned zerofill) returns smallint unsigned zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION mediumint(f1 mediumint) returns mediumint
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION mediumint unsigned(f1 mediumint unsigned) returns mediumint unsigned
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION mediumint zerofill(f1 mediumint zerofill) returns mediumint zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION mediumint unsigned zerofill(f1 mediumint unsigned zerofill) returns mediumint unsigned zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION int(f1 int) returns int
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION int1(f1 int1) returns int1
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION int2(f1 int2) returns int2
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION int3(f1 int3) returns int3
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION int4(f1 int4) returns int4
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION int8(f1 int8) returns int8
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION int unsigned(f1 int unsigned) returns int unsigned
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION int zerofill(f1 int zerofill) returns int zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION int unsigned zerofill(f1 int unsigned zerofill) returns int unsigned zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION bigint(f1 bigint) returns bigint
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION bigint unsigned(f1 bigint unsigned) returns bigint unsigned
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION bigint zerofill(f1 bigint zerofill) returns bigint zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION bigint unsigned zerofill(f1 bigint unsigned zerofill) returns bigint unsigned zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION decimal(f1 decimal) returns decimal
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION decimal unsigned(f1 decimal unsigned) returns decimal unsigned
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION decimal zerofill(f1 decimal zerofill) returns decimal zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION decimal unsigned zerofill(f1 decimal unsigned zerofill) returns decimal unsigned zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION numeric(f1 numeric) returns numeric
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION numeric unsigned(f1 numeric unsigned) returns numeric unsigned
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION numeric zerofill(f1 numeric zerofill) returns numeric zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION numeric unsigned zerofill(f1 numeric unsigned zerofill) returns numeric unsigned zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION real(f1 real) returns real
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION real unsigned(f1 real unsigned) returns real unsigned
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION real zerofill(f1 real zerofill) returns real zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION real unsigned zerofill(f1 real unsigned zerofill) returns real unsigned zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION float(f1 float) returns float
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION float unsigned(f1 float unsigned) returns float unsigned
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION float zerofill(f1 float zerofill) returns float zerofill
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION float unsigned zerofill(f1 float unsigned zerofill) returns float unsigned zerofill
+ return f1;
+
+CREATE FUNCTION date(f1 date) returns date
+ return f1;
+DROP FUNCTION date;
+
+CREATE FUNCTION time(f1 time) returns time
+ return f1;
+DROP FUNCTION time;
+
+CREATE FUNCTION datetime(f1 datetime) returns datetime
+ return f1;
+DROP FUNCTION datetime;
+
+CREATE FUNCTION timestamp(f1 timestamp) returns timestamp
+ return f1;
+DROP FUNCTION timestamp;
+
+CREATE FUNCTION year(f1 year) returns year
+ return f1;
+DROP FUNCTION year;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION year(3)(f1 year(3)) returns year(3)
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION year(4)(f1 year(4)) returns year(4)
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION enum("1enum", "2enum")(f1 enum("1enum", "2enum")) returns enum("1enum", "2enum")
+ return f1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION set("1set", "2set")(f1 set("1set", "2set")) returns set("1set", "2set")
+ return f1;
+--enable_warnings
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 char ) returns char
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 char binary ) returns char binary
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 char ascii ) returns char ascii
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 char not null ) returns char not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 char binary not null ) returns char binary not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 char ascii not null ) returns char ascii not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinytext ) returns tinytext
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 text ) returns text
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumtext ) returns mediumtext
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 longtext ) returns longtext
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 tinytext not null ) returns tinytext not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 text not null ) returns text not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 mediumtext not null ) returns mediumtext not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 longtext not null ) returns longtext not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinyblob ) returns tinyblob
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 blob ) returns blob
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumblob ) returns mediumblob
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 longblob ) returns longblob
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 tinyblob not null ) returns tinyblob not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 blob not null ) returns blob not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 mediumblob not null ) returns mediumblob not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 longblob not null ) returns longblob not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 binary ) returns binary
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 binary not null ) returns binary not null
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinyint ) returns tinyint
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinyint unsigned ) returns tinyint unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinyint zerofill ) returns tinyint zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 tinyint unsigned zerofill ) returns tinyint unsigned zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 smallint ) returns smallint
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 smallint unsigned ) returns smallint unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 smallint zerofill ) returns smallint zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 smallint unsigned zerofill ) returns smallint unsigned zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumint ) returns mediumint
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumint unsigned ) returns mediumint unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumint zerofill ) returns mediumint zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 mediumint unsigned zerofill ) returns mediumint unsigned zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int ) returns int
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int unsigned ) returns int unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int1 unsigned ) returns int1 unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int2 unsigned ) returns int2 unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int3 unsigned ) returns int3 unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int4 unsigned ) returns int4 unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int8 unsigned ) returns int8 unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int zerofill ) returns int zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 int unsigned zerofill ) returns int unsigned zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 bigint ) returns bigint
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 bigint unsigned ) returns bigint unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 bigint zerofill ) returns bigint zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 bigint unsigned zerofill ) returns bigint unsigned zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 decimal ) returns decimal
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 decimal unsigned ) returns decimal unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 decimal zerofill ) returns decimal zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 decimal unsigned zerofill ) returns decimal unsigned zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 numeric ) returns numeric
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 numeric unsigned ) returns numeric unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 numeric zerofill ) returns numeric zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 numeric unsigned zerofill ) returns numeric unsigned zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 real ) returns real
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 real unsigned ) returns real unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 real zerofill ) returns real zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 real unsigned zerofill ) returns real unsigned zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 float ) returns float
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 float unsigned ) returns float unsigned
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 float zerofill ) returns float zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 float unsigned zerofill ) returns float unsigned zerofill
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 date ) returns date
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 time ) returns time
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 datetime ) returns datetime
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 timestamp ) returns timestamp
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1(f1 year ) returns year
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3)
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4)
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 enum(f1 "1enum", "2enum") ) returns enum("1enum", "2enum")
+ return f1;
+
+DROP FUNCTION IF EXISTS fn1;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(f1 set(f1 "1set", "2set") ) returns set("1set", "2set")
+ return f1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.16:
+ ----------------
+Ensure that a reference to a non-existent stored procedure is rejected with an
+appropriate error message;
+--source include/show_msg80.inc
+
+DROP PROCEDURE IF EXISTS sp16;
+
+--error ER_SP_DOES_NOT_EXIST
+CALL sp16( 'xyz' );
+
+CREATE DATABASE db1;
+USE db1;
+
+delimiter //;
+CREATE PROCEDURE sp16()
+BEGIN
+ set @var1 = 1;
+ SELECT @var1;
+END//
+delimiter ;//
+
+--error ER_SP_DOES_NOT_EXIST
+CALL db_storedproc.sp16();
+
+# cleanup
+USE db_storedproc;
+DROP PROCEDURE db1.sp16;
+DROP DATABASE db1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.17:
+ ----------------
+Ensure that it is possible to drop, create and CALL/execute a procedure and a
+function with the same name, even in the same database;
+--source include/show_msg80.inc
+
+USE db_storedproc;
+DROP FUNCTION IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1 ()
+BEGIN
+ declare x enum( 'db1', 'test' ) default 'test';
+ SELECT x;
+END//
+delimiter ;//
+
+CALL sp1();
+
+
+CREATE FUNCTION sp1 (y char) returns char return y;
+ SELECT sp1( 'a' );
+
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+USE db1;
+CALL db_storedproc.sp1( );
+SELECT db_storedproc.sp1( 'a' );
+
+DROP FUNCTION db_storedproc.sp1;
+USE db_storedproc;
+
+--error ER_SP_DOES_NOT_EXIST
+SELECT sp1('a');
+
+DROP PROCEDURE sp1;
+
+--error ER_SP_DOES_NOT_EXIST
+CALL sp1();
+
+--error ER_SP_DOES_NOT_EXIST
+SELECT sp1('a');
+
+# cleanup
+USE db_storedproc;
+DROP DATABASE db1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.18:
+ ----------------
+Ensure that it is possible to alter a procedure and
+a function with the same name, in the same database;
+--source include/show_msg80.inc
+
+
+USE db_storedproc;
+DROP PROCEDURE IF EXISTS sp1;
+DROP FUNCTION IF EXISTS sp1;
+set @x=null; set @y=null;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ set @x= 1;
+ SELECT @x;
+END//
+delimiter ;//
+
+CREATE FUNCTION sp1 () returns int return 2.2;
+CALL db_storedproc.sp1();
+SELECT db_storedproc.sp1();
+
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+USE db1;
+alter procedure db_storedproc.sp1 sql security invoker;
+--sorted_result
+SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1';
+
+alter function db_storedproc.sp1 sql security invoker;
+--sorted_result
+SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1';
+
+CALL db_storedproc.sp1();
+
+SELECT db_storedproc.sp1();
+
+USE db_storedproc;
+alter procedure sp1 sql security DEFINER;
+CALL db_storedproc.sp1();
+
+SELECT db_storedproc.sp1();
+
+alter function sp1 sql security DEFINER;
+--sorted_result
+SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1';
+CALL db_storedproc.sp1();
+
+SELECT db_storedproc.sp1();
+
+# cleanup
+USE db_storedproc;
+DROP DATABASE db1;
+DROP PROCEDURE db_storedproc.sp1;
+DROP FUNCTION db_storedproc.sp1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.19:
+ ----------------
+verify altering procedure and function with the same name, does not affect
+properties of a procedure and a function with the same name in the different
+database.;
+--source include/show_msg80.inc
+
+
+--disable_warnings
+DROP DATABASE IF EXISTS db_storedproc_3122;
+--enable_warnings
+
+CREATE DATABASE db_storedproc_3122;
+USE db_storedproc;
+SET @x = NULL;
+SET @y = NULL;
+DROP PROCEDURE IF EXISTS sp1;
+DROP FUNCTION IF EXISTS sp1;
+DROP PROCEDURE IF EXISTS db_storedproc_3122.sp1;
+DROP FUNCTION IF EXISTS db_storedproc_3122.sp1;
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ SET @x = 1;
+ SELECT @x;
+END//
+delimiter ;//
+
+# FIXME ps-protocol vs. normal difference when returning float instead of double
+CREATE FUNCTION db_storedproc_3122.sp1() RETURNS DOUBLE RETURN 2.2;
+CALL sp1();
+ SELECT db_storedproc_3122.sp1();
+ USE db_storedproc_3122;
+
+delimiter //;
+CREATE PROCEDURE sp1 ()
+BEGIN
+ SET @x = 3;
+ SELECT @x;
+END//
+delimiter ;//
+
+CREATE FUNCTION db_storedproc.sp1() RETURNS DOUBLE RETURN 4.4;
+CALL sp1();
+SELECT db_storedproc.sp1();
+
+ALTER PROCEDURE db_storedproc_3122.sp1 SQL SECURITY INVOKER;
+ALTER FUNCTION sp1 SQL SECURITY INVOKER;
+
+--sorted_result
+SELECT db, name, type, security_type FROM mysql.proc WHERE db LIKE 'db_storedproc%' AND specific_name='sp1';
+
+CALL db_storedproc.sp1();
+
+SELECT db_storedproc.sp1();
+CALL db_storedproc_3122.sp1();
+SELECT db_storedproc_3122.sp1();
+
+# clean up
+USE db_storedproc;
+DROP DATABASE db_storedproc_3122;
+DROP FUNCTION db_storedproc.sp1;
+DROP PROCEDURE db_storedproc.sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.20:
+ ----------------
+Ensure that it is possible to alter the comment of a procedure
+and a function with the same name, even in the same database;
+--source include/show_msg80.inc
+
+
+USE db_storedproc;
+set @x=null;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP FUNCTION IF EXISTS sp1;
+--enable_warnings
+
+CREATE PROCEDURE sp1 () set @x= 1;
+CREATE FUNCTION sp1 () returns int return 2;
+
+DROP DATABASE IF EXISTS db_storedproc_3122;
+CREATE DATABASE db_storedproc_3122;
+USE db_storedproc_3122;
+
+CREATE PROCEDURE sp1 () set @x= 3;
+CREATE FUNCTION sp1 () returns int return 4;
+
+alter procedure sp1 sql security invoker comment 'this is a procedure';
+alter function sp1 sql security invoker comment 'this is a function';
+
+alter procedure sp1 sql security DEFINER;
+alter function sp1 sql security DEFINER;
+--replace_column 5 <modified> 6 <created>
+show CREATE PROCEDURE sp1;
+--replace_column 5 <modified> 6 <created>
+show CREATE FUNCTION sp1;
+
+# clean up
+USE db_storedproc;
+DROP DATABASE db_storedproc_3122;
+DROP FUNCTION db_storedproc.sp1;
+DROP PROCEDURE db_storedproc.sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.21:
+ ----------------
+Ensure that it is not possible to create two procedures with same name
+in same database;
+--source include/show_msg80.inc
+
+USE db_storedproc;
+set @x=null;
+set @y=null;
+
+--disable_warnings
+DROP DATABASE IF EXISTS db1;
+--enable_warnings
+
+CREATE DATABASE db1;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 () set @x=1;
+
+--error ER_SP_ALREADY_EXISTS
+CREATE PROCEDURE sp1 () set @x=2;
+
+CALL sp1();
+SELECT @x;
+USE db1;
+--error ER_SP_ALREADY_EXISTS
+CREATE PROCEDURE db_storedproc.sp1 () set @x=3;
+CALL db_storedproc.sp1();
+ SELECT @x;
+
+DROP PROCEDURE IF EXISTS db_storedproc.sp1;
+CREATE PROCEDURE db_storedproc.sp1 () set @x=1;
+--error ER_SP_ALREADY_EXISTS
+CREATE PROCEDURE db_storedproc.sp1 () set @x=2;
+CALL db_storedproc.sp1();
+SELECT @x;
+
+# clean up
+USE db_storedproc;
+DROP DATABASE db1;
+DROP PROCEDURE db_storedproc.sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.22:
+ ----------------
+Ensure that it is not possible to create two functions with same name in the
+same database;
+--source include/show_msg80.inc
+
+USE db_storedproc;
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+DROP FUNCTION IF EXISTS fn1;
+CREATE FUNCTION fn1 () returns int return 1;
+--error ER_SP_ALREADY_EXISTS
+CREATE FUNCTION fn1 () returns int return 2;
+SELECT fn1();
+USE db1;
+--error ER_SP_ALREADY_EXISTS
+CREATE FUNCTION db_storedproc.fn1 () returns int return 3;
+SELECT db_storedproc.fn1();
+DROP FUNCTION IF EXISTS db_storedproc.fn1;
+CREATE FUNCTION db_storedproc.fn1 () returns int return 1;
+--error ER_SP_ALREADY_EXISTS
+CREATE FUNCTION db_storedproc.fn1 () returns int return 2;
+SELECT db_storedproc.fn1();
+
+# clean up
+USE db_storedproc;
+DROP DATABASE db1;
+DROP FUNCTION db_storedproc.fn1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.23:
+ ----------------
+Ensure that it is possible to create two or more procedures with the same name,
+providing each resides in different databases;
+--source include/show_msg80.inc
+
+
+USE db_storedproc;
+set @x=null;
+set @y=null;
+DROP PROCEDURE IF EXISTS sp1;
+CREATE PROCEDURE sp1 () set @x= 1;
+DROP DATABASE IF EXISTS test3124;
+CREATE DATABASE test3124;
+USE test3124;
+CREATE PROCEDURE sp1 () set @y= 2;
+CALL sp1();
+SELECT @x, @y;
+USE db_storedproc;
+CALL sp1();
+SELECT @x, @y;
+
+# clean up
+USE db_storedproc;
+DROP DATABASE test3124;
+DROP PROCEDURE db_storedproc.sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.24:
+ ----------------
+Ensure that it is possible to create two or more functions with the same name,
+providing each resides in different databases.;
+--source include/show_msg80.inc
+
+
+USE db_storedproc;
+DROP FUNCTION IF EXISTS f1;
+CREATE FUNCTION f1 () returns int return 1;
+DROP DATABASE IF EXISTS test3125;
+CREATE DATABASE test3125;
+USE test3125; CREATE FUNCTION f1 () returns int return 2;
+SELECT f1();
+USE db_storedproc;
+SELECT f1();
+
+# clean up
+USE db_storedproc;
+DROP DATABASE test3125;
+DROP FUNCTION db_storedproc.f1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.25:
+ ----------------
+Ensure that any invalid function name is never accepted, and that an appropriate
+error message is returned when the name is rejected. (invalid func name);
+--source include/show_msg80.inc
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE FUNCTION !_fn1( f1 char(20) ) returns int
+BEGIN
+ SELECT * from t1 where f2 = f1;
+ return 1;
+END//
+delimiter ;//
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1( f1 char(20) ) return int
+BEGIN
+ SELECT * from t1 where f2 = f1;
+ return 1;
+END//
+delimiter ;//
+
+CREATE FUNCTION fn1() returns int
+ return 'a';
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION procedure() returns int
+ return 1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(a char) returns int lang sql return 1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(a char) returns int deterministic( return 1);
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(a char) returns int non deterministic return 1;
+
+--error ER_PARSE_ERROR
+CREATE FUNCTION fn1(a char) returns int not deterministic comment 'abc' language sql sql security refiner return 1;
+
+# clean up
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+
+# ==============================================================================
+#
+# test plan section: 4.2 - syntax checks for programming statements - 1
+#
+# ==============================================================================
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.1:
+ ---------------
+ Ensure that all clauses that should be supported are supported.
+ CREATE PROCEDURE;
+--source include/show_msg80.inc
+
+
+USE db_storedproc;
+
+ set @count = 0;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1(cnt int(20))
+BEGIN
+ SELECT count(*) into cnt from t2;
+ set @count = cnt;
+END//
+delimiter ;//
+
+CALL sp1( 10 );
+
+ SELECT @count;
+
+# clean up
+DROP PROCEDURE sp1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.2:
+BEGINend;
+--source include/show_msg80.inc
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( cnt int(20) )
+BEGIN
+ SELECT count(*) into cnt from t2;
+ set @count = cnt;
+ SELECT @count;
+END//
+delimiter ;//
+
+CALL sp1( 10 );
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+# missing BEGIN
+# PLEASE NOTE:
+# this test client has the MULTI_QUERY capability,
+# so that the following request (starting at 'CREATE' and ending at the //
+# delimiter) is interpreted as follows:
+# 1) it's a multi query
+# 2) the first query is a valid CREATE PROCEDURE statement, and the
+# procedure consist of only one SELECT statement
+# 3) the second query is a SET statement, which is broken since it's
+# referencing an unknown column 'cnt'
+# 4) the next query (SELECT @count) is not parsed or executed, since 3)
+# failed
+
+delimiter //;
+--error ER_BAD_FIELD_ERROR
+CREATE PROCEDURE sp1( cnt int(20) )
+ SELECT count(*) into cnt from t2;
+ set @count = cnt;
+ SELECT @count;
+END//
+delimiter ;//
+
+CALL sp1( 10 );
+
+--disable_warnings
+DROP PROCEDURE sp1;
+--enable_warnings
+
+# wrong order of BEGIN and END
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( cnt int(20) )
+END
+ SELECT count(*) into cnt from t2;
+ set @count = cnt;
+ SELECT @count;
+BEGIN//
+delimiter ;//
+
+--error ER_SP_DOES_NOT_EXIST
+CALL sp1( 10 );
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+# invalid usage of BEGIN + END
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( cnt int(20) )
+BEGIN
+ SELECT count(*) into cnt from t2;
+ BEGIN
+ BEGIN END;
+ BEGIN
+ END;
+ set @count = cnt;
+ SELECT @count;
+END//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.4:
+ ---------------
+Ensure that every BEGIN statement is coupled with a terminating END statement.
+(BEGIN with no END);
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x char;
+ declare y char;
+ SELECT f1, f2 into x, y from t2 limit 1;
+END//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase ....:
+ --------------
+;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ accessible:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ add:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ all:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ alter:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ analyze:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ and:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ as:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ asc:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ asensitive:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ before:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ between:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ bigint:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ binary:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ blob:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ both:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ by:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ call:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ cascade:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ case:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ change:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ char:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ character:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ check:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ collate:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ column:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ condition:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ constraint:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ continue:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ convert:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ create:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ cross:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ current_date:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ current_time:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ current_timestamp:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ current_user:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ cursor:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ database:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ databases:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ day_hour:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ day_microsecond:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ day_minute:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ day_second:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ dec:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ decimal:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ declare:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ default:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ delayed:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ delete:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ desc:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ describe:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ deterministic:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ distinct:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ distinctrow:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ div:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ double:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+drop:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ dual:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ each:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ else:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ elseif:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ enclosed:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ escaped:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ exists:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ exit:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ explain:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ false:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ fetch:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ float:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ float4:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ float8:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ for:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ force:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ foreign:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ from:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ fulltext:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ grant:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ group:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ having:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ high_priority:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ hour_microsecond:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ hour_minute:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ hour_second:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ if:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ ignore:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ in:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ index:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ infile:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ inner:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ inout:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ insensitive:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ insert:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ int:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ int1:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ int2:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ int3:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ int4:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ int8:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ integer:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ interval:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ into:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ is:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ iterate:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ join:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ key:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ keys:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ kill:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ leading:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ leave:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ left:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ like:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ limit:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ linear:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ lines:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ load:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ localtime:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ localtimestamp:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ lock:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ long:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ longblob:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ longtext:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ loop:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ low_priority:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ master_ssl_verify_server_cert:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ match:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ mediumblob:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ mediumint:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ mediumtext:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ middleint:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ minute_microsecond:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ minute_second:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ mod:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ modifies:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ natural:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ not:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ no_write_to_binlog:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ null:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ numeric:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ on:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ optimize:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ option:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ optionally:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ or:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ order:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ out:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ outer:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ outfile:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ precision:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ primary:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ procedure:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ purge:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ range:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ read:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ reads:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+# delimiter //;
+# --error ER_PARSE_ERROR
+# CREATE PROCEDURE sp1()
+# read_only:BEGIN
+# SELECT @x;
+# END//
+# delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ read_write:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ real:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ references:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ regexp:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ release:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ rename:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ repeat:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ replace:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ require:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ restrict:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ return:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ revoke:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ right:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ rlike:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ schema:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ schemas:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ second_microsecond:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ select:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ sensitive:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ separator:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ set:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ show:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ smallint:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ spatial:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ specific:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ sql:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ sqlexception:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ sqlstate:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ sqlwarning:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ sql_big_result:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ sql_calc_found_rows:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ sql_small_result:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ ssl:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ starting:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ straight_join:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ table:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ terminated:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ then:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ tinyblob:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ tinyint:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ tinytext:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ to:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ trailing:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ trigger:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ true:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ undo:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ union:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ unique:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BADSTATEMENT
+CREATE PROCEDURE sp1()
+ unlock:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ unsigned:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ update:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ usage:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ use:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ using:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ utc_date:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ utc_time:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ utc_timestamp:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ values:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ varbinary:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ varchar:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ varcharacter:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ varying:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ when:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ where:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ while:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ with:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ write:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ xor:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ year_month:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+ zerofill:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.6:
+ ---------------
+Ensure that the labels for multiple BEGIN an END work properly;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+begin_label: BEGIN
+ declare x char;
+ declare y char;
+ set x = '1';
+ set y = '2';
+ label1: BEGIN
+ declare x char;
+ declare y char;
+ SELECT f1, f2 into x, y from t2 limit 1;
+ END label1;
+ set @v1 = x;
+ set @v2 = y;
+ SELECT @v1, @v2;
+END begin_label//
+delimiter ;//
+
+CALL sp1();
+
+# clean up
+DROP PROCEDURE sp1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.7:
+ ---------------
+Ensure that the labels enclosing each BEGIN/END compound statement must match.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_LABEL_MISMATCH
+CREATE PROCEDURE sp1( )
+begin1_label: BEGIN
+ declare x char;
+ declare y char;
+ SELECT lf1, f1 into x, y from t2 limit 1;
+ begin2_label: BEGIN
+ declare x char;
+ declare y char;
+ SELECT f1, f2 into x, y from t2 limit 1;
+ END begin2_changed;
+END begin1_changed//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.8:
+ ---------------
+Ensure that it is possible to put a beginning label at the start of a
+BEGIN/END compound statement without also requiring an ending label
+at the END of the same statement.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+ begin_label: BEGIN
+ declare x char;
+ declare y char;
+ SELECT f1, f2 into x, y from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# clean up
+DROP PROCEDURE sp1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.9:
+ ---------------
+Ensure that it is not possible to put an ending label at the END of
+a BEGIN/END compound statement without also requiring a matching
+beginning label at the start of the same statement;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x char;
+ declare y char;
+ SELECT f1, f2 into x, y from t2 limit 1;
+END begin_label//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.10:
+ ----------------
+Ensure that every beginning label must END with a colon(:);
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+begin_label BEGIN
+ declare x char;
+ declare y char;
+ SELECT f1, f2 into x, y from t2 limit 1;
+END begin_label//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.11:
+ ----------------
+Ensure that every beginning label with the same scope must be unique. (same label names);
+--source include/show_msg80.inc
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_LABEL_REDEFINE
+CREATE PROCEDURE sp6( )
+begin_samelabel: BEGIN
+ declare x char;
+ declare y char;
+ SELECT f1, f2 into x, y from t2 limit 1;
+ begin_samelabel: BEGIN
+ declare x char;
+ declare y char;
+ SELECT f1, f2 into x, y from t2 limit 1;
+ END begin_samelabel;
+ begin_samelabel: BEGIN
+ declare x char;
+ declare y char;
+ SELECT f1, f2 into x, y from t2 limit 1;
+ END begin_samelabel;
+END begin_samelabel//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.12:
+ ----------------
+Ensure that the variables, cursors, conditions, and handlers declared for
+a stored procedure (with the declare statement) may only be properly defined;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_TOO_BIG_SCALE
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare x char default 'a';
+ declare y integer default 1;
+ declare z float default 1.1;
+ declare a enum("value1", "value2") default 'value1';
+ declare b decimal(255, 255) default 1.2e+12;
+ declare c mediumtext default 'mediumtext';
+ declare d datetime default '2005-02-02 12:12:12';
+ declare e char default 'b';
+ declare cur1 cursor for SELECT f1 from db_storedproc.t2;
+ declare continue handler for sqlstate '02000' set @x2 = 1;
+ open cur1;
+ fetch cur1 into e;
+ SELECT x, y, z, a, b, c, d, e;
+ close cur1;
+END//
+delimiter ;//
+
+CALL sp6();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare x12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 char default '0';
+ SELECT x12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567;
+END//
+delimiter ;//
+
+CALL sp6();
+
+# clean up
+DROP PROCEDURE sp6;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.13:
+ ----------------
+Ensure that the variables declared for a stored procedure (with the declare
+statement) may only be defined in the correct order.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare x default '0' char;
+ SELECT x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare x char, integer default '0';
+ SELECT x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare x1, x2 char, integer default '0', 1;
+ SELECT x;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare char x;
+ declare char y;
+ SELECT f1, f2 into x, y from t2 limit 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare char x, y1 integer default 0;
+ declare char y;
+ SELECT f1, f2 into x, y from t2 limit 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare x default 'a' char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare condition notable for sqlstate '42s22';
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare condition for notable sqlstate '42s22';
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare condition for sqlstate notable '42s22';
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare condition for sqlstate '42s22' notable;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare cursor cur1 for SELECT f1 from db_storedproc.t2;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare cursor for cur1 SELECT f1 from db_storedproc.t2;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare cursor for SELECT cur1 f1 from db_storedproc.t2;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare handler continue for sqlstate '02000' set @x2 = 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare handler exit for sqlstate '02000' set @x2 = 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare handler undo for sqlstate '02000' set @x2 = 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare char x;
+ SELECT f1 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare char binary x;
+ SELECT f2 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare char ascii x;
+ SELECT f3 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinytext x;
+ SELECT f4 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x;
+ SELECT f5 text into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumtext x;
+ SELECT f6 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare longtext x;
+ SELECT f7 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinyblob x;
+ SELECT f8 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare blob x;
+ SELECT f9 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumblob x;
+ SELECT f10 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare longblob x;
+ SELECT f11 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare binary x;
+ SELECT f12 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinyint x;
+ SELECT f13 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinyint unsigned x;
+ SELECT f14 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinyint zerofill x;
+ SELECT f15 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinyint unsigned zerofill x;
+ SELECT f16 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare smallint x;
+ SELECT f17 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare smallint unsigned x;
+ SELECT f18 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare smallint zerofill x;
+ SELECT f19 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare smallint unsigned zerofill x;
+ SELECT f20 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumint x;
+ SELECT f21 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumint unsigned x;
+ SELECT f22 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumint zerofill x;
+ SELECT f23 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumint unsigned zerofill x;
+ SELECT f24 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int x;
+ SELECT f25 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int unsigned x;
+ SELECT f26 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int zerofill x;
+ SELECT f27 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int unsigned zerofill x;
+ SELECT f28 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare bigint x;
+ SELECT f29 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare bigint unsigned x;
+ elect f30 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare bigint zerofill x;
+ SELECT f31 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare bigint unsigned zerofill x;
+ SELECT f32 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal x;
+ SELECT f33 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal unsigned x;
+ SELECT f34 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal zerofill x;
+ SELECT f35 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal unsigned zerofill not null x;
+ SELECT f36 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (0) not null x;
+ SELECT f37 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (64) not null x;
+ SELECT f38 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (0) unsigned not null x;
+ SELECT f39 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (64) unsigned not null x;
+ SELECT f40 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (0) zerofill not null x;
+ SELECT f41 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (64) zerofill not null x;
+ SELECT f42 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (0) unsigned zerofill not null x;
+ SELECT f43 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (64) unsigned zerofill not null x;
+ SELECT f44 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (00) not null x;
+ SELECT f45 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (63, 30) not null x;
+ SELECT f46 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (00) unsigned not null x;
+ SELECT f47 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (63, 30) unsigned not null x;
+ SELECT f48 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (00) zerofill not null x;
+ SELECT f49 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (63, 30) zerofill not null x;
+ SELECT f50 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (00) unsigned zerofill not null x;
+ SELECT f51 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal (63, 30) unsigned zerofill not null x;
+ SELECT f52 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric not null x;
+ SELECT f53 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric unsigned not null x;
+ SELECT f54 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric zerofill not null x;
+ SELECT f55 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric unsigned zerofill not null x;
+ SELECT f56 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (0) not null x;
+ SELECT f57 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (64) not nul x;
+ SELECT f58 into x from tb1 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (0) unsigned x;
+ SELECT f59 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (64) unsigned x;
+ SELECT f60 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (0) zerofill x;
+ SELECT f61 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (64) zerofill x;
+ SELECT f62 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (0) unsigned zerofill x;
+ SELECT f63 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (64) unsigned zerofill x;
+ SELECT f64 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (00) x;
+ SELECT f65 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (63, 30) x;
+ SELECT f66 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (00) unsigned x;
+ SELECT f67 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (63, 30) unsigned x;
+ SELECT f68 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (00) zerofill x;
+ SELECT f69 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (63, 30) zerofill x;
+ SELECT f70 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (00) unsigned zerofill x;
+ SELECT f71 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric (63, 30) unsigned zerofill x;
+ SELECT f72 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare real x;
+ SELECT f73 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare real unsigned x;
+ SELECT f74 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare real zerofill x;
+ SELECT f75 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare real unsigned zerofill x;
+ SELECT f76 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare double x;
+ SELECT f77 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare double unsigned x;
+ SELECT f78 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare double zerofill x;
+ SELECT f79 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare double unsigned zerofill x;
+ SELECT f80 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float not null x;
+ SELECT f81 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float unsigned not null x;
+ SELECT f82 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float zerofill not null x;
+ SELECT f83 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float unsigned zerofill not null x;
+ SELECT f84 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(0) not null x;
+ SELECT f85 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(23) not null x;
+ SELECT f86 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(0) unsigned not null x;
+ SELECT f87 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(23) unsigned not null x;
+ SELECT f88 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(0) zerofill not null x;
+ SELECT f89 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(23) zerofill not null x;
+ SELECT f90 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(0) unsigned zerofill not null x;
+ SELECT f91 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(23) unsigned zerofill not null x;
+ SELECT f92 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(24) not null x;
+ SELECT f93 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(53) not null x;
+ SELECT f94 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(24) unsigned not null x;
+ SELECT f95 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(53) unsigned not null x;
+ SELECT f96 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(24) zerofill not null x;
+ SELECT f97 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(53) zerofill not null x;
+ SELECT f98 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(24) unsigned zerofill not null x;
+ SELECT f99 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float(53) unsigned zerofill not null x;
+ SELECT f100 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare date not null x;
+ SELECT f101 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare time not null x;
+ SELECT f102 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare datetime not null x;
+ SELECT f103 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare timestamp not null x;
+ SELECT f104 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare year not null x;
+ SELECT f105 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare year(3) not null x;
+ SELECT f106 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare year(4) not null x;
+ SELECT f107 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare enum("1enum", "2enum") not null x;
+ SELECT f108 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare set("1set", "2set") not nul x;
+ SELECT f109 into x from tb2 limit 9998, 1;
+END//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.14:
+ ----------------
+Ensure that the handlers declared for a stored procedure (with the declare
+statement) may only be defined in the correct order;
+--source include/show_msg80.inc
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_VARCOND_AFTER_CURSHNDLR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '23000' set @x2 = 1;
+ declare x char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_VARCOND_AFTER_CURSHNDLR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare cursor1 cursor for SELECT f1 from tb1;
+ declare x char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_VARCOND_AFTER_CURSHNDLR
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare cursor1 cursor for SELECT f1 from tb1;
+ declare sqlcondition condition for sqlstate '02000';
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_CURSOR_AFTER_HANDLER
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare sqlcondition condition for sqlstate '02000';
+ declare continue handler for sqlcondition set @x=1;
+ declare cursor1 cursor for SELECT f1 from tb1;
+END//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.15:
+ ----------------
+Ensure that the declare statement can declare multiple variables both separately
+and all at once from a variable list. (multiple declaration);
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1()
+ BEGIN
+ DECLARE x1 CHAR(100) DEFAULT 'outer';
+ BEGIN
+ DECLARE x1 CHAR(100) DEFAULT x1;
+ END;
+ END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z char default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z char ascii default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z tinytext default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z text default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z mediumtext default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z longtext default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z tinyblob default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z blob default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z mediumblob default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z longblob default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z binary default null;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z tinyint default -126;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z tinyint unsigned default 253;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z tinyint zerofill default -1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z tinyint unsigned zerofill default 1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z smallint default -32768;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z smallint unsigned default 65535;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z smallint zerofill default -1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z smallint unsigned zerofill default 1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z mediumint default -8388608;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z mediumint unsigned default 16777215;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z mediumint zerofill default -1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z mediumint unsigned zerofill default 1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z int default -2147483648;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z int unsigned default 4294967295;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z int zerofill default -1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z int unsigned zerofill default 1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z bigint default -9223372036854775808;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z bigint unsigned default 18446744073709551615;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z bigint zerofill default -1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z bigint unsigned zerofill default 1;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+#FIXME check again with -3.402823466e+38
+let $default_minus38= -34028234660123456789012345678901234567;
+
+delimiter //;
+eval CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z decimal default $default_minus38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z decimal unsigned default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+#FIXME check again with -3.402823466e+38
+delimiter //;
+eval CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z decimal zerofill default $default_minus38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z decimal unsigned zerofill default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z numeric default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z numeric unsigned default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z numeric zerofill default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z numeric unsigned zerofill default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z real default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+--replace_result e-038 e-38
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z real unsigned default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+--replace_result e-038 e-38
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z real zerofill default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+--replace_result e-038 e-38
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z real unsigned zerofill default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+--replace_result e-038 e-38
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z float default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+--replace_result e-038 e-38
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z float unsigned default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+--replace_result e-038 e-38
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z float zerofill default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+--replace_result e-038 e-38
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z float unsigned zerofill default 1.175494351e-38;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+--replace_result e-038 e-38
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z date default '2005-02-02';
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z time default '12:20:12';
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z datetime default '2005-02-02 12:20:12';
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z timestamp default '20050202122012';
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z year default 2005;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z year(3) default 2005;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z year(4) default 2005;
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z enum("1enum", "2enum") default "2enum";
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x, y, z set("1set", "2set") default "2set";
+ SELECT x, y, z;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# clean up
+DROP PROCEDURE sp1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.16:
+ ----------------
+Ensure that the declare statement can declare multiple variables both separately
+and all at once from a variable list. (multiple declaration).;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6( )
+BEGIN
+ declare a, b char default '2';
+ declare c, d float default 1.3;
+ declare e, f text default 'text';
+ declare g, h enum("value1", "value2" ) default 'value1';
+ declare i, j datetime default '2005-02-02 12:12:12';
+ declare k, l blob default 'blob';
+ SELECT a, b, c, d, e, f, g, h, k, l;
+END//
+delimiter ;//
+
+CALL sp6();
+
+# clean up
+DROP PROCEDURE sp6;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.17:
+ ----------------
+Ensure that the invalid variable declarations are rejected, with an appropriate
+error message.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare @x char;
+ SELECT f2 into x from t2 limit 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare accessible char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare add char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare all char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare alter char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare analyze char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare and char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare as char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare asc char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare asensitive char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare before char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare between char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare bigint char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare binary char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare blob char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare both char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare by char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare call char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cascade char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare case char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare change char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare char char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare character char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare check char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare collate char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare column char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare condition char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare constraint char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare convert char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare create char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cross char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare current_date char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare current_time char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare current_timestamp char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare current_user char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cursor char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare database char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare databases char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare day_hour char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare day_microsecond char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare day_minute char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare day_second char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare dec char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare decimal char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare declare char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare default char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare delayed char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare delete char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare desc char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare describe char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare deterministic char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare distinct char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare distinctrow char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare div char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare double char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare drop char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare dual char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare each char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare else char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare elseif char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare enclosed char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare escaped char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare exists char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare exit char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare explain char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare false char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare fetch char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare float char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare float4 char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare float8 char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare for char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare force char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare foreign char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare from char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare fulltext char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare grant char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare group char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare having char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare high_priority char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare hour_microsecond char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare hour_minute char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare hour_second char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare if char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare ignore char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare in char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare index char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare infile char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare inner char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare inout char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare insensitive char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare insert char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare int char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare int1 char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare int2 char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare int3 char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare int4 char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare int8 char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare integer char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare interval char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare into char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare is char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare iterate char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare join char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare key char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare keys char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare kill char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare leading char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare leave char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare left char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare like char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare limit char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare linear char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare lines char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare load char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare localtime char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare localtimestamp char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare lock char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare long char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare longblob char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare longtext char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare loop char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare low_priority char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare master_ssl_verify_server_cert char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare match char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare mediumblob char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare mediumint char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare mediumtext char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare middleint char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare minute_microsecond char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare minute_second char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare mod char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare modifies char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare natural char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare not char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare no_write_to_binlog char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare null char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare numeric char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare on char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare optimize char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare option char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare optionally char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare or char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare order char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare out char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare outer char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare outfile char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare precision char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare primary char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare procedure char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare purge char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare range char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare read char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare reads char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+# FIXME 31947
+#--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare read_only char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare read_write char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare real char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare references char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare regexp char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare release char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare rename char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare repeat char;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare replace char;
+END//
+delimiter ;//
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare require char;
+END//
+delimiter ;//
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare restrict char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare return char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare revoke char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare right char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare rlike char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare schema char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare schemas char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare second_microsecond char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare SELECT char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare sensitive char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare separator char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare set char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare show char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare smallint char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare spatial char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare specific char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare sql char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare sqlexception char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare sqlstate char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare sqlwarning char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare sql_big_result char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare sql_calc_found_rows char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare sql_small_result char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare ssl char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare starting char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare straight_join char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare table char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare terminated char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare then char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare tinyblob char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare tinyint char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare tinytext char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare to char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare trailing char;
+END//
+delimiter ;//
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare trigger char;
+END//
+delimiter ;//
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare true char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare undo char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare union char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare unique char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare unlock char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare unsigned char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare update char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare usage char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare use char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare using char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare utc_date char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare utc_time char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare utc_timestamp char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare values char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare varbinary char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare varchar char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare varcharacter char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare varying char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare when char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare where char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare while char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare with char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare write char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xor char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare year_month char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare zerofill char;
+END//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase :
+ ----------
+Ensure that every possible type of condition may be declared for a stored procedure
+( covered in more detail in handlers section.);
+--source include/show_msg80.inc
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate 'HY000';
+
+ declare cond2 condition for sqlstate '23000';
+
+ declare cond3 condition for sqlstate 'HY001';
+
+ declare cond4 condition for sqlstate '08004';
+
+ declare cond5 condition for sqlstate '08S01';
+
+ declare cond6 condition for sqlstate '42000';
+
+ declare cond7 condition for sqlstate '28000';
+
+ declare cond8 condition for sqlstate '3D000';
+
+ declare cond9 condition for sqlstate '42S01';
+
+ declare cond10 condition for sqlstate '42S02';
+
+ declare cond11 condition for sqlstate '42S22';
+
+ declare cond12 condition for sqlstate '21S01';
+
+ declare cond13 condition for sqlstate '42S21';
+
+ declare cond14 condition for sqlstate '42S12';
+
+ declare cond15 condition for sqlstate '22004';
+
+ declare cond16 condition for sqlstate '25000';
+
+ declare cond17 condition for sqlstate '40001';
+
+ declare cond18 condition for sqlstate '21000';
+
+ declare cond19 condition for sqlstate '01000';
+
+ declare cond20 condition for sqlstate '22003';
+
+ declare cond21 condition for sqlstate '22007';
+
+ declare cond22 condition for sqlstate '0A000';
+
+ declare cond23 condition for sqlstate '70100';
+
+ declare cond24 condition for sqlstate '2F005';
+
+ declare cond25 condition for sqlstate '24000';
+
+ declare cond26 condition for sqlstate '02000';
+
+ declare continue handler for cond2 set @x2 = 1;
+
+ declare continue handler for cond1 set @x2 = 1;
+
+ declare continue handler for cond3 set @x2 = 1;
+
+ declare continue handler for cond4 set @x2 = 1;
+
+ declare continue handler for cond5 set @x2 = 1;
+
+ declare continue handler for cond7 set @x2 = 1;
+
+ declare continue handler for cond6 set @x2 = 1;
+
+ declare continue handler for cond8 set @x2 = 1;
+
+ declare continue handler for cond9 set @x2 = 1;
+
+ declare continue handler for cond10 set @x2 = 1;
+
+ declare continue handler for cond11 set @x2 = 1;
+
+ declare continue handler for cond12 set @x2 = 1;
+
+ declare continue handler for cond13 set @x2 = 1;
+
+ declare continue handler for cond14 set @x2 = 1;
+
+ declare continue handler for cond15 set @x2 = 1;
+
+ declare continue handler for cond16 set @x2 = 1;
+
+ declare continue handler for cond17 set @x2 = 1;
+
+ declare continue handler for cond18 set @x2 = 1;
+
+ declare continue handler for cond19 set @x2 = 1;
+
+ declare continue handler for cond20 set @x2 = 1;
+
+ declare continue handler for cond21 set @x2 = 1;
+
+ declare continue handler for cond22 set @x2 = 1;
+
+ declare continue handler for cond23 set @x2 = 1;
+
+ declare continue handler for cond24 set @x2 = 1;
+
+ declare continue handler for cond25 set @x2 = 1;
+
+ declare continue handler for cond26 set @x2 = 1;
+
+
+ set @x = 1;
+
+ insert into t2 values (1);
+
+ set @x = 2;
+
+ insert into t2 values (1);
+
+ set @x = 3;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# clean up
+DROP PROCEDURE sp1;
+
+# testcase: ensure that invalid condition declarations are rejected, with an appropriate error message.
+
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare @x char;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x char1;
+END//
+delimiter ;//
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare accessible condition for sqlstate '02000';
+ declare exit handler for add set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare add condition for sqlstate '02000';
+ declare exit handler for add set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare all condition for sqlstate '02000';
+ declare exit handler for all set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare alter condition for sqlstate '02000';
+ declare exit handler for alter set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare analyze condition for sqlstate '02000';
+ declare exit handler for analyze set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare and condition for sqlstate '02000';
+ declare exit handler for and set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare as condition for sqlstate '02000';
+ declare exit handler for as set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare asc condition for sqlstate '02000';
+ declare exit handler for asc set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare asensitive condition for sqlstate '02000';
+ declare exit handler for asensitive set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare before condition for sqlstate '02000';
+ declare exit handler for before set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare between condition for sqlstate '02000';
+ declare exit handler for between set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare bigint condition for sqlstate '02000';
+ declare exit handler for bigint set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare binary condition for sqlstate '02000';
+ declare exit handler for binary set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare blob condition for sqlstate '02000';
+ declare exit handler for blob set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare both condition for sqlstate '02000';
+ declare exit handler for both set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare by condition for sqlstate '02000';
+ declare exit handler for by set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare call condition for sqlstate '02000';
+ declare exit handler for CALL set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare cascade condition for sqlstate '02000';
+ declare exit handler for cascade set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare case condition for sqlstate '02000';
+ declare exit handler for case set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare change condition for sqlstate '02000';
+ declare exit handler for change set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare char condition for sqlstate '02000';
+ declare exit handler for char set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare character condition for sqlstate '02000';
+ declare exit handler for character set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare check condition for sqlstate '02000';
+ declare exit handler for check set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+#--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare collate condition for sqlstate '02000';
+ declare exit handler for collate set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare column condition for sqlstate '02000';
+ declare exit handler for column set @var2 = 1;
+END//
+delimiter ;//
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare condition condition for sqlstate '02000';
+ declare exit handler for condition set @var2 = 1;
+END//
+delimiter ;//
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+#--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare connection condition for sqlstate '02000';
+ declare exit handler for connection set @var2 = 1;
+END//
+delimiter ;//
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare constraint condition for sqlstate '02000';
+ declare exit handler for constraint set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare continue condition for sqlstate '02000';
+ declare exit handler for continue set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare convert condition for sqlstate '02000';
+ declare exit handler for convert set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare create condition for sqlstate '02000';
+ declare exit handler for create set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare cross condition for sqlstate '02000';
+ declare exit handler for cross set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare current_date condition for sqlstate '02000';
+ declare exit handler for current_date set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare current_time condition for sqlstate '02000';
+ declare exit handler for current_time set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare current_timestamp condition for sqlstate '02000';
+ declare exit handler for current_timestamp set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare current_user condition for sqlstate '02000';
+ declare exit handler for current_user set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare cursor condition for sqlstate '02000';
+ declare exit handler for cursor set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare database condition for sqlstate '02000';
+ declare exit handler for database set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare databases condition for sqlstate '02000';
+ declare exit handler for databases set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare day_hour condition for sqlstate '02000';
+ declare exit handler for day_hour set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare day_microsecond condition for sqlstate '02000';
+ declare exit handler for day_microsecond set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare day_minute condition for sqlstate '02000';
+ declare exit handler for day_minute set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare day_second condition for sqlstate '02000';
+ declare exit handler for day_second set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare dec condition for sqlstate '02000';
+ declare exit handler for dec set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal condition for sqlstate '02000';
+ declare exit handler for decimal set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare declare condition for sqlstate '02000';
+ declare exit handler for declare set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare default condition for sqlstate '02000';
+ declare exit handler for default set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare delayed condition for sqlstate '02000';
+ declare exit handler for delayed set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare delete condition for sqlstate '02000';
+ declare exit handler for delete set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare desc condition for sqlstate '02000';
+ declare exit handler for desc set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare describe condition for sqlstate '02000';
+ declare exit handler for describe set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare deterministic condition for sqlstate '02000';
+ declare exit handler for deterministic set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare distinct condition for sqlstate '02000';
+ declare exit handler for distinct set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare distinctrow condition for sqlstate '02000';
+ declare exit handler for distinctrow set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare div condition for sqlstate '02000';
+ declare exit handler for div set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare double condition for sqlstate '02000';
+ declare exit handler for double set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare drop condition for sqlstate '02000';
+ declare exit handler for drop set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare dual condition for sqlstate '02000';
+ declare exit handler for dual set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare each condition for sqlstate '02000';
+ declare exit handler for each set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare else condition for sqlstate '02000';
+ declare exit handler for else set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare elseif condition for sqlstate '02000';
+ declare exit handler for elseif set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare enclosed condition for sqlstate '02000';
+ declare exit handler for enclosed set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare escaped condition for sqlstate '02000';
+ declare exit handler for escaped set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare exists condition for sqlstate '02000';
+ declare exit handler for exists set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare exit condition for sqlstate '02000';
+ declare exit handler for exit set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare explain condition for sqlstate '02000';
+ declare exit handler for explain set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare false condition for sqlstate '02000';
+ declare exit handler for false set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare fetch condition for sqlstate '02000';
+ declare exit handler for fetch set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float condition for sqlstate '02000';
+ declare exit handler for float set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float4 condition for sqlstate '02000';
+ declare exit handler for add set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float8 condition for sqlstate '02000';
+ declare exit handler for add set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare for condition for sqlstate '02000';
+ declare exit handler for for set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare force condition for sqlstate '02000';
+ declare exit handler for force set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare foreign condition for sqlstate '02000';
+ declare exit handler for foreign set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare from condition for sqlstate '02000';
+ declare exit handler for from set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare fulltext condition for sqlstate '02000';
+ declare exit handler for fulltext set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare grant condition for sqlstate '02000';
+ declare exit handler for grant set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare group condition for sqlstate '02000';
+ declare exit handler for group set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare having condition for sqlstate '02000';
+ declare exit handler for having set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare high_priority condition for sqlstate '02000';
+ declare exit handler for high_priority set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare hour_microsecond condition for sqlstate '02000';
+ declare exit handler for hour_microsecond set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare hour_minute condition for sqlstate '02000';
+ declare exit handler for hour_minute set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare hour_second condition for sqlstate '02000';
+ declare exit handler for hour_second set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare if condition for sqlstate '02000';
+ declare exit handler for if set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare ignore condition for sqlstate '02000';
+ declare exit handler for ignore set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare in condition for sqlstate '02000';
+ declare exit handler for in set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare index condition for sqlstate '02000';
+ declare exit handler for index set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare infile condition for sqlstate '02000';
+ declare exit handler for infile set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare inner condition for sqlstate '02000';
+ declare exit handler for inner set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare inout condition for sqlstate '02000';
+ declare exit handler for inout set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare insensitive condition for sqlstate '02000';
+ declare exit handler for insensitive set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare insert condition for sqlstate '02000';
+ declare exit handler for insert set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int1 condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int2 condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int3 condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int4 condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int8 condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare integer condition for sqlstate '02000';
+ declare exit handler for integer set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare interval condition for sqlstate '02000';
+ declare exit handler for interval set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare into condition for sqlstate '02000';
+ declare exit handler for into set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare is condition for sqlstate '02000';
+ declare exit handler for is set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare iterate condition for sqlstate '02000';
+ declare exit handler for iterate set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare join condition for sqlstate '02000';
+ declare exit handler for join set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare key condition for sqlstate '02000';
+ declare exit handler for key set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare keys condition for sqlstate '02000';
+ declare exit handler for keys set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare kill condition for sqlstate '02000';
+ declare exit handler for kill set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare leading condition for sqlstate '02000';
+ declare exit handler for leading set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare leave condition for sqlstate '02000';
+ declare exit handler for leave set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare left condition for sqlstate '02000';
+ declare exit handler for left set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare like condition for sqlstate '02000';
+ declare exit handler for like set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare limit condition for sqlstate '02000';
+ declare exit handler for limit set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare linear condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare lines condition for sqlstate '02000';
+ declare exit handler for lines set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare load condition for sqlstate '02000';
+ declare exit handler for load set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare localtime condition for sqlstate '02000';
+ declare exit handler for localtime set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare localtimestamp condition for sqlstate '02000';
+ declare exit handler for localtimestamp set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare lock condition for sqlstate '02000';
+ declare exit handler for lock set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare long condition for sqlstate '02000';
+ declare exit handler for long set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare longblob condition for sqlstate '02000';
+ declare exit handler for longblob set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare longtext condition for sqlstate '02000';
+ declare exit handler for longtext set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare loop condition for sqlstate '02000';
+ declare exit handler for loop set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare low_priority condition for sqlstate '02000';
+ declare exit handler for low_priority set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare master_ssl_verify_server_cert condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare match condition for sqlstate '02000';
+ declare exit handler for match set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumblob condition for sqlstate '02000';
+ declare exit handler for mediumblob set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumint condition for sqlstate '02000';
+ declare exit handler for mediumint set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumtext condition for sqlstate '02000';
+ declare exit handler for mediumtext set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare middleint condition for sqlstate '02000';
+ declare exit handler for middleint set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare minute_microsecond condition for sqlstate '02000';
+ declare exit handler for minute_microsecond set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare minute_second condition for sqlstate '02000';
+ declare exit handler for minute_second set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mod condition for sqlstate '02000';
+ declare exit handler for mod set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare modifies condition for sqlstate '02000';
+ declare exit handler for modifies set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare natural condition for sqlstate '02000';
+ declare exit handler for natural set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare not condition for sqlstate '02000';
+ declare exit handler for not set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare no_write_to_binlog condition for sqlstate '02000';
+ declare exit handler for no_write_to_binlog set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare null condition for sqlstate '02000';
+ declare exit handler for null set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric condition for sqlstate '02000';
+ declare exit handler for numeric set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare on condition for sqlstate '02000';
+ declare exit handler for on set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare optimize condition for sqlstate '02000';
+ declare exit handler for optimize set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare option condition for sqlstate '02000';
+ declare exit handler for option set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare optionally condition for sqlstate '02000';
+ declare exit handler for optionally set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare or condition for sqlstate '02000';
+ declare exit handler for or set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare order condition for sqlstate '02000';
+ declare exit handler for order set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare out condition for sqlstate '02000';
+ declare exit handler for out set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare outer condition for sqlstate '02000';
+ declare exit handler for outer set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare outfile condition for sqlstate '02000';
+ declare exit handler for outfile set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare precision condition for sqlstate '02000';
+ declare exit handler for precision set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare primary condition for sqlstate '02000';
+ declare exit handler for primary set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare procedure condition for sqlstate '02000';
+ declare exit handler for procedure set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare purge condition for sqlstate '02000';
+ declare exit handler for purge set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare range condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare read condition for sqlstate '02000';
+ declare exit handler for read set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare reads condition for sqlstate '02000';
+ declare exit handler for reads set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare read_only condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare read_write condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare real condition for sqlstate '02000';
+ declare exit handler for real set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare references condition for sqlstate '02000';
+ declare exit handler for references set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare regexp condition for sqlstate '02000';
+ declare exit handler for regexp set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare release condition for sqlstate '02000';
+ declare exit handler for int set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare rename condition for sqlstate '02000';
+ declare exit handler for rename set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare repeat condition for sqlstate '02000';
+ declare exit handler for repeat set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare replace condition for sqlstate '02000';
+ declare exit handler for replace set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare require condition for sqlstate '02000';
+ declare exit handler for require set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare restrict condition for sqlstate '02000';
+ declare exit handler for restrict set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare return condition for sqlstate '02000';
+ declare exit handler for return set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare revoke condition for sqlstate '02000';
+ declare exit handler for revoke set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare right condition for sqlstate '02000';
+ declare exit handler for right set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare rlike condition for sqlstate '02000';
+ declare exit handler for rlike set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare schema condition for sqlstate '02000';
+ declare exit handler for schema set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare schemas condition for sqlstate '02000';
+ declare exit handler for schemas set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare second_microsecond condition for sqlstate '02000';
+ declare exit handler for second_microsecond set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare select condition for sqlstate '02000';
+ declare exit handler for SELECT set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sensitive condition for sqlstate '02000';
+ declare exit handler for sensitive set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare separator condition for sqlstate '02000';
+ declare exit handler for separator set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare set condition for sqlstate '02000';
+ declare exit handler for set set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare show condition for sqlstate '02000';
+ declare exit handler for show set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare smallint condition for sqlstate '02000';
+ declare exit handler for smallint set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare spatial condition for sqlstate '02000';
+ declare exit handler for spatial set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare specific condition for sqlstate '02000';
+ declare exit handler for specific set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sql condition for sqlstate '02000';
+ declare exit handler for sql set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sqlexception condition for sqlstate '02000';
+ declare exit handler for sqlexception set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sqlstate condition for sqlstate '02000';
+ declare exit handler for sqlstate set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sqlwarning condition for sqlstate '02000';
+ declare exit handler for sqlwarning set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sql_big_result condition for sqlstate '02000';
+ declare exit handler for sql_big_result set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sql_calc_found_rows condition for sqlstate '02000';
+ declare exit handler for sql_calc_found_rows set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sql_small_result condition for sqlstate '02000';
+ declare exit handler for sql_small_result set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare ssl condition for sqlstate '02000';
+ declare exit handler for ssl set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare starting condition for sqlstate '02000';
+ declare exit handler for starting set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare straight_join condition for sqlstate '02000';
+ declare exit handler for straight_join set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare table condition for sqlstate '02000';
+ declare exit handler for table set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare terminated condition for sqlstate '02000';
+ declare exit handler for terminated set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare then condition for sqlstate '02000';
+ declare exit handler for then set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinyblob condition for sqlstate '02000';
+ declare exit handler for tinyblob set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinyint condition for sqlstate '02000';
+ declare exit handler for tinyint set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinytext condition for sqlstate '02000';
+ declare exit handler for tinytext set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare to condition for sqlstate '02000';
+ declare exit handler for to set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare trailing condition for sqlstate '02000';
+ declare exit handler for trailing set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare trigger condition for sqlstate '02000';
+ declare exit handler for trigger set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare true condition for sqlstate '02000';
+ declare exit handler for true set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare undo condition for sqlstate '02000';
+ declare exit handler for undo set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare union condition for sqlstate '02000';
+ declare exit handler for union set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare unique condition for sqlstate '02000';
+ declare exit handler for unique set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare unlock condition for sqlstate '02000';
+ declare exit handler for unlock set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare unsigned condition for sqlstate '02000';
+ declare exit handler for unsigned set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare update condition for sqlstate '02000';
+ declare exit handler for update set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare usage condition for sqlstate '02000';
+ declare exit handler for usage set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare use condition for sqlstate '02000';
+ declare exit handler for USE set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare using condition for sqlstate '02000';
+ declare exit handler for using set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare utc_date condition for sqlstate '02000';
+ declare exit handler for utc_date set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare utc_time condition for sqlstate '02000';
+ declare exit handler for utc_time set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare utc_timestamp condition for sqlstate '02000';
+ declare exit handler for utc_timestamp set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare values condition for sqlstate '02000';
+ declare exit handler for values set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare varbinary condition for sqlstate '02000';
+ declare exit handler for varbinary set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare varchar condition for sqlstate '02000';
+ declare exit handler for varchar set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare varcharacter condition for sqlstate '02000';
+ declare exit handler for varcharacter set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare varying condition for sqlstate '02000';
+ declare exit handler for varying set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare when condition for sqlstate '02000';
+ declare exit handler for when set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare where condition for sqlstate '02000';
+ declare exit handler for where set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare while condition for sqlstate '02000';
+ declare exit handler for while set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare with condition for sqlstate '02000';
+ declare exit handler for with set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare write condition for sqlstate '02000';
+ declare exit handler for write set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare xor condition for sqlstate '02000';
+ declare exit handler for xor set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare year_month condition for sqlstate '02000';
+ declare exit handler for year_month set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare zerofill condition for sqlstate '02000';
+ declare exit handler for zerofill set @var2 = 1;
+END//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase :
+ ----------
+Ensure that every possible type of handler may be declared for
+a stored procedure (continue- handler_type ).;
+--source include/show_msg80.inc
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '23000' set @x2 = 1;
+
+ set @x = 1;
+
+ insert into t2(f1) values (1);
+
+ set @x = 2;
+
+ insert into t2(f1) values (1);
+
+ set @x = 3;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+
+DROP PROCEDURE sp1;
+
+
+# testcase: ensure that every possible type of handler may be declared
+# for a stored procedure (undo - handler_type ).
+# ?????????? undo handler not supported as of now
+
+
+DROP PROCEDURE IF EXISTS handler1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE handler1()
+BEGIN
+ declare undo handler for sqlstate '23000' set @x2 = 1;
+
+ set @x = 1;
+
+ insert into t values (1);
+
+ set @x = 2;
+
+ insert into t values (1);
+
+ set @x = 3;
+END//
+delimiter ;//
+
+# testcase: ensure that invalid handler declarations are rejected with an
+# appropriate error message. (continue- handler_type).
+
+
+DROP PROCEDURE IF EXISTS handler1;
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE handler1()
+BEGIN
+ declare continueinv handler for sqlstate '2300' set @x2 = 1;
+
+ set @x = 1;
+
+ insert into t values (1);
+
+ set @x = 2;
+
+ insert into t values (1);
+
+ set @x = 3;
+END//
+delimiter ;//
+
+# testcase: ensure that invalid handler declarations are rejected with
+# an appropriate error message (undo - handler_type ).
+
+
+DROP PROCEDURE IF EXISTS handler1;
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE handler1()
+BEGIN
+ declare undoinv handler for sqlstate '2300' set @x2 = 1;
+
+ set @x = 1;
+
+ insert into t values (1);
+
+ set @x = 2;
+
+ insert into t values (1);
+
+ set @x = 3;
+END//
+delimiter ;//
+
+# testcase: ensure that invalid handler declarations are rejected with an
+# appropriate error message (exit- handler_type )
+
+
+DROP PROCEDURE IF EXISTS handler1;
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE handler1 ()
+BEGIN
+ declare exitinv handler for sqlstate '2300' set @x2 = 1;
+
+ set @x = 1;
+
+ insert into t values (1);
+
+ set @x = 2;
+
+ insert into t values (1);
+
+ set @x = 3;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare accessible handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare add handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare all handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare alter handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare analyze handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare and handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare as handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare asc handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare asensitive handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare before handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare between handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare bigint handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare binary handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare blob handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare both handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare by handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare call handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare cascade handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare case handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare change handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare char handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare character handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare check handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare collate handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare column handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare condition handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare constraint handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+--error ER_PARSE_ERROR
+delimiter //;
+CREATE PROCEDURE sp1( )
+ BEGIN
+ declare continue handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare convert handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare create handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare cross handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare current_date handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare current_time handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare current_timestamp handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare current_user handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare cursor handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare database handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare databases handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare day_hour handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare day_microsecond handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare day_minute handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare day_second handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare dec handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare decimal handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare declare handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare default handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare delayed handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare delete handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare desc handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare describe handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare deterministic handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare distinct handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare distinctrow handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare div handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare double handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare drop handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare dual handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare each handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare else handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare elseif handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare enclosed handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare escaped handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare exists handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+--error ER_PARSE_ERROR
+delimiter //;
+CREATE PROCEDURE sp1( )
+ BEGIN
+ declare exit handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare explain handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare false handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare fetch handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float4 handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare float8 handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare for handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare force handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare foreign handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare from handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare fulltext handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare grant handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare group handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare having handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare high_priority handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare hour_microsecond handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare hour_minute handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare hour_second handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare if handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare ignore handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare in handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare index handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare infile handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare inner handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare inout handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare insensitive handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare insert handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int1 handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int2 handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int3 handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int4 handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare int8 handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare integer handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare interval handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare into handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare is handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare iterate handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare join handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare key handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare keys handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare kill handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare leading handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare leave handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare left handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare like handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare limit handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare linear handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare lines handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare load handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare localtime handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare localtimestamp handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare lock handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare long handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare longblob handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare longtext handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare loop handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare low_priority handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare match handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumblob handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumint handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mediumtext handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare middleint handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare minute_microsecond handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare minute_second handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare mod handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare modifies handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare natural handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare not handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare no_write_to_binlog handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare null handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare numeric handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare on handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare optimize handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare option handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare optionally handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare or handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare order handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare out handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare outer handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare outfile handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare precision handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare primary handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare privileges handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare procedure handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare purge handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare range handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare read handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare reads handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare read_only handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare read_write handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare real handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare references handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare regexp handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare release handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare rename handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare repeat handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare replace handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare require handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare restrict handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare return handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare revoke handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare right handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare rlike handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare schema handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare schemas handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare second_microsecond handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare select handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sensitive handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare separator handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare set handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare show handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare smallint handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare spatial handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare specific handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sql handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sqlexception handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sqlstate handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sqlwarning handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sql_big_result handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sql_calc_found_rows handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare sql_small_result handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare ssl handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare starting handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare straight_join handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare table handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare terminated handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare then handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinyblob handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinyint handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare tinytext handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare to handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare trailing handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare trigger handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare true handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare undo handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare union handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare unique handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare unlock handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare unsigned handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare update handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare usage handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare use handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare using handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare utc_date handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare utc_time handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare utc_timestamp handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare values handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare varbinary handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare varchar handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare varcharacter handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare varying handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare when handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare where handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare while handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare with handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare write handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare xor handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare year_month handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare zerofill handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+
+# ==============================================================================
+#
+# test plan section: 4.2 - syntax checks for programming statements - 2
+#
+# ==============================================================================
+
+
+USE db_storedproc;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.26:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the scope of every variable, cursor, condition and handler
+# declared for a stored procedure (with the declare statement) is properly applied.
+
+
+set @v1='0';
+set @v2='0';
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x char;
+ declare y char;
+ declare cond1 condition for sqlstate '42000';
+ declare cur1 cursor for SELECT f1 from t2 limit 1;
+ declare continue handler for cond1 set @x = 4;
+ set @x = '1';
+ set @y = '2';
+ BEGIN
+ declare x char;
+ declare y char;
+ declare cur1 cursor for SELECT f1 from t2 limit 2, 1;
+ declare continue handler for sqlstate '42000' set @x = 3;
+ open cur1;
+ fetch cur1 into y;
+ close cur1;
+ CALL nonsexist();
+ SELECT x, y, @x;
+ END;
+ open cur1;
+ fetch cur1 into y;
+ close cur1;
+ CALL nonsexist();
+ set @v1 = @x;
+ set @v2 = y;
+END//
+delimiter ;//
+
+CALL sp1();
+ SELECT @v1, @v2;
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.28:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the set statement can assign a value to every local variable
+# declared within a stored procedures definition, as well as to every
+# appropriate global server variable.
+
+SET @x = 0;
+SET @y = 0;
+DROP PROCEDURE IF EXISTS sp1;
+
+SET @start_global_value = @@GLOBAL.sort_buffer_size;
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '42000' SET @x2 = 1;
+ SET SESSION SORT_BUFFER_SIZE = 10 * 1024 * 1024;
+ SELECT @@sort_buffer_size;
+ SET @x = 4;
+ SET @y = 3;
+ SET GLOBAL SORT_BUFFER_SIZE = 2 * 1024 * 1024;
+ SELECT @@sort_buffer_size;
+ SET @@sort_buffer_size = 10 * 1024 * 1024;
+ SELECT @@sort_buffer_size;
+END//
+delimiter ;//
+CALL sp1();
+SELECT @x, @y;
+SET @@GLOBAL.sort_buffer_size = @start_global_value;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.29:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the set statement can assign values to variables either
+# separately or multiple variables in a list.
+
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx char default 'x';
+ declare xy char default 'y';
+ declare xz char default 'z';
+ set @xx = xx, @xy = xy;
+ set @xz = xz;
+ SELECT @xx, @xy, @xz;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.30:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the set statement may assign only those values to a variable
+# that are appropriate for that variables data type definition
+
+# integer data_type.
+
+ set @xx=0;
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx int;
+ set xx = 'asd';
+ set @xx = xx;
+ SELECT @xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx int;
+ set xx = 5;
+ set @xx = xx;
+ SELECT @xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.31 - a:;
+--source include/show_msg80.inc
+
+# character data_type
+
+ set @xx=0;
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx char;
+ set xx = 'temp';
+ set @xx = xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+ SELECT @xx;
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.31 - b:;
+--source include/show_msg80.inc
+
+# float data_type
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx float;
+ set xx = 'asd';
+ SELECT xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx float;
+ set xx = 1.6;
+ SELECT xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.31 - c:;
+--source include/show_msg80.inc
+
+# datetime data_type
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx datetime;
+ set xx = 'asd';
+ SELECT xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx datetime;
+ set xx = '2006-06-06 01:01:01';
+ SELECT xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.31 - d:;
+--source include/show_msg80.inc
+
+# varchar data_type
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx varchar(20);
+ set xx = "abcdefghijk";
+ SELECT xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.31 - e:;
+--source include/show_msg80.inc
+
+# tinyint
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx tinyint;
+ set xx = 'asd';
+ SELECT xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare xx tinyint;
+ set xx = -125;
+ SELECT xx;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.37:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the SELECT into statement that retrieves column values
+# with inappropriate data types for the matching variables in its variable
+# list is rejected, with an appropriate error message.
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare x integer; declare y integer;
+ SELECT sal, f2 into x, y from t2 limit 1;
+ set @x=x; set @y=y;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x char ascii;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x tinytext;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x text;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x mediumtext;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x longtext;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x tinyblob;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x blob;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x mediumblob;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x longblob;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x binary;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+--disable_warnings
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x tinyint;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x tinyint unsigned;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x tinyint zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x tinyint unsigned zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x smallint;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x smallint unsigned;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x smallint zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x smallint unsigned zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x mediumint;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x mediumint unsigned;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x mediumint zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x mediumint unsigned zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x int;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x int unsigned;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x int zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x int unsigned zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x bigint;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x bigint unsigned;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x bigint zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x bigint unsigned zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x decimal;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x decimal unsigned;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x decimal zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x decimal unsigned zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x numeric;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x numeric unsigned;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x numeric zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x numeric unsigned zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x real;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x real unsigned;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x real zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x real unsigned zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x float;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x float unsigned;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x float zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x float unsigned zerofill;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x date;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x time;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x datetime;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x timestamp;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x year;
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x year(3);
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x year(4);
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x enum("1enum", "2enum");
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare x set("1set", "2set");
+ SELECT f1 into x from t2 limit 1;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.38:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the declare condition for statement can declare a properly
+# named condition for every possible sqlstate and mysql-specific error code.
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare notable condition for sqlstate '42S02';
+ declare continue handler for notable set @x2=1;
+ set @x = 1;
+ insert into t2(f1) values (1);
+ set @x = 2;
+ insert into t2(f1) values (1);
+ set @x = 3;
+END//
+delimiter ;//
+
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.39:;
+--source include/show_msg80.inc
+
+# testcase: ensure that no two conditions declared with the same scope may have the
+# same condition name (same condition name in same scope)
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_SP_DUP_COND
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '42000';
+ declare cond1 condition for sqlstate '23000';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values(1);
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.41:;
+--source include/show_msg80.inc
+
+# testcase: ensure that every sqlstate value declared with a declare condition for
+# statement is a character string that is 5 character.
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '1';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '12';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '123';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '1234';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '123456';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.42:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the declare condition for statement cannot declare a
+# condition for an invalid sqlstate.
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate 'abcdefghi';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '42000test';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '00000@#$%^&';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate 'null';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate ' ';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate 1234567890;
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '2005-03-03';
+ declare continue handler for cond1 set @var2 = 1;
+ insert into tnull values( 1);
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.43:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the declare condition for statement cannot declare a
+# condition for the successful completion sqlstate: 00000.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+--echo expect failure, SQLSTATE 00000 is not an acceptable value
+--echo for an SP's handler
+delimiter //;
+--ERROR ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare cond1 condition for sqlstate '00000';
+ declare continue handler for cond1 set @var2 = 1;
+ set @x=1;
+ SELECT @var2;
+END//
+delimiter ;//
+
+--echo ensure SP doesn't exist
+--ERROR ER_SP_DOES_NOT_EXIST
+CALL sp1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.45:;
+--source include/show_msg80.inc
+
+# testcase: ensure that within the same scope, no two handlers may be declared for the same condition.
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_DUP_HANDLER
+CREATE PROCEDURE handler1 ()
+BEGIN
+ declare continue handler for sqlstate '23000' set @varr1 = 5;
+ declare continue handler for sqlstate '23000' set @varr3 = 7;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS handler1;
+
+delimiter //;
+--error ER_SP_DUP_HANDLER
+CREATE PROCEDURE handler1 ()
+BEGIN
+ declare mycondition condition for sqlstate '23000';
+ declare continue handler for mycondition set @varr3 = 7;
+ declare continue handler for sqlstate '23000' set @varr3 = 7;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.46:;
+--source include/show_msg80.inc
+
+# testcase: ensure that every sqlstate value declared with a declare handler for
+# statement is a character string that is 5 characters long.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '1' set @var2 = 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '12' set @var2 = 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '123' set @var2 = 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '1234' set @var2 = 1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '123456' set @var2 = 1;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.47:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the declare handler for statement cannot declare a condition
+# for an invalid sqlstate.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '42s0200test' set @var2 = 1;
+ insert into tnull values( 1);
+ SELECT @var2;
+END//
+delimiter ;//
+
+# cleanup
+#drop table IF EXISTS tnull;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.48:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the declare handler for statement cannot declare a condition
+# for the successful completion sqlstate: 00000.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+--echo This creation should fail, SQLSTATE 00000 is unacceptable
+--ERROR ER_SP_BAD_SQLSTATE
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare continue handler for sqlstate '00000' set @var2 = 1;
+ set @x=1;
+ SELECT @var2;
+END//
+delimiter ;//
+
+--echo Verify SP wasn't created
+--ERROR ER_SP_DOES_NOT_EXIST
+CALL sp1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTSsp1;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.52:;
+--source include/show_msg80.inc
+
+# testcase: ensure that no two cursors in a stored procedure can have the same name.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_DUP_CURS
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+ declare cur1 cursor for SELECT f1, f2 from t2;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur1;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newlf1, newf3, newsal;
+ set count = count - 1;
+ END while;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.53:;
+--source include/show_msg80.inc
+
+# testcase: ensure that a cursor declaration may not include a SELECT into statement.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_BAD_CURSOR_SELECT
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, lf1, f3, f4 into @w, @x, @y, @z from t2;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur1;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newlf1, newf3, newsal;
+ set count = count - 1;
+ END while;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.54:;
+--source include/show_msg80.inc
+
+# testcase: ensure that a cursor declaration that includes an order by
+# claUSE may not be an updateable cursor.
+
+#FIXME: testcase empty / missing
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.55:;
+--source include/show_msg80.inc
+
+# testcase: ensure that open <cursor name> fails unless a cursor with
+# the same name has already been declared.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_CURSOR_MISMATCH
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur1;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ set count = count - 1;
+ END while;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 0;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur1;
+ BEGIN
+ open cur1;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf3, newf4;
+ set count = count - 1;
+ END while;
+ END;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_ALREADY_OPEN
+CALL sp1();
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.56:;
+--source include/show_msg80.inc
+
+# testcase: ensure that open <cursor name> fails if the same cursor is currently already open.
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur1;
+ open cur1;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ set count = count - 1;
+ END while;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_ALREADY_OPEN
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.57:;
+--source include/show_msg80.inc
+
+# testcase: ensure that fetch <cursor name> fails unless a cursor with the same name is already open.
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2;
+ declare cur2 cursor for SELECT f1, f2 from t2;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur2;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ set count = count - 1;
+ END while;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_NOT_OPEN
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.59:;
+--source include/show_msg80.inc
+
+# testcase: ensure that fetch <cursor name> fails with an appropriate error message
+# if it is executed before the cursor has been opened.
+
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ set count = count - 1;
+ END while;
+ open cur1;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_NOT_OPEN
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 10;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+ declare continue handler for sqlstate '02000' set done = 1;
+ open cur1;
+ BEGIN
+ declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf3, newf4;
+ set count = count - 1;
+ END while;
+ open cur1;
+ close cur1;
+ END;
+ close cur1;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_NOT_OPEN
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.60:;
+--source include/show_msg80.inc
+
+# testcase: ensure that fetch <cursor name> fails with an appropriate error message
+# if it is executed after the cursor has been closed.
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur1;
+ close cur1;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ set count = count - 1;
+ END while;
+ END;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_NOT_OPEN
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+ declare continue handler for sqlstate '02000' set done = 1;
+ open cur1;
+ close cur1;
+ BEGIN
+ declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+ open cur1;
+ END;
+ fetch cur1 into newf1, newf2, newf3, newf4;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_NOT_OPEN
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.62:;
+--source include/show_msg80.inc
+
+# testcase: ensure that fetch <cursor name> fails with an appropriate error message
+# if the data type of the column values being fetched are not appropriate
+# for the matching fetch variables to which the data is being assigned.
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf2 char(20);
+ declare newf1 int1;
+ declare cur1 cursor for SELECT f1, f3 from t2 limit 20, 10;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur1;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2;
+ set @x = newf1;
+ set @y = newf2;
+ SELECT @x, @y;
+ set count = count - 1;
+ END while;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+#This test seems to make no sense, as always NULL may be set.
+#--error ER_SP_CURSOR_NOT_OPEN
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.63:;
+--source include/show_msg80.inc
+
+# testcase: ensure that close <cursor name> fails unless a cursor with the same name is already open.
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ close cur1;
+ open cur1;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ set count = count - 1;
+ END while;
+ close cur1;
+ END;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_NOT_OPEN
+CALL sp1();
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 0;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
+ open cur1;
+ END;
+ close cur1;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_NOT_OPEN
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.64:;
+--source include/show_msg80.inc
+
+# testcase: ensure that all cursors are closed when a transaction terminates with a commit statement.
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+ BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+ BEGIN
+ open cur1;
+ start transaction;
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ commit;
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ END;
+END//
+delimiter ;//
+
+--error ER_SP_FETCH_NO_DATA
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.65:;
+--source include/show_msg80.inc
+
+# testcase: ensure that all cursors are closed when a transaction terminates with a rollback statement.
+
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+ BEGIN
+ open cur1;
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ rollback;
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ commit;
+ END;
+END//
+delimiter ;//
+
+--error ER_SP_FETCH_NO_DATA
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.66:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the result set of the cursor that has been closed is not
+# longer available to the fetch statement.
+
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur1;
+ set count = count - 1;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ set count = count - 1;
+ END while;
+ close cur1;
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ END;
+END//
+delimiter ;//
+
+--error ER_SP_CURSOR_NOT_OPEN
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.67:;
+--source include/show_msg80.inc
+
+# testcase: ensure that cursor declared within a compound statement is closed when
+# that compound statement ends (without cursor close statement)
+
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
+ declare continue handler for sqlstate '02000' set done = 1;
+ BEGIN
+ open cur1;
+# set count = count - 1;
+# while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf3;
+# set count = count - 1;
+# END while;
+ END;
+ fetch cur1 into newf1, newf2, newf4, newf3;
+END//
+delimiter ;//
+
+#--error ER_SP_FETCH_NO_DATA
+CALL sp1();
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.2.70:;
+--source include/show_msg80.inc
+
+# testcase: ensure that multiple cursors, nested within multiple compound statements
+# within a stored procedure always act correctly and return the expected result.
+
+ create table temp1( f1 char(20), f2 char(20), f3 int, f4 char(20) );
+ create table temp2( f1 char(20), f2 char(20), f3 int, f4 char(20) );
+
+DROP PROCEDURE IF EXISTS sp1;
+
+delimiter //;
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare done int default 0;
+ declare count integer default 20;
+ declare newf1 char(20);
+ declare newf2 char(20);
+ declare newf3 char(20);
+ declare newf4 integer;
+ declare newf21 char(20);
+ declare newf22 char(20);
+ declare newf23 char(20);
+ declare newf24 integer;
+ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 7, 1;
+ declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 15, 1;
+ declare continue handler for sqlstate '02000' set done = 1;
+ open cur1;
+ BEGIN
+ set count = 10;
+ BEGIN
+ open cur2;
+ while count > 0 do
+ fetch cur1 into newf1, newf2, newf4, newf3;
+ set count = count - 1;
+ END while;
+ END;
+ insert into temp1 values(newf1, newf2, newf4, newf3);
+ close cur1;
+ END;
+ BEGIN
+ set count = 10;
+ while count > 0 do
+ fetch cur2 into newf21, newf22, newf24, newf23;
+ set count = count - 1;
+ END while;
+ END;
+ insert into temp2 values(newf21, newf22, newf24, newf23);
+ close cur2;
+END//
+delimiter ;//
+
+CALL sp1();
+
+SELECT count(*) from temp1;
+SELECT * from temp2;
+
+# cleanup
+DROP PROCEDURE sp1;
+drop table temp1;
+drop table temp2;
+
+
+# ==============================================================================
+let $message= Section 3.1.3 - Syntax checks for the stored procedure-specific flow control statements
+ . IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:;
+--source include/show_msg80.inc
+
+USE db_storedproc;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.1:;
+--source include/show_msg80.inc
+
+# testcase : ensure that all clauses that should be supported are supported
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+--enable_warnings
+
+#FIXME: change back to $engine_type for INNODB and MYISAM, but MEMORY doesn't support this
+--replace_result $engine_type <engine_to_be_tested>
+eval
+CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742(
+ middleinitial CHAR, lastname VARCHAR(50),
+ age_averylongfieldname_averylongname_1234569 INT, COMMENT VARCHAR(100))
+ENGINE=$engine_type;
+
+INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
+VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default');
+
+delimiter //;
+CREATE PROCEDURE sp1(a INT)
+BEGIN
+ DECLARE itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx CHAR;
+ DECLARE itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx VARCHAR(100);
+ DECLARE itisjustamediumsizeintintegervariablename INTEGER;
+ SET itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b';
+ SET itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx
+ = 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%';
+ SET itisjustamediumsizeintintegervariablename = 5;
+ SET @comment='a';
+ label1: LOOP
+ IF a > 100 THEN
+ SET @comment = 'value of a is greater than 100';
+ ELSEIF a < 100 THEN
+ IF a < 50 THEN
+ SET @comment = 'value of a is less than 50';
+ ELSEIF a < 25 THEN
+ SET @comment = 'value of a is less than 25';
+ ELSE
+ SET @comment = 'value of a is greater than 50 and less than 100';
+ END IF;
+ ELSE
+ SET @comment = 'value of a is 100';
+ END IF;
+
+ IF itisjustamediumsizeintintegervariablename = 0 THEN LEAVE label1;
+ END IF;
+ INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
+ VALUES(itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx,
+ CONCAT(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx,
+ ' ', a), a, @comment);
+ SET itisjustamediumsizeintintegervariablename
+ = itisjustamediumsizeintintegervariablename - 1;
+ ITERATE label1;
+ END LOOP label1;
+END//
+delimiter ;//
+
+CALL sp1(101);
+
+CALL sp1(100);
+
+CALL sp1(75);
+
+CALL sp1(40);
+
+CALL sp1(20);
+
+CALL sp1(-1);
+
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742
+ ORDER BY middleinitial, lastname, age_averylongfieldname_averylongname_1234569;
+
+# cleanup
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.2:;
+--source include/show_msg80.inc
+
+# testcase: ensure that all clauses that should be supported are supported (case, while, repeat)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp2;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp2( action char(20) )
+BEGIN
+ declare v1 char(20);
+ declare v2 char(20);
+ declare count integer;
+ set v1 = 'f1';
+ set v2 = 'address';
+ set count = 1;
+ case when action = 'delete' then
+ insert into t3 values(v1, v2, count);
+ delete from t3 where f1=v1;
+ when action = 'insert' then
+ repeat
+ insert into t3 values(v1, v2, count);
+ set count = count + 1;
+ until count > 5
+ END repeat;
+ set count = 1;
+ label1: repeat
+ insert into t3 values(v1, v2, count);
+ if count > 5 then leave label1;
+ END if;
+ set count = count + 1;
+ until count > 5
+ END repeat;
+ set count = 1;
+ while count < 5 do
+ insert into t3 values(v1, v2, count);
+ set count = count + 1;
+ END while;
+ set count = 1;
+ label1: while count < 5 do
+ insert into t3 values(v1, v2, count);
+ if count > 5 then leave label1;
+ END if;
+ set count = count + 1;
+ END while;
+ else
+ set @dummystring = 'temp value';
+ END case;
+END//
+delimiter ;//
+
+CALL sp2( 'insert' );
+--sorted_result
+SELECT * from t3 where f3 <=5 && f3 >= 0;
+
+SELECT count(*) from t3;
+CALL sp2( 'delete' );
+SELECT count(*) from t3;
+
+CALL sp2 ('test');
+SELECT @dummystring;
+
+# cleanup
+DROP PROCEDURE sp2;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.1.2:
+ ---------------
+Ensure that all sub-clauses that should not be supported are disallowed with
+an appropriate error message. (case);
+--source include/show_msg80.inc
+
+
+--disable_warnings
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp3;
+--enable_warnings
+
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742 (name char, address varchar(50), age_averylongfieldname_averylongname_1234569 smallint);
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+label1: case
+ when action = 'delete' then
+ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+else
+ set @dummystring = 'temp value';
+ iterate label1;
+END case label1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp3;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+label1: BEGIN
+ case
+ action = 'delete' then
+ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+ else
+ set @dummystring = 'temp value';
+ iterate label1;
+ END case;
+ END label1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp3;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+case
+ when action = 'delete' then
+ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+ then action = 'truncate' when
+ truncate from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+ else
+ set @dummystring = 'temp value';
+ iterate label1;
+ END case;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp3;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+declare v1 char(20);
+declare v2 char(20);
+declare count integer;
+set v1 = 'f1';
+set v2= 'address';
+set count = 1;
+case action
+ when 'delete' then
+ when 'delete' then
+ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+ END case;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp3;
+--enable_warnings
+
+
+delimiter //;
+CREATE PROCEDURE sp3( action char(20) )
+BEGIN
+ declare count int default 1;
+ declare done int default 0;
+ declare continue handler for sqlstate 'HY000' set done=1;
+ label1: loop
+ case
+ when action = 'delete' then
+ label3:BEGIN
+ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+ END label3;
+ when action = 'insert' then
+ label2: while count < 10 do
+ BEGIN
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742
+ values('xxxxxxxxxxxxxxxxxxx', '1231230981(*&(*&)(*&(', count);
+ set count = count + 1;
+ if count= 10 then
+ set done=1;
+ END if;
+ END;
+ END while label2;
+ else
+ set @dummystring = 'temp value';
+ iterate label1;
+ END case;
+ if done=1 then
+ leave label1;
+ END if;
+ END loop label1;
+ SELECT count, done;
+END//
+delimiter ;//
+
+CALL sp3('insert');
+
+# cleanup
+DROP PROCEDURE sp3;
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.4:;
+--source include/show_msg80.inc
+
+# testcase: ensure that all supported sub-clauses are supported only in the correct order (if)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp4()
+BEGIN
+declare count int;
+ set count = 1;
+ label1: loop
+ if count > 10 then leave label1;
+ else
+ set count = count + 1;
+ elseif count > 20 then
+ leave label1;
+ END if;
+ iterate label1;
+ END loop label1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp4()
+BEGIN
+declare count int;
+ set count = 1;
+ label1: loop
+ else
+ set count = count + 1;
+ if count > 20 then
+ leave label1;
+ END if;
+ iterate label1;
+ END loop label1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp4()
+BEGIN
+declare count int;
+ set count = 1;
+ label1: loop
+ elseif count > 20 then
+ leave label1;
+ else
+ set count=count+1;
+ END if;
+ iterate label1;
+ END loop label1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp4()
+BEGIN
+declare count int;
+ set count = 1;
+ label1: loop
+ END if;
+ if count > 20 then
+ leave label1;
+ else
+ set count=count+1;
+ iterate label1;
+ END loop label1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp4()
+BEGIN
+ declare i int default 10;
+ if i > 20 then
+ set i=25;
+ END if
+ declare count int;
+ set count = 1;
+ label1: loop
+ if count > 20 then
+ leave label1;
+ else
+ set count=count+1;
+ iterate label1;
+ END loop label1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp4()
+BEGIN
+ declare idummy int default 10;
+ declare count int;
+ set count = 1;
+ label1: loop
+ BEGIN
+ if count < 20 then
+ BEGIN
+ declare idummy2 int default 10;
+ set count=count+1;
+ END;
+ else
+ BEGIN
+ SELECT idummy2;
+ leave label1;
+ END;
+ END if;
+ iterate label1;
+ END;
+ END loop label1;
+END//
+delimiter ;//
+
+--error ER_BAD_FIELD_ERROR
+CALL sp4();
+
+# cleanup
+DROP PROCEDURE sp4;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.5:;
+--source include/show_msg80.inc
+
+#test case: ensure that all supported sub-clauses are supported only in the correct order (case)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp5;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp5()
+BEGIN
+ declare count integer default 1;
+ set count = 1;
+ case
+ else
+ set count = 10;
+ when count = 1 then
+ set count = count + 1;
+ END case;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp5;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp5(count int)
+BEGIN
+ when case count = 1 then
+ set count = 10;
+ when count = 2 then
+ set count = count + 1;
+ END case;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp5;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp5(count int)
+BEGIN
+ END case;
+ when count = 1 then
+ set count = 10;
+ when count = 2 then
+ set count = count + 1;
+ END case;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp5;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp5(count int)
+BEGIN
+ when count = 1 then
+ set count = 10;
+ case when count = 2 then
+ set count = count + 1;
+ END case;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.6:
+ ---------------
+Ensure that all supported sub-clauses are supported only in the correct order (repeat).;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6()
+BEGIN
+ declare count1 integer default 1;
+ label1: repeat
+ set count1 = count1 + 1;
+ if count1 > 5 then leave label1; END if;
+ END repeat;
+ until count1 > 5
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6()
+BEGIN
+ declare count1 integer default 1;
+ label1: until count1 > 5
+ repeat
+ set count1 = count1 + 1;
+ if count1 > 5 then leave label1; END if;
+ END repeat;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6()
+BEGIN
+ declare count1 integer default 1;
+ label1: END repeat
+ set count1 = count1 + 1;
+ if count1 > 5 then leave label1; END if;
+ until count1 > 5
+ repeat;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6()
+BEGIN
+ declare count1 integer default 1;
+ label1: repeat
+ set count1 = count1 + 1;
+ if count1 > 5 then leave label1; END if;
+ END repeat;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp6()
+BEGIN
+ declare count1 integer default 1;
+ label1: repeat
+ set count1 = count1 + 1;
+ if count1 > 5 then leave label1; END if;
+ until count1 > 10;
+ SELECT count1;
+ END repeat;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6()
+BEGIN
+ declare count1 integer default 1;
+ label1: repeat
+ set count1 = count1-1;
+ until count1 < 0
+ END repeat label1;
+ SELECT count1;
+END//
+delimiter ;//
+
+CALL sp6();
+
+# cleanup
+DROP PROCEDURE sp6;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.7:;
+--source include/show_msg80.inc
+
+# testcase: ensure that an appropriate error message is returned if a
+# sub claUSE is out-of-order in a stored procedure definition (loop, if, iterate, leave).
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp7;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp7()
+BEGIN
+ DECLARE count INT DEFAULT 100;
+ label1: loop
+ set @dummystring = 'temp value';
+ if count > 10 then leave label1;
+ END if;
+ label1 iterate;
+ END label1 loop;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp7;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp7()
+BEGIN
+ label1: END loop;
+ set @dummystring = 'temp value';
+ if count > 10 then leave label1;
+ END if;
+ iterate label1;
+ loop;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp7;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp7()
+BEGIN
+ label1: iterate label1;
+ loop
+ set @dummystring = 'temp value';
+ if count > 10 then leave label1;
+ END if;
+
+ END loop label1;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.8:;
+--source include/show_msg80.inc
+
+# testcase: ensure that an appropriate error message is returned if a sub claUSE is
+# out-of-order in a stored procedure definition. (while)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp8;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp8()
+BEGIN
+ declare v1 int default 5;
+ do while v1 > 0
+ set v1 = v1 - 1;
+ END while;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp8;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp8()
+BEGIN
+ declare v1 int default 5;
+ do v1 > 0 while
+ set v1 = v1 - 1;
+ END while;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp8;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp8()
+BEGIN
+ declare v1 int default 5;
+ END while;
+ set v1 = v1 - 1;
+ while v1 > 0 do;
+END//
+delimiter ;//
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.12:;
+--source include/show_msg80.inc
+
+# testcase : ensure that the labels enclosing each loop statement must match
+
+--disable_warnings
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp12;
+--enable_warnings
+
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+
+delimiter //;
+--error ER_SP_LABEL_MISMATCH
+CREATE PROCEDURE sp12( )
+BEGIN
+ declare count1 integer default 1;
+ declare count2 int;
+ label1: loop
+ if count1 > 2 then leave label1;
+ END if;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ label2: loop
+ if count2 > 2 then leave label2;
+ END if;
+ set count2 = count2 + 1;
+ END loop label1;
+ set count1 = count1 + 1;
+ iterate label1;
+ END loop label2;
+END//
+delimiter ;//
+
+# cleanup
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.13:;
+--source include/show_msg80.inc
+
+# ensure that it is possible to put a beginning label at the start of a loop statement
+# without also requiring an ending label at the END of the same statement
+
+--disable_warnings
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp13;
+--enable_warnings
+
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+
+delimiter //;
+CREATE PROCEDURE sp13( )
+BEGIN
+ declare count1 integer default 1;
+ lable1: loop
+ if count1 > 2 then leave lable1;
+ END if;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ set count1 = count1 + 1;
+ iterate lable1;
+ END loop;
+END//
+delimiter ;//
+
+CALL sp13();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+# cleanup
+DROP PROCEDURE sp13;
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.14:;
+--source include/show_msg80.inc
+
+# testcase: ensure that it is not possible to put an ending label at the END of a loop statement
+# without also requiring a matching beginning label at the start of the same statement.
+
+--disable_warnings
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp14;
+--enable_warnings
+
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+
+delimiter //;
+--error ER_SP_LILABEL_MISMATCH
+CREATE PROCEDURE sp14( )
+BEGIN
+ declare count1 integer default 1;
+ loop
+ if count1 > 2 then leave lable1;
+ END if;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ set count1 = count1 + 1;
+ iterate lable1;
+ END loop label1;
+END//
+delimiter ;//
+
+# cleanup
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.15:;
+--source include/show_msg80.inc
+
+# ensure that every beginning label must END with a colon (:)
+
+--disable_warnings
+drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
+DROP PROCEDURE IF EXISTS sp15;
+--enable_warnings
+
+create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp15( )
+BEGIN
+ declare count1 integer default 1;
+ label1 loop
+ if count1 > 2 then leave lable1;
+ END if;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ set count1 = count1 + 1;
+ iterate lable1;
+ END loop label1;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.16:
+ ----------------
+Ensure that every beginning label with the same scope must be unique.;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp16;
+--enable_warnings
+
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+delimiter //;
+--error ER_SP_LABEL_REDEFINE
+CREATE PROCEDURE sp16( )
+BEGIN
+ declare count1 integer default 1;
+ declare count2 integer default 1;
+ label1: repeat
+ set count1 = count1 + 1;
+ set count2 = 1;
+ label1: repeat
+ set count2 = count2 + 1;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( xyz , pqr, count1);
+ until count2 > 3
+ END repeat label1;
+ until count1 > 3
+ END repeat label1;
+END//
+delimiter ;//
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp16;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_LABEL_REDEFINE
+CREATE PROCEDURE sp16( )
+BEGIN
+ declare count1 integer default 1;
+ declare count2 integer default 1;
+ declare count3 integer default 1;
+ label1: repeat
+ set count1 = count1 + 1;
+ label1: repeat
+ set count2 = count2 + 1;
+ SELECT count2;
+ until count2 > 3
+ END repeat label1;
+ SELECT count1;
+ until count1 > 3
+ END repeat label1;
+ label1: repeat
+ set count3 = count3 + 1;
+ SELECT count3;
+ until count3 > 3
+ END repeat label1;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.17:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the repeat statement acts correctly for all variants,
+# including cases where statements are nested.
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.18:;
+--source include/show_msg80.inc
+
+# testcase : ensure that the labels enclosing each repeat statement must match.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp18;
+--enable_warnings
+
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+delimiter //;
+--error ER_SP_LABEL_MISMATCH
+CREATE PROCEDURE sp18( )
+BEGIN
+ declare count1 integer default 1;
+ label1: repeat
+ set count1 = count1 + 1;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ until count1 < 3
+ END repeat label2;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.19:;
+--source include/show_msg80.inc
+
+# testcase: ensure that it is possible to put a beginning label at the start of
+# a repeat statement without also requiring an ending label at the
+# END of the same statement.
+
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp19;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp19( )
+BEGIN
+ declare count1 integer default 1;
+ label1: repeat
+ set count1 = count1 + 1;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ until count1 < 3
+ END repeat;
+END//
+delimiter ;//
+
+CALL sp19();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+# cleanup
+DROP PROCEDURE sp19;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.20:;
+--source include/show_msg80.inc
+
+# testcase: ensure that it is not possible to put an ending label at the END of a
+# repeat statement without also requiring a matching beginning label
+# at the start of the same statement.
+
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp20;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp20( )
+BEGIN
+ declare count1 integer default 1;
+ repeat
+ set count1 = count1 + 1;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ until count1 < 3
+ END repeat label1;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.21:;
+--source include/show_msg80.inc
+
+# ensure that the while statement acts correctly for all variants,
+# including cases where statements are nested
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.22:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the labels enclosing each while statement must match.
+
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp22;
+--enable_warnings
+
+delimiter //;
+--error ER_SP_LABEL_MISMATCH
+CREATE PROCEDURE sp22( )
+BEGIN
+ declare count1 integer default 1;
+ declare count2 integer default 1;
+ while count1 < 3 do
+ set count1 = count1 + 1;
+ set count2 = 1;
+ label1: while count2 < 3 do
+ set count2 = count2 + 1;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ END while label2;
+ END while;
+END//
+delimiter ;//
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.23:;
+--source include/show_msg80.inc
+
+# testcase: ensure that it is not possible to put an ending label at the END of
+# a while statement without also requiring a matching beginning label
+# at the start of the same statement.
+
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp23;
+--enable_warnings
+
+delimiter //;
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp23( )
+BEGIN
+ declare count1 integer default 1;
+ declare count2 integer default 1;
+ while count1 < 3 do
+ set count1 = count1 + 1;
+ set count2 = 1;
+ while count2 < 3 do
+ set count2 = count2 + 1;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ END while label1;
+ END while;
+END//
+delimiter ;//
+
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.3.25:;
+--source include/show_msg80.inc
+
+# testcase: ensure that it is possible to put a beginning label at the start of a
+# while statement without also requiring an ending label at the END of the same statement.
+
+delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp25;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp25( )
+BEGIN
+ declare count1 integer default 1;
+ declare count2 integer default 1;
+ while count1 < 3 do
+ set count1 = count1 + 1;
+ set count2 = 1;
+ label1: while count2 < 3 do
+ set count2 = count2 + 1;
+ insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
+ END while;
+ END while;
+END//
+delimiter ;//
+
+CALL sp25 ();
+SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+# cleanup
+DROP PROCEDURE sp25;
+drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
+
+
+# ==============================================================================
+let $message= Section 3.1.4 - Checks for the global nature of stored procedures:;
+--source include/show_msg80.inc
+
+USE db_storedproc;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.1:;
+--source include/show_msg80.inc
+
+# testcase: ensure that, regardless of the database in which it was created,
+# a stored procedure can be called (for a procedure) from any #database
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+DROP DATABASE IF EXISTS d40401;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 ( n char(20) )
+BEGIN
+ SELECT n;
+END//
+delimiter ;//
+
+ CREATE DATABASE d40401;
+ USE d40401;
+
+CALL db_storedproc.sp1('abcd');
+
+ USE db_storedproc;
+
+# cleanup
+DROP PROCEDURE sp1;
+DROP DATABASE d40401;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.2:;
+--source include/show_msg80.inc
+
+# testcase: ensure that, regardless of the database in which it was created,
+# a stored procedure can be executed (for a function) from any database.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+DROP FUNCTION IF EXISTS fn11;
+DROP DATABASE IF EXISTS d40402;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1(n int) returns int
+ BEGIN
+ declare a int;
+ set a = 9 * n;
+ return a;
+END//
+delimiter ;//
+
+ CREATE DATABASE d40402;
+ USE d40402;
+
+
+ SELECT db_storedproc.fn1(100);
+
+ SELECT db_storedproc.fn1(1000);
+
+delimiter //;
+CREATE FUNCTION db_storedproc.fn11(n int) returns int
+BEGIN
+ declare a int;
+ set a = 9 * n;
+ return a;
+END//
+delimiter ;//
+
+ SELECT db_storedproc.fn11(100);
+
+ SELECT db_storedproc.fn11(1000);
+
+ USE db_storedproc;
+
+# cleanup
+DROP FUNCTION fn1;
+DROP FUNCTION fn11;
+DROP DATABASE d40402;
+
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.3:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the USE of a stored procedure from a database other than the database in
+# which it was created does not permanently change the database in use.
+
+--disable_warnings
+DROP DATABASE IF EXISTS d1;
+DROP DATABASE IF EXISTS d2;
+--enable_warnings
+
+ CREATE DATABASE d1;
+ CREATE DATABASE d2;
+
+ USE d1;
+
+ create table res_t41(a char(5), b char(10));
+ insert into res_t41 values('abcde', 'a!@#$%^&*(');
+
+ USE d2;
+
+ create table res_t42(a char(5), b char(10));
+
+ USE d1;
+
+delimiter //;
+CREATE PROCEDURE sp2(n char (20))
+BEGIN
+ SELECT res_t41.a, res_t41.b into @a, @b from res_t41 where res_t41.b = n;
+ insert into d2.res_t42 values (@a, @b);
+END//
+delimiter ;//
+
+ USE d2;
+
+CALL d1.sp2('a!@#$%^&*(');
+
+ show warnings;
+
+ SELECT * from d1.res_t41;
+ SELECT * from res_t42;
+
+# cleanup
+ USE db_storedproc;
+DROP DATABASE d1;
+DROP DATABASE d2;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.4:;
+--source include/show_msg80.inc
+
+# testcase : ensure that the mysql-specific USE <database name> statement is disallowed
+# in a stored procedure.
+
+--disable_warnings
+DROP DATABASE IF EXISTS d1;
+--enable_warnings
+
+ CREATE DATABASE d1;
+
+ USE d1;
+
+delimiter //;
+--error ER_SP_BADSTATEMENT
+CREATE PROCEDURE sp3()
+BEGIN
+ USE d1;
+END//
+delimiter ;//
+
+# cleanup
+ USE db_storedproc;
+DROP DATABASE d1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.5:;
+--source include/show_msg80.inc
+
+# testcase: ensure that when a database is dropped, all stored procedures #created within
+# that database are also cleanly dropped.
+
+--disable_warnings
+DROP DATABASE IF EXISTS d1;
+--enable_warnings
+
+ CREATE DATABASE d1;
+
+ USE d1;
+ create table t43(a char(5), b char(10));
+ insert into t43 values('abcde', 'a!@#$%^&*(');
+
+CREATE PROCEDURE d1.sp4()
+ SELECT * from d1.t43;
+
+--replace_column 13 modified 14 created
+ SELECT * from mysql.proc where specific_name = 'sp4';
+
+ USE db_storedproc;
+DROP DATABASE d1;
+ CREATE DATABASE d1;
+
+ USE d1;
+ create table t44(a char(5), b char(10));
+
+--replace_column 13 modified 14 created
+ SELECT * from mysql.proc where specific_name = 'sp4';
+
+# cleanup
+ USE db_storedproc;
+DROP DATABASE d1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.6:;
+--source include/show_msg80.inc
+
+# testcase: ensure that a stored procedure created without a qualifying #database name belongs
+# to the database in USE at creation time.
+
+
+ USE db_storedproc;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp5;
+--enable_warnings
+
+CREATE PROCEDURE sp5()
+ SELECT * from db_storedproc.t4 limit 0, 10;
+
+ SELECT db from mysql.proc where specific_name = 'sp5';
+
+# cleanup
+DROP PROCEDURE sp5;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.7:;
+--source include/show_msg80.inc
+
+# testcase: ensure that a stored procedure created with a qualifying database
+# name belongs to the database specified.
+
+ USE db_storedproc;
+
+--disable_warnings
+drop table IF EXISTS t46;
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+ create table t46(f1 char(20), f2 char(20));
+ insert into t46 values ('abcd', 'wxyz');
+
+CREATE PROCEDURE db_storedproc.sp6()
+ SELECT * from db_storedproc.t4 limit 0, 10;
+
+ SELECT db from mysql.proc where specific_name = 'sp6';
+
+# cleanup
+drop table t46;
+DROP PROCEDURE sp6;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.8:;
+--source include/show_msg80.inc
+
+# testcase : ensure that, regardless of the database in which it was created,
+# a procedure can be altered from any database.
+
+--disable_warnings
+DROP DATABASE IF EXISTS d1;
+DROP DATABASE IF EXISTS d2;
+--enable_warnings
+
+ CREATE DATABASE d1;
+ CREATE DATABASE d2;
+
+ USE d1;
+
+CREATE PROCEDURE sp8 ( n char(20) ) sql security DEFINER comment 'initial'
+ SELECT * from t1 where t1.f1 = n;
+
+ USE d2;
+ alter procedure d1.sp8 sql security DEFINER comment 'updated';
+--replace_column 13 modified 14 created
+ SELECT * from mysql.proc where specific_name='sp8' and db='d1';
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.9:;
+--source include/show_msg80.inc
+
+# testcase :ensure that, regardless of the database in which it was created,
+# a stored procedure can be executed (for a function) from any database.
+
+ USE d1;
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+DROP FUNCTION IF EXISTS fn11;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION d1.fn2(n int) returns int sql security invoker comment 'initial'
+BEGIN
+ declare a int;
+ set a = 0.9 * n;
+ return a;
+END//
+delimiter ;//
+
+ USE d2;
+ alter function d1.fn2 sql security DEFINER comment 'updated';
+--replace_column 13 modified 14 created
+ SELECT * from mysql.proc where specific_name='fn2' and db='d1';
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.10:;
+--source include/show_msg80.inc
+
+# testcase: ensure that, regardless of the database in which it was created,
+# a procedure can be dropped from any database.
+
+
+ USE d1;
+
+CREATE PROCEDURE sp9 ( n char(20) )
+ SELECT * from t1 where t1.f1 = n;
+
+ USE d2;
+DROP PROCEDURE d1.sp9; --replace_column 13 modified 14 created
+ SELECT * from mysql.proc where specific_name='sp9' and db='d1';
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.4.11:;
+--source include/show_msg80.inc
+
+# testcase: ensure that, regardless of the database in which it was created,
+# a function can be dropped from any database.
+
+
+ USE d1;
+
+delimiter //;
+CREATE FUNCTION d1.fn3(n int) returns int
+BEGIN
+ declare a int;
+ set a = 0.9 * n;
+ return a;
+END//
+delimiter ;//
+
+ USE d2;
+DROP FUNCTION d1.fn3;
+--replace_column 13 modified 14 created
+ SELECT * from mysql.proc where specific_name='fn3' and db='d1';
+
+# cleanup
+
+ USE db_storedproc;
+DROP DATABASE d1;
+DROP DATABASE d2;
+
+
+# ==============================================================================
+# test plan section: 4.5 -
+# ==============================================================================
+let $message= Section 3.1.5 - Parameter use checks:
+Functions with all data types;
+--source include/show_msg80.inc
+
+#FIXME hpux11
+let $plus_20= 1.00e+20;
+let $plus_24= 1.00e+24;
+let $plus_30= 1.00e+30;
+let $plus_36= 1.00e+36;
+let $plus_40= 1.00e+40;
+let $minus_30= -1.00e+30;
+let $minus_36= -1.00e+36;
+let $minus_40= -1.00e+40;
+
+let $callvar01m= -1.00e+20;
+let $callvar01p= 1.00e+20;
+let $callvar02= -9.22e+18;
+let $callvar03= -9.22e+18;
+
+let $procvar01_m30= -1.00e+30;
+let $procvar01_m36= -1.00e+36;
+let $procvar01_m40= -1.00e+40;
+let $procvar01_20= 1.00e+20;
+let $procvar01_24= 1.00e+24;
+let $procvar01_30= 1.00e+30;
+let $procvar01_36= 1.00e+36;
+let $procvar01_40= 1.00e+40;
+
+#################123456789-123456789-123456789-123456789-
+let $plus_20= 100000000000000000000;
+let $plus_24= 1000000000000000000000000;
+let $plus_30= 1000000000000000000000000000000;
+let $plus_36= 1000000000000000000000000000000000000;
+let $plus_40= 10000000000000000000000000000000000000000;
+let $minus_30= -1000000000000000000000000000000;
+let $minus_36= -1000000000000000000000000000000000000;
+let $minus_40= -10000000000000000000000000000000000000000;
+
+let $procvar_m00= -1.00e+22;
+let $procvar_00= 1.00e+22;
+let $procvar01_m30= $procvar_m00;
+let $procvar01_m36= $procvar_m00;
+let $procvar01_m40= $procvar_m00;
+let $procvar01_20= $procvar_00;
+let $procvar01_24= $procvar_00;
+let $procvar01_30= $procvar_00;
+let $procvar01_36= $procvar_00;
+let $procvar01_40= $procvar_00;
+let $procvar03= -9.22e+18;
+let $procvar05= -9.22e+18;
+let $procvar07= -9.22e+18;
+
+
+--disable_warnings
+DROP DATABASE IF EXISTS d1;
+--enable_warnings
+
+CREATE DATABASE d1;
+USE d1;
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1( f1 bigint) returns bigint
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn1(-9.22e+18);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn2;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn2( f1 bigint unsigned) returns bigint unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn2(1.84e+19);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn3;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn3( f1 bigint unsigned zerofill) returns bigint unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn3(1.84e+17);
+--enable_ps_protocol
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn4;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn4( f1 bigint zerofill) returns bigint zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn4(-9.22e+15);
+--enable_ps_protocol
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn5;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn5( f1 decimal) returns decimal
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn5(-1.00e+09);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn6;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn6( f1 decimal (0)) returns decimal (0)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn6(-1.00e+09);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn7;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn7( f1 decimal (0) unsigned) returns decimal (0) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn7(99999999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn8;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn8(999999999);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn9;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn9( f1 decimal (0) zerofill) returns decimal (0) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn9(-1.00e+09);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn10;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn10( f1 decimal (0, 0)) returns decimal (0, 0)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn10(-1.00e+09);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn11;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn11( f1 decimal (0, 0) unsigned) returns decimal (0, 0) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn11(99999999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn12;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn12(999999999);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn13;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn13( f1 decimal (0, 0) zerofill) returns decimal (0, 0) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn13(-1.00e+09);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn14;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn14( f1 decimal (63, 30)) returns decimal (63, 30)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn14(-1.00e+21);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn15;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn15( f1 decimal (63, 30) unsigned) returns decimal (63, 30) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn15(1.00e+16);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn16;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn16( f1 decimal (63, 30) unsigned zerofill) returns decimal (63, 30) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn16(1.00e+16);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn17;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn17( f1 decimal (63, 30) zerofill) returns decimal (63, 30) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn17(-1.00e+21);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn18_d;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn18_d( f1 decimal (64)) returns decimal (64)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+#FIXME hpux11
+eval SELECT fn18_d( $minus_30 );
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn19_du;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn19_du( f1 decimal (64) unsigned) returns decimal (64) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+eval SELECT fn19_du( $plus_20 );
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn20_duz;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn20_duz( f1 decimal (64) unsigned zerofill) returns decimal (64) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+eval SELECT fn20_duz( $plus_24 );
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn21_d_z;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn21_d_z( f1 decimal (64) zerofill) returns decimal (64) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn21_d_z(1.00e+00);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn22;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn22(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn23;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn23(1.00e+00);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn24;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn24(-1.00e+09);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn25;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn25( f1 double) returns double
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn25(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn26;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn26( f1 double unsigned) returns double unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn26(1.00e+00);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn27;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn27( f1 double unsigned zerofill) returns double unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn27(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn28;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn28( f1 double zerofill) returns double zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn28(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn29;
+--enable_warnings
+
+
+delimiter //;
+CREATE FUNCTION fn29( f1 float) returns float
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn29(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn30;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn30( f1 float unsigned) returns float unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn30(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn31;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn31( f1 float unsigned zerofill) returns float unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn31(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn32;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn32( f1 float zerofill) returns float zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn32(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn33;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn33( f1 float(0)) returns float(0)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn33(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn34;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn34( f1 float(0) unsigned) returns float(0) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn34(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn35;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn35( f1 float(0) unsigned zerofill) returns float(0) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn35(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn36;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn36( f1 float(0) zerofill) returns float(0) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn36(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn37;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn37( f1 float(23)) returns float(23)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn37(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn38;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn38( f1 float(23) unsigned) returns float(23) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn38(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn39;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn39( f1 float(23) unsigned zerofill) returns float(23) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn39(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn40;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn40( f1 float(23) zerofill) returns float(23) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn40(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn41;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn41( f1 float(24)) returns float(24)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn41(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn42;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn42( f1 float(24) unsigned) returns float(24) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn42(1.00e+00);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn43;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn43( f1 float(24) unsigned zerofill) returns float(24) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn43(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn44;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn44( f1 float(24) zerofill) returns float(24) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn44(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn45;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn45( f1 float(53)) returns float(53)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn45(1.00e+00);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn46;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn46( f1 float(53) unsigned) returns float(53) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn46(1.00e+00);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn47;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn47( f1 float(53) unsigned zerofill) returns float(53) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn47(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn48;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn48( f1 float(53) zerofill) returns float(53) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn48(1.00e+00);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn49;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn49( f1 int) returns int
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn49(-2.15e+09);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn50;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn50( f1 int unsigned) returns int unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn50(4.29e+09);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn51;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn51( f1 int unsigned zerofill) returns int unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn51(4.29e+09);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn52;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn52( f1 int zerofill) returns int zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn52(2.15e+08);
+--enable_ps_protocol
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn53;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn53( f1 mediumint) returns mediumint
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn53(-8388600);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn54;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn54( f1 mediumint unsigned) returns mediumint unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn54(16777201);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn55;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn55( f1 mediumint unsigned zerofill) returns mediumint unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn55(16777210);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn56;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn56( f1 mediumint zerofill) returns mediumint zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn56(-8388601);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn57;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn57( f1 numeric) returns numeric
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn57(-999999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn58;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn58( f1 numeric (0)) returns numeric (0)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn58(-999999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn59;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn59( f1 numeric (0) unsigned) returns numeric (0) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn59(9999999999);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn60;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn60(99999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn61;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn61( f1 numeric (0) zerofill) returns numeric (0) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn61(-99999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn62;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn62( f1 numeric (0, 0)) returns numeric (0, 0)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn62(-999999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn63;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn63( f1 numeric (0, 0) unsigned) returns numeric (0, 0) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn63(9999999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn64;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn64(99999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn65;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn65( f1 numeric (0, 0) zerofill) returns numeric (0, 0) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn65(-99999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn66;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn66( f1 numeric (63, 30)) returns numeric (63, 30)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn66(-1e+36);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn67;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn67(1e+36);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn68;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn68(1e+36);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn69;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn69(-1e+36);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn70_n;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn70_n( f1 numeric (64)) returns numeric (64)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+#FIXME hpux11
+#SELECT fn70_n(-1e+40);
+eval SELECT fn70_n( $minus_30 );
+eval SELECT fn70_n( $minus_40 );
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn71_nu;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn71_nu( f1 numeric (64) unsigned) returns numeric (64) unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+#FIXME hpux11
+#SELECT fn71_nu(1.00e+40);
+eval SELECT fn71_nu( $plus_40 );
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn72_nuz;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn72_nuz( f1 numeric (64) unsigned zerofill) returns numeric (64) unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+#FIXME hpux11
+#SELECT fn72_nuz(1.00e+40);
+eval SELECT fn72_nuz( $plus_40 );
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn73_n_z;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn73_n_z( f1 numeric (64) zerofill) returns numeric (64) zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+#FIXME hpux11
+#SELECT fn73_n_z(1.00e+40);
+eval SELECT fn73_n_z( $plus_40 );
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn74;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn74( f1 numeric unsigned) returns numeric unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn74(999999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn75;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn75( f1 numeric unsigned zerofill) returns numeric unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn75(999999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn76;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn76( f1 numeric zerofill) returns numeric zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn76(-999999999);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn77;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn77( f1 real) returns real
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn77(1.1);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn78;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn78( f1 real unsigned) returns real unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn78(1.1);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn79;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn79( f1 real unsigned zerofill) returns real unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn79(1.1);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn80;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn80( f1 real zerofill) returns real zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+--disable_ps_protocol
+SELECT fn80(1.1);
+--enable_ps_protocol
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn81;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn81( f1 smallint) returns smallint
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn81(-32701);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn82;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn82( f1 smallint unsigned) returns smallint unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn82(65531);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn83;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn83( f1 smallint unsigned zerofill) returns smallint unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn83(65531);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn84;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn84( f1 smallint zerofill) returns smallint zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn84(-32601);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn85;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn85( f1 tinyint) returns tinyint
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn85(-115);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn86;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn86( f1 tinyint unsigned) returns tinyint unsigned
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn86(251);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn87;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn87( f1 tinyint unsigned zerofill) returns tinyint unsigned zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn87(201);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn88;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn88( f1 tinyint zerofill) returns tinyint zerofill
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn88(-101);
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn89;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum')
+BEGIN
+ IF f1 = '1enum' THEN
+ SET f1 = '2enum';
+ ELSE
+ SET f1 = '1enum';
+ END IF;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn89( '1enum');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn90;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn90( f1 set('1set', '2set')) returns set('1set', '2set')
+BEGIN
+ IF f1 = '1set' THEN
+ SET f1 = '2set';
+ ELSE
+ SET f1 = '1set';
+ END IF;
+ RETURN f1;
+END//
+delimiter ;//
+
+SELECT fn90( '1set');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn91;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn91( f1 date) returns date
+BEGIN
+ set f1 = adddate(f1, interval 31 day);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn91('1997-12-31');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn92;
+--enable_warnings
+
+
+delimiter //;
+CREATE FUNCTION fn92( f1 time) returns time
+BEGIN
+ set f1 = addtime(f1, '02:00:00.999998');
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn92( '23:59:59.999999');
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn93;
+--enable_warnings
+
+
+delimiter //;
+CREATE FUNCTION fn93( f1 datetime) returns datetime
+BEGIN
+ set f1 = addtime(f1, '1 1:1:1.000002');
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn93('1997-12-31 23:59:59.999999');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn94;
+--enable_warnings
+
+
+delimiter //;
+CREATE FUNCTION fn94( f1 char) returns char
+BEGIN
+ set f1 = concat('a', f1);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn94( 'h');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn95;
+--enable_warnings
+
+
+delimiter //;
+CREATE FUNCTION fn95( f1 char ascii) returns char ascii
+BEGIN
+ set f1 = concat('a', f1);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn95('h');
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn96;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn96( f1 binary) returns binary(2)
+BEGIN
+ set f1 = concat('a', f1);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn96( 'h');
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn97;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn97( f1 longtext) returns longtext
+BEGIN
+ set f1 = concat('hello', f1);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn97( 'world');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn98;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn98( f1 mediumtext) returns mediumtext
+BEGIN
+ set f1 = concat('hello', f1);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn98( 'world');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn99;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn99( f1 text) returns text
+BEGIN
+ set f1 = concat('hello', f1);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn99( 'world');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn100;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn100( f1 tinytext) returns tinytext
+BEGIN
+ set f1 = concat('hello', f1);
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn100( 'world');
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn101;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn101( f1 year) returns year
+BEGIN
+ set f1 = f1 + 10;
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn101(51);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn102;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn102( f1 year(4)) returns year(4)
+BEGIN
+ set f1 = f1 + 51;
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn102(1982);
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn103;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn103( f1 geometrycollection) returns geometrycollection
+BEGIN
+ set f1 = f1;
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn103('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn104;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn104( f1 linestring) returns linestring
+BEGIN
+ set f1 = f1;
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@');
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn105;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn105( f1 point) returns point
+BEGIN
+ set f1 = f1;
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn105('\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@');
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn106;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn106( f1 polygon) returns polygon
+BEGIN
+ set f1 = f1;
+ return f1;
+END//
+delimiter ;//
+
+SELECT fn106('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn107;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn107( f1 timestamp) returns timestamp
+BEGIN
+ set f1 = now();
+ return f1;
+END//
+delimiter ;//
+
+--replace_column 1 returned
+SELECT fn107(20050510080451);
+
+USE db_storedproc;
+DROP DATABASE d1;
+
+
+# ==============================================================================
+# test plan section: 4.5 - stored procs with in, out parameters using all datatypes
+# ==============================================================================
+
+--disable_warnings
+DROP DATABASE IF EXISTS db1;
+--enable_warnings
+
+CREATE DATABASE db1;
+USE db1;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1( f1 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp1(-9.22e+18);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp2;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp2( f1 bigint unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp2(1.84e+19);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp3;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp3( f1 bigint unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp3(1.84e+17);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp4( f1 bigint zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp4(-9.22e+15);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp5;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp5( f1 decimal)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp5(-1.00e+09);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6( f1 decimal (0))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp6(-1.00e+09);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp7;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp7( f1 decimal (0) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp7(99999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp8;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp8(999999999);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp9;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp9( f1 decimal (0) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp9(-1.00e+09);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp10;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp10( f1 decimal (0, 0))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp10(-1.00e+09);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp11;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp11( f1 decimal (0, 0) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp11(99999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp12;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp12(999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp13;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp13( f1 decimal (0, 0) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp13(-1.00e+09);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp14;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp14( f1 decimal (63, 30))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp14(-1.00e+21);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp15;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp15( f1 decimal (63, 30) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp15(1.00e+16);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp16;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp16( f1 decimal (63, 30) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp16(1.00e+16);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp17;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp17( f1 decimal (63, 30) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp17(-1.00e+21);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp18_d;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp18_d( f1 decimal (64))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp18_d(-1.00e+30);
+eval CALL sp18_d( $minus_30 );
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp19_du;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp19_du( f1 decimal (64) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp19_du(1.00e+20);
+eval CALL sp19_du( $plus_20 );
+CALL sp19_du(1.00e+24);
+eval CALL sp19_du( $plus_24 );
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp20_duz;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp20_duz( f1 decimal (64) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp20_duz(1.00e+20);
+eval CALL sp20_duz( $plus_20 );
+CALL sp20_duz(1.00e+24);
+eval CALL sp20_duz( $plus_24 );
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp21;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp21( f1 decimal (64) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp21(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp22;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp22( f1 decimal unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp22(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp23;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp23( f1 decimal unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp23(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp24;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp24( f1 decimal zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp24(-1.00e+09);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp25;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp25( f1 double)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp25(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp26;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp26( f1 double unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp26(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp27;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp27( f1 double unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp27(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp28;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp28( f1 double zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp28(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp29;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp29( f1 float)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp29(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp30;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp30( f1 float unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp30(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp31;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp31( f1 float unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp31(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp32;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp32( f1 float zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp32(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp33;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp33( f1 float(0))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp33(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp34;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp34( f1 float(0) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp34(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp35;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp35( f1 float(0) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp35(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp36;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp36( f1 float(0) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp36(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp37;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp37( f1 float(23))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp37(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp38;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp38( f1 float(23) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp38(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp39;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp39( f1 float(23) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp39(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp40;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp40( f1 float(23) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp40(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp41;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp41( f1 float(24))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp41(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp42;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp42( f1 float(24) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp42(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp43;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp43( f1 float(24) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp43(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp44;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp44( f1 float(24) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp44(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp45;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp45( f1 float(53))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp45(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp46;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp46( f1 float(53) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp46(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp47;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp47( f1 float(53) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp47(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp48;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp48( f1 float(53) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp48(1.00e+00);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp49;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp49( f1 int)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp49(-2.15e+09);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp50;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp50( f1 int unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp50(4.29e+09);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp51;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp51( f1 int unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp51(4.29e+09);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp52;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp52( f1 int zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp52(2.15e+08);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp53;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp53( f1 mediumint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp53(-8388600);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp54;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp54( f1 mediumint unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp54(16777201);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp55;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp55( f1 mediumint unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp55(16777210);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp56;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp56( f1 mediumint zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp56(-8388601);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp57;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp57( f1 numeric)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp57(-999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp58;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp58( f1 numeric (0))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp58(-999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp59;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp59( f1 numeric (0) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp59(9999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp60;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp60(99999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp61;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp61( f1 numeric (0) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp61(-99999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp62;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp62( f1 numeric (0, 0))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp62(-999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp63;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp63( f1 numeric (0, 0) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp63(9999999999);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp64;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp64(99999999);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp65;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp65( f1 numeric (0, 0) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp65(-99999999);
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp66_n;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp66_n( f1 numeric (63, 30))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp66_n(-1e+36);
+eval CALL sp66_n( $minus_36 );
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp67_nu;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp67_nu(1e+36);
+eval CALL sp67_nu( $plus_36 );
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp68_nuz;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp68_nuz(1e+36);
+eval CALL sp68_nuz( $plus_36 );
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp69_n_z;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp69_n_z(-1e+36);
+eval CALL sp69_n_z( $minus_36 );
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp70_n;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp70_n( f1 numeric (64))
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+--disable_warnings
+CALL sp70_n(-1e+40);
+--enable_warnings
+eval CALL sp70_n( $minus_40 );
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp71_nu;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp71_nu( f1 numeric (64) unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+--disable_warnings
+CALL sp71_nu(1.00e+40);
+--enable_warnings
+eval CALL sp71_nu( $plus_40 );
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp72_nuz;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp72_nuz( f1 numeric (64) unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+--disable_warnings
+CALL sp72_nuz(1.00e+40);
+--enable_warnings
+eval CALL sp72_nuz( $plus_40 );
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp73_n_z;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp73_n_z( f1 numeric (64) zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+--disable_warnings
+CALL sp73_n_z(1.00e+40);
+--enable_warnings
+eval CALL sp73_n_z( $plus_40 );
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp74;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp74( f1 numeric unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp74(999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp75;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp75( f1 numeric unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp75(999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp76;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp76( f1 numeric zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp76(-999999999);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp77;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp77( f1 real)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp77(1.1);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp78;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp78( f1 real unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp78(1.1);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp79;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp79( f1 real unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp79(1.1);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp80;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp80( f1 real zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp80(1.1);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp81;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp81( f1 smallint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp81(-32701);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp82;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp82( f1 smallint unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp82(65531);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp83;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp83( f1 smallint unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp83(65531);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp84;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp84( f1 smallint zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp84(-32601);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp85;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp85( f1 tinyint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp85(-115);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp86;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp86( f1 tinyint unsigned)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp86(251);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp87;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp87( f1 tinyint unsigned zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp87(201);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp88;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp88( f1 tinyint zerofill)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp88(-101);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp89;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp89( f1 enum('1enum', '2enum'))
+BEGIN
+ IF f1 = '1enum' THEN set f1 = '2enum'; ELSE set f1 = '1enum'; END IF;
+END//
+delimiter ;//
+
+CALL sp89( '1enum');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp90;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp90( f1 set('1set', '2set'))
+BEGIN
+ IF f1 = '1set' THEN set f1 = '2set'; ELSE set f1 = '1set'; END IF;
+END//
+delimiter ;//
+
+CALL sp90( '1set');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp91;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp91( f1 date)
+BEGIN
+ set f1 = adddate(f1, interval 31 day);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp91( '1997-12-31');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp92;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp92( f1 time)
+BEGIN
+ set f1 = addtime(f1, '02:00:00.999998');
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp92( '23:59:59.999999');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp93;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp93( f1 datetime)
+BEGIN
+ set f1 = addtime(f1, '1 1:1:1.000002');
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp93('1997-12-31 23:59:59.999999');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp94;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp94( f1 char)
+BEGIN
+ set f1 = concat('a', f1);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp94( 'h');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp95;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp95( f1 char ascii)
+BEGIN
+ set f1 = concat('a', f1);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp95( 'h');
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp96;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp96( f1 char binary)
+BEGIN
+ set f1 = concat('a', f1);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp96( 'h');
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp97;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp97( f1 longtext)
+BEGIN
+ set f1 = concat('hello', f1);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp97( 'world');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp98;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp98( f1 mediumtext)
+BEGIN
+ set f1 = concat('hello', f1);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp98( 'world');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp99;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp99( f1 text)
+BEGIN
+ set f1 = concat('hello', f1);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp99( 'world');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp100;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp100( f1 tinytext)
+BEGIN
+ set f1 = concat('hello', f1);
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp100( 'world');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp101;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp101( f1 year)
+BEGIN
+ set f1 = f1 + 10;
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp101(51);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp102;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp102( f1 year(4))
+BEGIN
+ set f1 = f1 + 51;
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp102(1982);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp103;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp103( f1 geometrycollection)
+BEGIN
+ set f1 = f1;
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp103('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp104;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp104( f1 linestring)
+BEGIN
+ set f1 = f1;
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp105;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp105( f1 point)
+BEGIN
+ set f1 = f1;
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp105('\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp106;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp106( f1 polygon)
+BEGIN
+ set f1 = f1;
+ SELECT f1;
+END//
+delimiter ;//
+
+CALL sp106('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp107;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp107( f1 timestamp)
+BEGIN
+ set f1 = now() + 0 + f1;
+ SELECT f1;
+END//
+delimiter ;//
+
+--replace_column 1 returned
+CALL sp107(2.00e+13);
+
+USE db_storedproc;
+DROP DATABASE db1;
+
+
+# ==============================================================================
+# test plan section: 4.5 - parameter checks - multiple data types in stored procedure and functions
+# ==============================================================================
+
+--disable_warnings
+DROP DATABASE IF EXISTS db1;
+--enable_warnings
+
+CREATE DATABASE db1;
+USE db1;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+delimiter //;
+CREATE PROCEDURE sp1( in f1 year, inout f2 year, out f3 year, in f4 year,
+ inout f5 year, out f6 year, in f7 year(4), inout f8 year(4),
+ out f9 year(4), in f10 year(4), inout f11 year(4), out f12 year(4))
+BEGIN
+ set f1 = f1 + 10; set f2 = f2 + 10; set f3 = f2 + 10;
+ set f4 = f4 + 10; set f5 = f5 + 10; set f6 = f5 + 10;
+ set f7 = f7 + 51; set f8 = f8 + 51; set f9 = f8 + 51;
+ set f10 = f10 + 51; set f11 = f11 + 51; set f12 = f11 + 51;
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute01;
+delimiter //;
+CREATE PROCEDURE spexecute01()
+BEGIN
+ declare var1 year;
+ declare var2 year;
+ declare var3 year;
+ declare var4 year;
+ declare var5 year(4);
+ declare var6 year(4);
+ declare var7 year(4);
+ declare var8 year(4);
+ set var1 = 51;
+ set var3 = 51;
+ set var5 = 1982;
+ set var7 = 1982;
+ CALL sp1(51, var1, var2, 51, var3, var4, 1982, var5, var6, 1982, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute01();
+DROP PROCEDURE spexecute01;
+DROP PROCEDURE sp1;
+
+
+DROP PROCEDURE IF EXISTS sp2;
+delimiter //;
+CREATE PROCEDURE sp2( in f1 text, inout f2 text, out f3 text, in f4 text, inout f5 text,
+ out f6 text, in f7 tinytext, inout f8 tinytext, out f9 tinytext,
+ in f10 tinytext, inout f11 tinytext, out f12 tinytext)
+BEGIN
+ set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
+ set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+ set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+ set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute02;
+delimiter //;
+CREATE PROCEDURE spexecute02()
+BEGIN
+ declare var1 text;
+ declare var2 text;
+ declare var3 text;
+ declare var4 text;
+ declare var5 tinytext;
+ declare var6 tinytext;
+ declare var7 tinytext;
+ declare var8 tinytext;
+ set var1 = 'world';
+ set var3 = 'world';
+ set var5 = 'world';
+ set var7 = 'world';
+ CALL sp2( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute02();
+DROP PROCEDURE spexecute02;
+DROP PROCEDURE sp2;
+
+
+DROP PROCEDURE IF EXISTS sp3;
+delimiter //;
+CREATE PROCEDURE sp3( in f1 char, inout f2 char, out f3 char, in f4 char ascii,
+ inout f5 char ascii, out f6 char ascii, in f7 longtext,
+ inout f8 longtext, out f9 longtext, in f10 mediumtext,
+ inout f11 mediumtext, out f12 mediumtext)
+BEGIN
+ set f1 = concat('a', f1); set f2 = concat('a', f2); set f3 = concat('a', f1);
+ set f4 = concat('a', f4); set f5 = concat('a', f5); set f6 = concat('a', f4);
+ set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f9);
+ set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute03;
+delimiter //;
+CREATE PROCEDURE spexecute03()
+BEGIN
+ declare var1 char;
+ declare var2 char;
+ declare var3 char ascii;
+ declare var4 char ascii;
+ declare var5 longtext;
+ declare var6 longtext;
+ declare var7 mediumtext;
+ declare var8 mediumtext;
+ set var1 = 'h';
+ set var3 = 'h';
+ set var5 = 'world';
+ set var7 = 'world';
+ CALL sp3( 'h', var1, var2, 'h', var3, var4, 'world', var5, var6, 'world', var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute03();
+
+DROP PROCEDURE spexecute03;
+DROP PROCEDURE sp3;
+
+
+DROP PROCEDURE IF EXISTS sp4;
+delimiter //;
+CREATE PROCEDURE sp4( in f1 bigint, inout f2 bigint, out f3 bigint,
+ in f4 bigint, inout f5 bigint, out f6 bigint,
+ in f7 bigint, inout f8 bigint, out f9 bigint,
+ in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f3 = f2;
+ set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
+ set f6 = f5;
+ set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
+ set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8;
+ set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
+ set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11;
+ set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
+ set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute04;
+delimiter //;
+CREATE PROCEDURE spexecute04()
+BEGIN
+ declare var1 bigint;
+ declare var2 bigint;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -9.22e+18;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp4(-9.22e+18, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute04();
+DROP PROCEDURE spexecute04;
+DROP PROCEDURE sp4;
+
+# sp5 removed
+
+DROP PROCEDURE IF EXISTS sp6;
+delimiter //;
+CREATE PROCEDURE sp6( in f1 timestamp, inout f2 timestamp, out f3 timestamp, in f4 timestamp, inout f5 timestamp, out f6 timestamp, in f7 timestamp, inout f8 timestamp, out f9 timestamp, in f10 timestamp, inout f11 timestamp, out f12 timestamp)
+BEGIN
+ set f1 = now() + 0 + f1; set f2 = now() + 0 + f2; set f3 = now() + 0 + f1;
+ set f4 = now() + 0 + f4; set f5 = now() + 0 + f5; set f6 = now() + 0 + f5;
+ set f7 = now() + 0 + f7; set f8 = now() + 0 + f8; set f9 = now() + 0 + f8;
+ set f10 = now() + 0 + f10; set f11 = now() + 0 + f11; set f12 = now() + 0 + f11;
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute06;
+delimiter //;
+CREATE PROCEDURE spexecute06()
+BEGIN
+ declare var1 timestamp;
+ declare var2 timestamp;
+ declare var3 timestamp;
+ declare var4 timestamp;
+ declare var5 timestamp;
+ declare var6 timestamp;
+ declare var7 timestamp;
+ declare var8 timestamp;
+ set var1 = 2.00e+13;
+ set var3 = 2.00e+13;
+ set var5 = 2.00e+13;
+ set var7 = 2.00e+13;
+ CALL sp6(2.00e+13, var1, var2, 2.00e+13, var3, var4, 2.00e+13, var5, var6, 2.00e+13, var7, var8);
+END//
+delimiter ;//
+
+--replace_column 1 returned 2 returned 3 returned 4 returned 5 returned 6 returned 7 returned 8 returned 9 returned 10 returned 11 returned 12 returned
+CALL spexecute06();
+DROP PROCEDURE spexecute06;
+DROP PROCEDURE sp6;
+
+
+DROP PROCEDURE IF EXISTS sp07;
+delimiter //;
+CREATE PROCEDURE sp07( IN f1 BIGINT UNSIGNED,
+ INOUT f2 BIGINT UNSIGNED,
+ OUT f3 BIGINT UNSIGNED,
+ IN f4 BIGINT,
+ INOUT f5 BIGINT,
+ OUT f6 BIGINT,
+ IN f7 BIGINT,
+ INOUT f8 BIGINT,
+ OUT f9 BIGINT,
+ IN f10 BIGINT,
+ INOUT f11 BIGINT,
+ OUT f12 BIGINT)
+BEGIN
+ SELECT f1, f2, f3;
+ SELECT f4, f5, f6;
+ SELECT f7, f8, f9;
+ SELECT f10, f11, f12;
+ set f3 = f2;
+ set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
+ set f3 = (f3 * 2); set f3 = (f3 - 10); set f3 = (f3 + 10);
+ set f6 = f5;
+ set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
+ set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8;
+ set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
+ set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11;
+ set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
+ set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3;
+ SELECT f4, f5, f6;
+ SELECT f7, f8, f9;
+ SELECT f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute07;
+delimiter //;
+CREATE PROCEDURE spexecute07()
+BEGIN
+ declare var1 bigint unsigned;
+ declare var2 bigint unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.84e+19;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ SELECT var1, var2;
+ SELECT var3, var4;
+ SELECT var5, var6;
+ SELECT var7, var8;
+ CALL sp07( var1, var1, var2, var3, var3, var4,
+ var5, var5, var6, var7, var7, var8 );
+ SELECT var1, var2;
+ SELECT var3, var4;
+ SELECT var5, var6;
+ SELECT var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute07();
+DROP PROCEDURE spexecute07;
+DROP PROCEDURE sp07;
+
+
+DROP PROCEDURE IF EXISTS sp8;
+delimiter //;
+CREATE PROCEDURE sp8( in f1 bigint unsigned zerofill,
+ inout f2 bigint unsigned zerofill,
+ out f3 bigint unsigned zerofill,
+ in f4 bigint,
+ inout f5 bigint,
+ out f6 bigint,
+ in f7 bigint,
+ inout f8 bigint,
+ out f9 bigint,
+ in f10 bigint,
+ inout f11 bigint,
+ out f12 bigint)
+BEGIN
+ set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
+ set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5;
+ set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
+ set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8;
+ set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
+ set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11;
+ set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
+ set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute08;
+delimiter //;
+CREATE PROCEDURE spexecute08()
+BEGIN
+ declare var1 bigint unsigned zerofill;
+ declare var2 bigint unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.84e+17;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp8(1.84e+17, var1, var2, -9.22e+18, var3, var4,
+ -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute08();
+DROP PROCEDURE spexecute08;
+DROP PROCEDURE sp8;
+
+
+DROP PROCEDURE IF EXISTS sp9;
+delimiter //;
+CREATE PROCEDURE sp9( in f1 bigint zerofill,
+ inout f2 bigint zerofill,
+ out f3 bigint zerofill,
+ in f4 bigint,
+ inout f5 bigint,
+ out f6 bigint,
+ in f7 bigint,
+ inout f8 bigint,
+ out f9 bigint,
+ in f10 bigint,
+ inout f11 bigint,
+ out f12 bigint)
+BEGIN
+ set f3 = f2;
+ set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
+ set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
+ set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5;
+ set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
+ set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8;
+ set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
+ set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11;
+ set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
+ set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute09;
+delimiter //;
+CREATE PROCEDURE spexecute09()
+BEGIN
+ declare var1 bigint zerofill;
+ declare var2 bigint zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -9.22e+15;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp9(-9.22e+15, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute09();
+DROP PROCEDURE spexecute09;
+DROP PROCEDURE sp9;
+
+
+DROP PROCEDURE IF EXISTS sp10;
+delimiter //;
+CREATE PROCEDURE sp10( in f1 decimal,
+ inout f2 decimal,
+ out f3 decimal,
+ in f4 bigint,
+ inout f5 bigint,
+ out f6 bigint,
+ in f7 bigint,
+ inout f8 bigint,
+ out f9 bigint,
+ in f10 bigint,
+ inout f11 bigint,
+ out f12 bigint)
+BEGIN
+ set f3 = f2;
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute10;
+delimiter //;
+CREATE PROCEDURE spexecute10()
+BEGIN
+ declare var1 decimal;
+ declare var2 decimal;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -1.00e+09;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp10(-1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute10();
+DROP PROCEDURE spexecute10;
+DROP PROCEDURE sp10;
+
+
+DROP PROCEDURE IF EXISTS sp11;
+delimiter //;
+CREATE PROCEDURE sp11( in f1 decimal (0), inout f2 decimal (0), out f3 decimal (0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f3 = f2;
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute11;
+delimiter //;
+CREATE PROCEDURE spexecute11()
+BEGIN
+ declare var1 decimal (0);
+ declare var2 decimal (0);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = --1.00e+09;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp11(--1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute11();
+DROP PROCEDURE spexecute11;
+DROP PROCEDURE sp11;
+
+
+DROP PROCEDURE IF EXISTS sp12;
+delimiter //;
+CREATE PROCEDURE sp12( in f1 decimal (0) unsigned, inout f2 decimal (0) unsigned, out f3 decimal (0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f3 = f2;
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute12;
+delimiter //;
+CREATE PROCEDURE spexecute12()
+BEGIN
+ declare var1 decimal (0) unsigned;
+ declare var2 decimal (0) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 99999999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp12(99999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute12();
+DROP PROCEDURE spexecute12;
+DROP PROCEDURE sp12;
+
+
+DROP PROCEDURE IF EXISTS sp13;
+delimiter //;
+CREATE PROCEDURE sp13( in f1 decimal (0, 0) zerofill, inout f2 decimal (0, 0) zerofill, out f3 decimal (0, 0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f3 = f2;
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute13;
+delimiter //;
+CREATE PROCEDURE spexecute13()
+BEGIN
+ declare var1 decimal (0, 0) zerofill;
+ declare var2 decimal (0, 0) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -1.00e+09;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp13(-1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute13();
+DROP PROCEDURE spexecute13;
+DROP PROCEDURE sp13;
+
+
+DROP PROCEDURE IF EXISTS sp14;
+delimiter //;
+CREATE PROCEDURE sp14( in f1 decimal (63, 30), inout f2 decimal (63, 30), out f3 decimal (63, 30), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f3 = f2;
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute14;
+delimiter //;
+CREATE PROCEDURE spexecute14()
+BEGIN
+ declare var1 decimal (63, 30);
+ declare var2 decimal (63, 30);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -1.00e+21;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp14(-1.00e+21, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute14();
+DROP PROCEDURE spexecute14;
+DROP PROCEDURE sp14;
+
+
+DROP PROCEDURE IF EXISTS sp15;
+delimiter //;
+CREATE PROCEDURE sp15( in f1 double, inout f2 double, out f3 double, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute15;
+delimiter //;
+CREATE PROCEDURE spexecute15()
+BEGIN
+ declare var1 double;
+ declare var2 double;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp15(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute15();
+DROP PROCEDURE spexecute15;
+DROP PROCEDURE sp15;
+
+
+DROP PROCEDURE IF EXISTS sp16;
+delimiter //;
+CREATE PROCEDURE sp16( in f1 double zerofill, inout f2 double zerofill, out f3 double zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute16;
+delimiter //;
+CREATE PROCEDURE spexecute16()
+BEGIN
+ declare var1 double zerofill;
+ declare var2 double zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp16(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute16();
+DROP PROCEDURE spexecute16;
+DROP PROCEDURE sp16;
+
+
+DROP PROCEDURE IF EXISTS sp17;
+delimiter //;
+CREATE PROCEDURE sp17( in f1 double unsigned, inout f2 double unsigned, out f3 double unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute17;
+delimiter //;
+CREATE PROCEDURE spexecute17()
+BEGIN
+ declare var1 double unsigned;
+ declare var2 double unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp17(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute17();
+DROP PROCEDURE spexecute17;
+DROP PROCEDURE sp17;
+
+
+DROP PROCEDURE IF EXISTS sp18;
+delimiter //;
+CREATE PROCEDURE sp18( in f1 double unsigned zerofill, inout f2 double unsigned zerofill, out f3 double unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute18;
+delimiter //;
+CREATE PROCEDURE spexecute18()
+BEGIN
+ declare var1 double unsigned zerofill;
+ declare var2 double unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp18(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute18();
+DROP PROCEDURE spexecute18;
+DROP PROCEDURE sp18;
+
+
+DROP PROCEDURE IF EXISTS sp19;
+delimiter //;
+CREATE PROCEDURE sp19( in f1 float unsigned, inout f2 float unsigned, out f3 float unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute19;
+delimiter //;
+CREATE PROCEDURE spexecute19()
+BEGIN
+ declare var1 float unsigned;
+ declare var2 float unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp19(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute19();
+DROP PROCEDURE spexecute19;
+DROP PROCEDURE sp19;
+
+
+DROP PROCEDURE IF EXISTS sp20;
+delimiter //;
+CREATE PROCEDURE sp20( in f1 float unsigned zerofill, inout f2 float unsigned zerofill, out f3 float unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute20;
+delimiter //;
+CREATE PROCEDURE spexecute20()
+BEGIN
+ declare var1 float unsigned zerofill;
+ declare var2 float unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp20(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute20();
+DROP PROCEDURE spexecute20;
+DROP PROCEDURE sp20;
+
+
+DROP PROCEDURE IF EXISTS sp21;
+delimiter //;
+CREATE PROCEDURE sp21( in f1 float zerofill, inout f2 float zerofill, out f3 float zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute21;
+delimiter //;
+CREATE PROCEDURE spexecute21()
+BEGIN
+ declare var1 float zerofill;
+ declare var2 float zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp21(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute21();
+DROP PROCEDURE spexecute21;
+DROP PROCEDURE sp21;
+
+
+DROP PROCEDURE IF EXISTS sp22;
+delimiter //;
+CREATE PROCEDURE sp22( in f1 float(0), inout f2 float(0), out f3 float(0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute22;
+delimiter //;
+CREATE PROCEDURE spexecute22()
+BEGIN
+ declare var1 float(0);
+ declare var2 float(0);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp22(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute22();
+DROP PROCEDURE spexecute22;
+DROP PROCEDURE sp22;
+
+
+DROP PROCEDURE IF EXISTS sp23;
+delimiter //;
+CREATE PROCEDURE sp23( in f1 numeric, inout f2 numeric, out f3 numeric, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute23;
+delimiter //;
+CREATE PROCEDURE spexecute23()
+BEGIN
+ declare var1 numeric;
+ declare var2 numeric;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -999999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp23(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute23();
+DROP PROCEDURE spexecute23;
+DROP PROCEDURE sp23;
+
+
+DROP PROCEDURE IF EXISTS sp24;
+delimiter //;
+CREATE PROCEDURE sp24( in f1 real, inout f2 real, out f3 real, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute24;
+delimiter //;
+CREATE PROCEDURE spexecute24()
+BEGIN
+ declare var1 real;
+ declare var2 real;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.1;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp24(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute24();
+DROP PROCEDURE spexecute24;
+DROP PROCEDURE sp24;
+
+
+DROP PROCEDURE IF EXISTS sp25;
+delimiter //;
+CREATE PROCEDURE sp25( in f1 smallint, inout f2 smallint, out f3 smallint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute25;
+delimiter //;
+CREATE PROCEDURE spexecute25()
+BEGIN
+ declare var1 smallint;
+ declare var2 smallint;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -32701;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp25(-32701, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute25();
+DROP PROCEDURE spexecute25;
+DROP PROCEDURE sp25;
+
+
+DROP PROCEDURE IF EXISTS sp26;
+delimiter //;
+CREATE PROCEDURE sp26( in f1 date, inout f2 date, out f3 date, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = adddate(f1, interval 31 day); set f2 = adddate(f2, interval 31 day); set f3 = adddate(f2, interval 31 day);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute26;
+delimiter //;
+CREATE PROCEDURE spexecute26()
+BEGIN
+ declare var1 date;
+ declare var2 date;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = '1997-12-31';
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp26( '1997-12-31', var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute26();
+DROP PROCEDURE spexecute26;
+DROP PROCEDURE sp26;
+
+
+DROP PROCEDURE IF EXISTS sp27;
+delimiter //;
+CREATE PROCEDURE sp27( in f1 time, inout f2 time, out f3 time, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = addtime(f1, '02:00:00.999998'); set f2 = addtime(f2, '02:00:00.999998'); set f3 = addtime(f2, '02:00:00.999998');
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute27;
+delimiter //;
+CREATE PROCEDURE spexecute27()
+BEGIN
+ declare var1 time;
+ declare var2 time;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = '23:59:59.999999';
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp27( '23:59:59.999999', var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute27();
+DROP PROCEDURE spexecute27;
+DROP PROCEDURE sp27;
+
+
+DROP PROCEDURE IF EXISTS sp28;
+delimiter //;
+CREATE PROCEDURE sp28( in f1 datetime, inout f2 datetime, out f3 datetime, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = addtime(f1, '1 1:1:1.000002'); set f2 = addtime(f2, '1 1:1:1.000002'); set f3 = addtime(f1, '1 1:1:1.000002');
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute28;
+delimiter //;
+CREATE PROCEDURE spexecute28()
+BEGIN
+ declare var1 datetime;
+ declare var2 datetime;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = '1997-12-31 23:59:59.999999';
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp28('1997-12-31 23:59:59.999999', var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute28();
+DROP PROCEDURE spexecute28;
+DROP PROCEDURE sp28;
+
+
+DROP PROCEDURE IF EXISTS sp29;
+delimiter //;
+CREATE PROCEDURE sp29( in f1 float(0) unsigned, inout f2 float(0) unsigned, out f3 float(0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute29;
+delimiter //;
+CREATE PROCEDURE spexecute29()
+BEGIN
+ declare var1 float(0) unsigned;
+ declare var2 float(0) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp29(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute29();
+DROP PROCEDURE spexecute29;
+DROP PROCEDURE sp29;
+
+
+DROP PROCEDURE IF EXISTS sp30;
+delimiter //;
+CREATE PROCEDURE sp30( in f1 float(0) zerofill, inout f2 float(0) zerofill, out f3 float(0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute30;
+delimiter //;
+CREATE PROCEDURE spexecute30()
+BEGIN
+ declare var1 float(0) zerofill;
+ declare var2 float(0) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp30(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute30();
+DROP PROCEDURE spexecute30;
+DROP PROCEDURE sp30;
+
+
+DROP PROCEDURE IF EXISTS sp31;
+delimiter //;
+CREATE PROCEDURE sp31( in f1 float(23), inout f2 float(23), out f3 float(23), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute31;
+delimiter //;
+CREATE PROCEDURE spexecute31()
+BEGIN
+ declare var1 float(23);
+ declare var2 float(23);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp31(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute31();
+DROP PROCEDURE spexecute31;
+DROP PROCEDURE sp31;
+
+
+DROP PROCEDURE IF EXISTS sp32;
+delimiter //;
+CREATE PROCEDURE sp32( in f1 float(23) unsigned, inout f2 float(23) unsigned, out f3 float(23) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute32;
+delimiter //;
+CREATE PROCEDURE spexecute32()
+BEGIN
+ declare var1 float(23) unsigned;
+ declare var2 float(23) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp32(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute32();
+DROP PROCEDURE spexecute32;
+DROP PROCEDURE sp32;
+
+
+DROP PROCEDURE IF EXISTS sp33;
+delimiter //;
+CREATE PROCEDURE sp33( in f1 float(23) zerofill, inout f2 float(23) zerofill, out f3 float(23) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute33;
+delimiter //;
+CREATE PROCEDURE spexecute33()
+BEGIN
+ declare var1 float(23) zerofill;
+ declare var2 float(23) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp33(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute33();
+DROP PROCEDURE spexecute33;
+DROP PROCEDURE sp33;
+
+
+DROP PROCEDURE IF EXISTS sp34;
+delimiter //;
+CREATE PROCEDURE sp34( in f1 float(24), inout f2 float(24), out f3 float(24), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute34;
+delimiter //;
+CREATE PROCEDURE spexecute34()
+BEGIN
+ declare var1 float(24);
+ declare var2 float(24);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp34(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute34();
+DROP PROCEDURE spexecute34;
+DROP PROCEDURE sp34;
+
+
+DROP PROCEDURE IF EXISTS sp35;
+delimiter //;
+CREATE PROCEDURE sp35( in f1 float(24) unsigned, inout f2 float(24) unsigned, out f3 float(24) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute35;
+delimiter //;
+CREATE PROCEDURE spexecute35()
+BEGIN
+ declare var1 float(24) unsigned;
+ declare var2 float(24) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp35(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute35();
+DROP PROCEDURE spexecute35;
+DROP PROCEDURE sp35;
+
+
+DROP PROCEDURE IF EXISTS sp36;
+delimiter //;
+CREATE PROCEDURE sp36( in f1 float(24) zerofill, inout f2 float(24) zerofill, out f3 float(24) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute36;
+delimiter //;
+CREATE PROCEDURE spexecute36()
+BEGIN
+ declare var1 float(24) zerofill;
+ declare var2 float(24) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp36(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute36();
+DROP PROCEDURE spexecute36;
+DROP PROCEDURE sp36;
+
+
+DROP PROCEDURE IF EXISTS sp37;
+delimiter //;
+CREATE PROCEDURE sp37( in f1 float(53), inout f2 float(53), out f3 float(53), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute37;
+delimiter //;
+CREATE PROCEDURE spexecute37()
+BEGIN
+ declare var1 float(53);
+ declare var2 float(53);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp37(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute37();
+DROP PROCEDURE spexecute37;
+DROP PROCEDURE sp37;
+
+
+DROP PROCEDURE IF EXISTS sp38;
+delimiter //;
+CREATE PROCEDURE sp38( in f1 float(53) unsigned, inout f2 float(53) unsigned, out f3 float(53) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute38;
+delimiter //;
+CREATE PROCEDURE spexecute38()
+BEGIN
+ declare var1 float(53) unsigned;
+ declare var2 float(53) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp38(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute38();
+DROP PROCEDURE spexecute38;
+DROP PROCEDURE sp38;
+
+
+DROP PROCEDURE IF EXISTS sp39;
+delimiter //;
+CREATE PROCEDURE sp39( in f1 float(53) zerofill, inout f2 float(53) zerofill, out f3 float(53) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute39;
+delimiter //;
+CREATE PROCEDURE spexecute39()
+BEGIN
+ declare var1 float(53) zerofill;
+ declare var2 float(53) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp39(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute39();
+DROP PROCEDURE spexecute39;
+DROP PROCEDURE sp39;
+
+
+DROP PROCEDURE IF EXISTS sp40;
+delimiter //;
+CREATE PROCEDURE sp40( in f1 real unsigned, inout f2 real unsigned, out f3 real unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute40;
+delimiter //;
+CREATE PROCEDURE spexecute40()
+BEGIN
+ declare var1 real unsigned;
+ declare var2 real unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.1;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp40(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute40();
+DROP PROCEDURE spexecute40;
+DROP PROCEDURE sp40;
+
+
+DROP PROCEDURE IF EXISTS sp41;
+delimiter //;
+CREATE PROCEDURE sp41( in f1 real unsigned zerofill, inout f2 real unsigned zerofill, out f3 real unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute41;
+delimiter //;
+CREATE PROCEDURE spexecute41()
+BEGIN
+ declare var1 real unsigned zerofill;
+ declare var2 real unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.1;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp41(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute41();
+DROP PROCEDURE spexecute41;
+DROP PROCEDURE sp41;
+
+
+DROP PROCEDURE IF EXISTS sp42;
+delimiter //;
+CREATE PROCEDURE sp42( in f1 real zerofill, inout f2 real zerofill, out f3 real zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute42;
+delimiter //;
+CREATE PROCEDURE spexecute42()
+BEGIN
+ declare var1 real zerofill;
+ declare var2 real zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.1;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp42(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute42();
+DROP PROCEDURE spexecute42;
+DROP PROCEDURE sp42;
+
+
+DROP PROCEDURE IF EXISTS sp43;
+delimiter //;
+CREATE PROCEDURE sp43( in f1 numeric (0), inout f2 numeric (0), out f3 numeric (0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute43;
+delimiter //;
+CREATE PROCEDURE spexecute43()
+BEGIN
+ declare var1 numeric (0);
+ declare var2 numeric (0);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -999999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp43(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute43();
+DROP PROCEDURE spexecute43;
+DROP PROCEDURE sp43;
+
+
+DROP PROCEDURE IF EXISTS sp44;
+delimiter //;
+CREATE PROCEDURE sp44( in f1 numeric (0) unsigned, inout f2 numeric (0) unsigned, out f3 numeric (0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute44;
+delimiter //;
+CREATE PROCEDURE spexecute44()
+BEGIN
+ declare var1 numeric (0) unsigned;
+ declare var2 numeric (0) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 9999999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp44(9999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute44();
+DROP PROCEDURE spexecute44;
+DROP PROCEDURE sp44;
+
+
+DROP PROCEDURE IF EXISTS sp45;
+delimiter //;
+CREATE PROCEDURE sp45( in f1 numeric (0) zerofill, inout f2 numeric (0) zerofill, out f3 numeric (0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute45;
+delimiter //;
+CREATE PROCEDURE spexecute45()
+BEGIN
+ declare var1 numeric (0) zerofill;
+ declare var2 numeric (0) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -99999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp45(-99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute45();
+DROP PROCEDURE spexecute45;
+DROP PROCEDURE sp45;
+
+
+DROP PROCEDURE IF EXISTS sp46;
+delimiter //;
+CREATE PROCEDURE sp46( in f1 numeric (0, 0), inout f2 numeric (0, 0), out f3 numeric (0, 0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute46;
+delimiter //;
+CREATE PROCEDURE spexecute46()
+BEGIN
+ declare var1 numeric (0, 0);
+ declare var2 numeric (0, 0);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -999999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp46(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute46();
+DROP PROCEDURE spexecute46;
+DROP PROCEDURE sp46;
+
+
+DROP PROCEDURE IF EXISTS sp47;
+delimiter //;
+CREATE PROCEDURE sp47( in f1 numeric (0, 0) unsigned, inout f2 numeric (0, 0) unsigned, out f3 numeric (0, 0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute47;
+delimiter //;
+CREATE PROCEDURE spexecute47()
+BEGIN
+ declare var1 numeric (0, 0) unsigned;
+ declare var2 numeric (0, 0) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 9999999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp47(9999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute47();
+DROP PROCEDURE spexecute47;
+DROP PROCEDURE sp47;
+
+
+DROP PROCEDURE IF EXISTS sp48;
+delimiter //;
+CREATE PROCEDURE sp48( in f1 numeric (0, 0) zerofill, inout f2 numeric (0, 0) zerofill, out f3 numeric (0, 0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute48;
+delimiter //;
+CREATE PROCEDURE spexecute48()
+BEGIN
+ declare var1 numeric (0, 0) zerofill;
+ declare var2 numeric (0, 0) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -99999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp48(-99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute48();
+DROP PROCEDURE spexecute48;
+DROP PROCEDURE sp48;
+
+
+DROP PROCEDURE IF EXISTS sp49;
+delimiter //;
+CREATE PROCEDURE sp49( in f1 numeric unsigned, inout f2 numeric unsigned, out f3 numeric unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute49;
+delimiter //;
+CREATE PROCEDURE spexecute49()
+BEGIN
+ declare var1 numeric unsigned;
+ declare var2 numeric unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -999999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp49(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute49();
+DROP PROCEDURE spexecute49;
+DROP PROCEDURE sp49;
+
+
+DROP PROCEDURE IF EXISTS sp50;
+delimiter //;
+CREATE PROCEDURE sp50( in f1 numeric unsigned zerofill, inout f2 numeric unsigned zerofill, out f3 numeric unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute50;
+delimiter //;
+CREATE PROCEDURE spexecute50()
+BEGIN
+ declare var1 numeric unsigned zerofill;
+ declare var2 numeric unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 9999999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp50(9999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute50();
+DROP PROCEDURE spexecute50;
+DROP PROCEDURE sp50;
+
+
+DROP PROCEDURE IF EXISTS sp51;
+delimiter //;
+CREATE PROCEDURE sp51( in f1 numeric zerofill, inout f2 numeric zerofill, out f3 numeric zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute51;
+delimiter //;
+CREATE PROCEDURE spexecute51()
+BEGIN
+ declare var1 numeric zerofill;
+ declare var2 numeric zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -99999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp51(-99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute51();
+DROP PROCEDURE spexecute51;
+DROP PROCEDURE sp51;
+
+
+DROP PROCEDURE IF EXISTS sp52;
+delimiter //;
+CREATE PROCEDURE sp52( in f1 numeric (63, 30), inout f2 numeric (63, 30), out f3 numeric (63, 30), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute52;
+delimiter //;
+eval CREATE PROCEDURE spexecute52()
+BEGIN
+ declare var1 numeric (63, 30);
+ declare var2 numeric (63, 30);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_m36;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp52($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute52();
+DROP PROCEDURE spexecute52;
+DROP PROCEDURE sp52;
+
+
+DROP PROCEDURE IF EXISTS sp53;
+delimiter //;
+CREATE PROCEDURE sp53( in f1 numeric (64), inout f2 numeric (64), out f3 numeric (64), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute53;
+delimiter //;
+eval CREATE PROCEDURE spexecute53()
+BEGIN
+ declare var1 numeric (64);
+ declare var2 numeric (64);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_m40;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp53($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute53();
+DROP PROCEDURE spexecute53;
+DROP PROCEDURE sp53;
+
+
+DROP PROCEDURE IF EXISTS sp54;
+delimiter //;
+CREATE PROCEDURE sp54( in f1 numeric (64) unsigned, inout f2 numeric (64) unsigned, out f3 numeric (64) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute54;
+delimiter //;
+eval CREATE PROCEDURE spexecute54()
+BEGIN
+ declare var1 numeric (64) unsigned;
+ declare var2 numeric (64) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_40;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp54($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute54();
+DROP PROCEDURE spexecute54;
+DROP PROCEDURE sp54;
+
+
+DROP PROCEDURE IF EXISTS sp55;
+delimiter //;
+CREATE PROCEDURE sp55( in f1 numeric (64) zerofill, inout f2 numeric (64) zerofill, out f3 numeric (64) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute55;
+delimiter //;
+eval CREATE PROCEDURE spexecute55()
+BEGIN
+ declare var1 numeric (64) zerofill;
+ declare var2 numeric (64) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_m40;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp55($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute55();
+DROP PROCEDURE spexecute55;
+DROP PROCEDURE sp55;
+
+
+DROP PROCEDURE IF EXISTS sp56;
+delimiter //;
+CREATE PROCEDURE sp56( in f1 year, inout f2 year, out f3 year, in f4 year, inout f5 year, out f6 year, in f7 year, inout f8 year, out f9 year, in f10 year, inout f11 year, out f12 year)
+BEGIN
+ set f1 = f1 + 10; set f2 = f2 + 10; set f3 = f2 + 10;
+ set f4 = f4 + 10; set f5 = f5 + 10; set f6 = f5 + 10;
+ set f7 = f7 + 10; set f8 = f8 + 10; set f9 = f8 + 10;
+ set f10= f10+ 10; set f11 = f11 + 10; set f12 = f11 + 10;
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute56;
+delimiter //;
+CREATE PROCEDURE spexecute56()
+BEGIN
+ declare var1 year;
+ declare var2 year;
+ declare var3 year;
+ declare var4 year;
+ declare var5 year;
+ declare var6 year;
+ declare var7 year;
+ declare var8 year;
+ set var1 = 51;
+ set var3 = 51;
+ set var5 = 51;
+ set var7 = 51;
+ CALL sp56(51, var1, var2, 51, var3, var4, 51, var5, var6, 51, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute56();
+DROP PROCEDURE spexecute56;
+DROP PROCEDURE sp56;
+
+
+DROP PROCEDURE IF EXISTS sp57;
+delimiter //;
+CREATE PROCEDURE sp57( in f1 year(4), inout f2 year(4), out f3 year(4), in f4 year(4), inout f5 year(4), out f6 year(4), in f7 year(4), inout f8 year(4), out f9 year(4), in f10 year(4), inout f11 year(4), out f12 year(4))
+BEGIN
+ set f1 = f1 + 51; set f2 = f2 + 51; set f3 = f2 + 51;
+ set f4 = f4 + 51; set f5 = f5 + 51; set f6 = f5 + 51;
+ set f7 = f7 + 51; set f8 = f8 + 51; set f9 = f8 + 51;
+ set f10 = f10 + 51; set f11 = f11 + 51; set f12 = f11 + 51;
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute57;
+delimiter //;
+CREATE PROCEDURE spexecute57()
+BEGIN
+ declare var1 year(4);
+ declare var2 year(4);
+ declare var3 year(4);
+ declare var4 year(4);
+ declare var5 year(4);
+ declare var6 year(4);
+ declare var7 year(4);
+ declare var8 year(4);
+ set var1 = 1982;
+ set var3 = 1982;
+ set var5 = 1982;
+ set var7 = 1982;
+ CALL sp57(1982, var1, var2, 1982, var3, var4, 1982, var5, var6, 1982, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute57();
+DROP PROCEDURE spexecute57;
+DROP PROCEDURE sp57;
+
+
+DROP PROCEDURE IF EXISTS sp58;
+delimiter //;
+CREATE PROCEDURE sp58( in f1 text, inout f2 text, out f3 text, in f4 text, inout f5 text, out f6 text, in f7 text, inout f8 text, out f9 text, in f10 text, inout f11 text, out f12 text)
+BEGIN
+ set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
+ set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+ set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+ set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute58;
+delimiter //;
+CREATE PROCEDURE spexecute58()
+BEGIN
+ declare var1 text;
+ declare var2 text;
+ declare var3 text;
+ declare var4 text;
+ declare var5 text;
+ declare var6 text;
+ declare var7 text;
+ declare var8 text;
+ set var1 = 'world';
+ set var3 = 'world';
+ set var5 = 'world';
+ set var7 = 'world';
+ CALL sp58( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute58();
+DROP PROCEDURE spexecute58;
+DROP PROCEDURE sp58;
+
+
+DROP PROCEDURE IF EXISTS sp59;
+delimiter //;
+CREATE PROCEDURE sp59( in f1 tinytext, inout f2 tinytext, out f3 tinytext, in f4 tinytext, inout f5 tinytext, out f6 tinytext, in f7 tinytext, inout f8 tinytext, out f9 tinytext, in f10 tinytext, inout f11 tinytext, out f12 tinytext)
+BEGIN
+ set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
+ set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+ set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+ set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute59;
+delimiter //;
+CREATE PROCEDURE spexecute59()
+BEGIN
+ declare var1 tinytext;
+ declare var2 tinytext;
+ declare var3 tinytext;
+ declare var4 tinytext;
+ declare var5 tinytext;
+ declare var6 tinytext;
+ declare var7 tinytext;
+ declare var8 tinytext;
+ set var1 = 'world';
+ set var3 = 'world';
+ set var5 = 'world';
+ set var7 = 'world';
+ CALL sp59( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute59();
+DROP PROCEDURE spexecute59;
+DROP PROCEDURE sp59;
+
+
+DROP PROCEDURE IF EXISTS sp60;
+delimiter //;
+CREATE PROCEDURE sp60( in f1 char, inout f2 char, out f3 char, in f4 char, inout f5 char, out f6 char, in f7 char, inout f8 char, out f9 char, in f10 char, inout f11 char, out f12 char)
+BEGIN
+ set f1 = concat('a', f1); set f2 = concat('a', f2); set f3 = concat('a', f1);
+ set f4 = concat('a', f4); set f5 = concat('a', f5); set f6 = concat('a', f5);
+ set f7 = concat('a', f7); set f8 = concat('a', f8); set f9 = concat('a', f8);
+ set f10 = concat('a', f10); set f11 = concat('a', f11); set f12 = concat('a', f11);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute60;
+delimiter //;
+CREATE PROCEDURE spexecute60()
+BEGIN
+ declare var1 char;
+ declare var2 char;
+ declare var3 char;
+ declare var4 char;
+ declare var5 char;
+ declare var6 char;
+ declare var7 char;
+ declare var8 char;
+ set var1 = 'h';
+ set var3 = 'h';
+ set var5 = 'h';
+ set var7 = 'h';
+ CALL sp60( 'h', var1, var2, 'h', var3, var4, 'h', var5, var6, 'h', var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute60();
+DROP PROCEDURE spexecute60;
+DROP PROCEDURE sp60;
+
+
+DROP PROCEDURE IF EXISTS sp61;
+delimiter //;
+CREATE PROCEDURE sp61( in f1 char ascii, inout f2 char ascii, out f3 char ascii, in f4 char ascii, inout f5 char ascii, out f6 char ascii, in f7 char ascii, inout f8 char ascii, out f9 char ascii, in f10 char ascii, inout f11 char ascii, out f12 char ascii)
+BEGIN
+ set f1 = concat('a', f1); set f2 = concat('a', f2); set f3 = concat('a', f2);
+ set f4 = concat('a', f4); set f5 = concat('a', f5); set f6 = concat('a', f4);
+ set f7 = concat('a', f7); set f8 = concat('a', f8); set f9 = concat('a', f9);
+ set f10 = concat('a', f10); set f11 = concat('a', f11); set f12 = concat('a', f11);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute61;
+delimiter //;
+CREATE PROCEDURE spexecute61()
+BEGIN
+ declare var1 char ascii;
+ declare var2 char ascii;
+ declare var3 char ascii;
+ declare var4 char ascii;
+ declare var5 char ascii;
+ declare var6 char ascii;
+ declare var7 char ascii;
+ declare var8 char ascii;
+ set var1 = 'h';
+ set var3 = 'h';
+ set var5 = 'h';
+ set var7 = 'h';
+ CALL sp61( 'h', var1, var2, 'h', var3, var4, 'h', var5, var6, 'h', var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute61();
+
+DROP PROCEDURE spexecute61;
+DROP PROCEDURE sp61;
+
+
+DROP PROCEDURE IF EXISTS sp62;
+delimiter //;
+CREATE PROCEDURE sp62( in f1 longtext, inout f2 longtext, out f3 longtext, in f4 longtext, inout f5 longtext, out f6 longtext, in f7 longtext, inout f8 longtext, out f9 longtext, in f10 longtext, inout f11 longtext, out f12 longtext)
+BEGIN
+ set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
+ set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+ set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+ set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute62;
+delimiter //;
+CREATE PROCEDURE spexecute62()
+BEGIN
+ declare var1 longtext;
+ declare var2 longtext;
+ declare var3 longtext;
+ declare var4 longtext;
+ declare var5 longtext;
+ declare var6 longtext;
+ declare var7 longtext;
+ declare var8 longtext;
+ set var1 = 'world';
+ set var3 = 'world';
+ set var5 = 'world';
+ set var7 = 'world';
+ CALL sp62( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute62();
+DROP PROCEDURE spexecute62;
+DROP PROCEDURE sp62;
+
+
+DROP PROCEDURE IF EXISTS sp63;
+delimiter //;
+CREATE PROCEDURE sp63( in f1 mediumtext, inout f2 mediumtext, out f3 mediumtext, in f4 mediumtext, inout f5 mediumtext, out f6 mediumtext, in f7 mediumtext, inout f8 mediumtext, out f9 mediumtext, in f10 mediumtext, inout f11 mediumtext, out f12 mediumtext)
+BEGIN
+ set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f3);
+ set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
+ set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
+ set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute63;
+delimiter //;
+CREATE PROCEDURE spexecute63()
+BEGIN
+ declare var1 mediumtext;
+ declare var2 mediumtext;
+ declare var3 mediumtext;
+ declare var4 mediumtext;
+ declare var5 mediumtext;
+ declare var6 mediumtext;
+ declare var7 mediumtext;
+ declare var8 mediumtext;
+ set var1 = 'world';
+ set var3 = 'world';
+ set var5 = 'world';
+ set var7 = 'world';
+ CALL sp63( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute63();
+
+DROP PROCEDURE spexecute63;
+DROP PROCEDURE sp63;
+
+
+DROP PROCEDURE IF EXISTS sp64;
+delimiter //;
+CREATE PROCEDURE sp64( in f1 decimal, inout f2 decimal, out f3 decimal, in f4 decimal, inout f5 decimal, out f6 decimal, in f7 decimal, inout f8 decimal, out f9 decimal, in f10 decimal, inout f11 decimal, out f12 decimal)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
+ set f4 = (f4 / 2); set f4 = (f4 * 2); set f4 = (f4 - 10); set f4 = (f4 + 10); set f5 = (f5 / 2); set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f5 / 2); set f6 = (f5 * 2); set f6 = (f5 - 10); set f6 = (f5 + 10);
+ set f7 = (f7 / 2); set f7 = (f7 * 2); set f7 = (f7 - 10); set f7 = (f7 + 10); set f8 = (f8 / 2); set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f8 / 2); set f9 = (f8 * 2); set f9 = (f8 - 10); set f9 = (f8 + 10);
+ set f10 = (f10 / 2); set f10 = (f10 * 2); set f10 = (f10 - 10); set f10 = (f10 + 10); set f11 = (f11 / 2); set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f11 / 2); set f12 = (f11 * 2); set f12 = (f11 - 10); set f12 = (f11 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute64;
+delimiter //;
+CREATE PROCEDURE spexecute64()
+BEGIN
+ declare var1 decimal;
+ declare var2 decimal;
+ declare var3 decimal;
+ declare var4 decimal;
+ declare var5 decimal;
+ declare var6 decimal;
+ declare var7 decimal;
+ declare var8 decimal;
+ set var1 = --1.00e+09;
+ set var3 = --1.00e+09;
+ set var5 = --1.00e+09;
+ set var7 = --1.00e+09;
+ CALL sp64(--1.00e+09, var1, var2, --1.00e+09, var3, var4, --1.00e+09, var5, var6, --1.00e+09, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute64();
+DROP PROCEDURE spexecute64;
+DROP PROCEDURE sp64;
+
+
+DROP PROCEDURE IF EXISTS sp65;
+delimiter //;
+CREATE PROCEDURE sp65( in f1 decimal (0, 0) unsigned zerofill, inout f2 decimal (0, 0) unsigned zerofill, out f3 decimal (0, 0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute65;
+delimiter //;
+CREATE PROCEDURE spexecute65()
+BEGIN
+ declare var1 decimal (0, 0) unsigned zerofill;
+ declare var2 decimal (0, 0) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 999999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp65(999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute65();
+DROP PROCEDURE spexecute65;
+DROP PROCEDURE sp65;
+
+
+DROP PROCEDURE IF EXISTS sp66;
+delimiter //;
+CREATE PROCEDURE sp66( in f1 decimal (63, 30) unsigned, inout f2 decimal (63, 30) unsigned, out f3 decimal (63, 30) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute66;
+delimiter //;
+CREATE PROCEDURE spexecute66()
+BEGIN
+ declare var1 decimal (63, 30) unsigned;
+ declare var2 decimal (63, 30) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+16;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp66(1.00e+16, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute66();
+DROP PROCEDURE spexecute66;
+DROP PROCEDURE sp66;
+
+
+DROP PROCEDURE IF EXISTS sp67;
+delimiter //;
+CREATE PROCEDURE sp67( in f1 decimal (63, 30) unsigned zerofill, inout f2 decimal (63, 30) unsigned zerofill, out f3 decimal (63, 30) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute67;
+delimiter //;
+CREATE PROCEDURE spexecute67()
+BEGIN
+ declare var1 decimal (63, 30) unsigned zerofill;
+ declare var2 decimal (63, 30) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+16;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp67(1.00e+16, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute67();
+DROP PROCEDURE spexecute67;
+DROP PROCEDURE sp67;
+
+
+DROP PROCEDURE IF EXISTS sp68;
+delimiter //;
+CREATE PROCEDURE sp68( in f1 decimal (63, 30) zerofill, inout f2 decimal (63, 30) zerofill, out f3 decimal (63, 30) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute68;
+delimiter //;
+CREATE PROCEDURE spexecute68()
+BEGIN
+ declare var1 decimal (63, 30) zerofill;
+ declare var2 decimal (63, 30) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -1.00e+21;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp68(-1.00e+21, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute68();
+DROP PROCEDURE spexecute68;
+DROP PROCEDURE sp68;
+
+
+DROP PROCEDURE IF EXISTS sp69;
+delimiter //;
+CREATE PROCEDURE sp69( in f1 decimal (64), inout f2 decimal (64), out f3 decimal (64), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute69;
+delimiter //;
+eval CREATE PROCEDURE spexecute69()
+BEGIN
+ declare var1 decimal (64);
+ declare var2 decimal (64);
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_m30;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp69($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute69();
+DROP PROCEDURE spexecute69;
+DROP PROCEDURE sp69;
+
+
+DROP PROCEDURE IF EXISTS sp70;
+delimiter //;
+CREATE PROCEDURE sp70( in f1 decimal (64) unsigned, inout f2 decimal (64) unsigned, out f3 decimal (64) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute70;
+delimiter //;
+eval CREATE PROCEDURE spexecute70()
+BEGIN
+ declare var1 decimal (64) unsigned;
+ declare var2 decimal (64) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_20;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp70($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute70();
+DROP PROCEDURE spexecute70;
+DROP PROCEDURE sp70;
+
+
+DROP PROCEDURE IF EXISTS sp71;
+delimiter //;
+CREATE PROCEDURE sp71( in f1 decimal (64) unsigned zerofill, inout f2 decimal (64) unsigned zerofill, out f3 decimal (64) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute71;
+delimiter //;
+eval CREATE PROCEDURE spexecute71()
+BEGIN
+ declare var1 decimal (64) unsigned zerofill;
+ declare var2 decimal (64) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_24;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp71($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute71();
+DROP PROCEDURE spexecute71;
+DROP PROCEDURE sp71;
+
+
+DROP PROCEDURE IF EXISTS sp72;
+delimiter //;
+CREATE PROCEDURE sp72( in f1 decimal (64) zerofill, inout f2 decimal (64) zerofill, out f3 decimal (64) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute72;
+delimiter //;
+CREATE PROCEDURE spexecute72()
+BEGIN
+ declare var1 decimal (64) zerofill;
+ declare var2 decimal (64) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp72(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute72();
+DROP PROCEDURE spexecute72;
+DROP PROCEDURE sp72;
+
+
+DROP PROCEDURE IF EXISTS sp73;
+delimiter //;
+CREATE PROCEDURE sp73( in f1 decimal unsigned, inout f2 decimal unsigned, out f3 decimal unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute73;
+delimiter //;
+CREATE PROCEDURE spexecute73()
+BEGIN
+ declare var1 decimal unsigned;
+ declare var2 decimal unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp73(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute73();
+DROP PROCEDURE spexecute73;
+DROP PROCEDURE sp73;
+
+
+DROP PROCEDURE IF EXISTS sp74;
+delimiter //;
+CREATE PROCEDURE sp74( in f1 decimal unsigned zerofill, inout f2 decimal unsigned zerofill, out f3 decimal unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute74;
+delimiter //;
+CREATE PROCEDURE spexecute74()
+BEGIN
+ declare var1 decimal unsigned zerofill;
+ declare var2 decimal unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp74(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute74();
+DROP PROCEDURE spexecute74;
+DROP PROCEDURE sp74;
+
+
+DROP PROCEDURE IF EXISTS sp75;
+delimiter //;
+CREATE PROCEDURE sp75( in f1 decimal zerofill, inout f2 decimal zerofill, out f3 decimal zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute75;
+delimiter //;
+CREATE PROCEDURE spexecute75()
+BEGIN
+ declare var1 decimal zerofill;
+ declare var2 decimal zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -1.00e+09;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp75(-1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute75();
+DROP PROCEDURE spexecute75;
+DROP PROCEDURE sp75;
+
+
+DROP PROCEDURE IF EXISTS sp76;
+delimiter //;
+CREATE PROCEDURE sp76( in f1 float(0) unsigned zerofill, inout f2 float(0) unsigned zerofill, out f3 float(0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute76;
+delimiter //;
+CREATE PROCEDURE spexecute76()
+BEGIN
+ declare var1 float(0) unsigned zerofill;
+ declare var2 float(0) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp76(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute76();
+DROP PROCEDURE spexecute76;
+DROP PROCEDURE sp76;
+
+
+DROP PROCEDURE IF EXISTS sp77;
+delimiter //;
+CREATE PROCEDURE sp77( in f1 float(23) unsigned zerofill, inout f2 float(23) unsigned zerofill, out f3 float(23) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute77;
+delimiter //;
+CREATE PROCEDURE spexecute77()
+BEGIN
+ declare var1 float(23) unsigned zerofill;
+ declare var2 float(23) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp77(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute77();
+DROP PROCEDURE spexecute77;
+DROP PROCEDURE sp77;
+
+
+DROP PROCEDURE IF EXISTS sp78;
+delimiter //;
+CREATE PROCEDURE sp78( in f1 float(24) unsigned zerofill, inout f2 float(24) unsigned zerofill, out f3 float(24) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute78;
+delimiter //;
+CREATE PROCEDURE spexecute78()
+BEGIN
+ declare var1 float(24) unsigned zerofill;
+ declare var2 float(24) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp78(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute78();
+DROP PROCEDURE spexecute78;
+DROP PROCEDURE sp78;
+
+
+DROP PROCEDURE IF EXISTS sp79;
+delimiter //;
+CREATE PROCEDURE sp79( in f1 float(53) unsigned zerofill, inout f2 float(53) unsigned zerofill, out f3 float(53) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute79;
+delimiter //;
+CREATE PROCEDURE spexecute79()
+BEGIN
+ declare var1 float(53) unsigned zerofill;
+ declare var2 float(53) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 1.00e+00;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp79(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute79();
+DROP PROCEDURE spexecute79;
+DROP PROCEDURE sp79;
+
+
+DROP PROCEDURE IF EXISTS sp80;
+delimiter //;
+CREATE PROCEDURE sp80( in f1 int, inout f2 int, out f3 int, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute80;
+delimiter //;
+CREATE PROCEDURE spexecute80()
+BEGIN
+ declare var1 int;
+ declare var2 int;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -2.15e+09;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp80(-2.15e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute80();
+DROP PROCEDURE spexecute80;
+DROP PROCEDURE sp80;
+
+
+DROP PROCEDURE IF EXISTS sp81;
+delimiter //;
+CREATE PROCEDURE sp81( in f1 int unsigned, inout f2 int unsigned, out f3 int unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute81;
+delimiter //;
+CREATE PROCEDURE spexecute81()
+BEGIN
+ declare var1 int unsigned;
+ declare var2 int unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 4.29e+09;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp81(4.29e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute81();
+DROP PROCEDURE spexecute81;
+DROP PROCEDURE sp81;
+
+
+DROP PROCEDURE IF EXISTS sp82;
+delimiter //;
+CREATE PROCEDURE sp82( in f1 int unsigned zerofill, inout f2 int unsigned zerofill, out f3 int unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute82;
+delimiter //;
+CREATE PROCEDURE spexecute82()
+BEGIN
+ declare var1 int unsigned zerofill;
+ declare var2 int unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 4.29e+09;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp82(4.29e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute82();
+DROP PROCEDURE spexecute82;
+DROP PROCEDURE sp82;
+
+
+DROP PROCEDURE IF EXISTS sp83;
+delimiter //;
+CREATE PROCEDURE sp83( in f1 int zerofill, inout f2 int zerofill, out f3 int zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute83;
+delimiter //;
+CREATE PROCEDURE spexecute83()
+BEGIN
+ declare var1 int zerofill;
+ declare var2 int zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 2.15e+08;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp83(2.15e+08, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute83();
+DROP PROCEDURE spexecute83;
+DROP PROCEDURE sp83;
+
+
+DROP PROCEDURE IF EXISTS sp84;
+delimiter //;
+CREATE PROCEDURE sp84( in f1 mediumint, inout f2 mediumint, out f3 mediumint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute84;
+delimiter //;
+CREATE PROCEDURE spexecute84()
+BEGIN
+ declare var1 mediumint;
+ declare var2 mediumint;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -8388600;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp84(-8388600, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute84();
+DROP PROCEDURE spexecute84;
+DROP PROCEDURE sp84;
+
+
+DROP PROCEDURE IF EXISTS sp85;
+delimiter //;
+CREATE PROCEDURE sp85( in f1 mediumint unsigned, inout f2 mediumint unsigned, out f3 mediumint unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute85;
+delimiter //;
+CREATE PROCEDURE spexecute85()
+BEGIN
+ declare var1 mediumint unsigned;
+ declare var2 mediumint unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 16777201;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp85(16777201, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute85();
+DROP PROCEDURE spexecute85;
+DROP PROCEDURE sp85;
+
+
+DROP PROCEDURE IF EXISTS sp86;
+delimiter //;
+CREATE PROCEDURE sp86( in f1 mediumint unsigned zerofill, inout f2 mediumint unsigned zerofill, out f3 mediumint unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute86;
+delimiter //;
+CREATE PROCEDURE spexecute86()
+BEGIN
+ declare var1 mediumint unsigned zerofill;
+ declare var2 mediumint unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 16777210;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp86(16777210, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute86();
+DROP PROCEDURE spexecute86;
+DROP PROCEDURE sp86;
+
+
+DROP PROCEDURE IF EXISTS sp87;
+delimiter //;
+CREATE PROCEDURE sp87( in f1 mediumint zerofill, inout f2 mediumint zerofill, out f3 mediumint zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute87;
+delimiter //;
+CREATE PROCEDURE spexecute87()
+BEGIN
+ declare var1 mediumint zerofill;
+ declare var2 mediumint zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -8388601;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp87(-8388601, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute87();
+DROP PROCEDURE spexecute87;
+DROP PROCEDURE sp87;
+
+
+DROP PROCEDURE IF EXISTS sp88;
+delimiter //;
+CREATE PROCEDURE sp88( in f1 numeric (0) unsigned zerofill, inout f2 numeric (0) unsigned zerofill, out f3 numeric (0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute88;
+delimiter //;
+CREATE PROCEDURE spexecute88()
+BEGIN
+ declare var1 numeric (0) unsigned zerofill;
+ declare var2 numeric (0) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 99999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp88(99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute88();
+DROP PROCEDURE spexecute88;
+DROP PROCEDURE sp88;
+
+
+DROP PROCEDURE IF EXISTS sp89;
+delimiter //;
+CREATE PROCEDURE sp89( in f1 numeric (0, 0) unsigned zerofill, inout f2 numeric (0, 0) unsigned zerofill, out f3 numeric (0, 0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute89;
+delimiter //;
+CREATE PROCEDURE spexecute89()
+BEGIN
+ declare var1 numeric (0, 0) unsigned zerofill;
+ declare var2 numeric (0, 0) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 99999999;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp89(99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute89();
+DROP PROCEDURE spexecute89;
+DROP PROCEDURE sp89;
+
+
+DROP PROCEDURE IF EXISTS sp90;
+delimiter //;
+CREATE PROCEDURE sp90( in f1 numeric (63, 30) unsigned, inout f2 numeric (63, 30) unsigned, out f3 numeric (63, 30) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute90;
+delimiter //;
+eval CREATE PROCEDURE spexecute90()
+BEGIN
+ declare var1 numeric (63, 30) unsigned;
+ declare var2 numeric (63, 30) unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_36;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp90($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+#FIXME: hpux11 - check later again with E+40
+CALL spexecute90();
+DROP PROCEDURE spexecute90;
+DROP PROCEDURE sp90;
+
+
+DROP PROCEDURE IF EXISTS sp91;
+delimiter //;
+CREATE PROCEDURE sp91( in f1 numeric (63, 30) unsigned zerofill, inout f2 numeric (63, 30) unsigned zerofill, out f3 numeric (63, 30) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute91;
+delimiter //;
+eval CREATE PROCEDURE spexecute91()
+BEGIN
+ declare var1 numeric (63, 30) unsigned zerofill;
+ declare var2 numeric (63, 30) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_36;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp91($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+#FIXME: hpux11 - check later again with E+40
+CALL spexecute91();
+DROP PROCEDURE spexecute91;
+DROP PROCEDURE sp91;
+
+
+DROP PROCEDURE IF EXISTS sp92;
+delimiter //;
+CREATE PROCEDURE sp92( in f1 numeric (63, 30) zerofill, inout f2 numeric (63, 30) zerofill, out f3 numeric (63, 30) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute92;
+delimiter //;
+eval CREATE PROCEDURE spexecute92()
+BEGIN
+ declare var1 numeric (63, 30) zerofill;
+ declare var2 numeric (63, 30) zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_m36;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp92($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute92();
+DROP PROCEDURE spexecute92;
+DROP PROCEDURE sp92;
+
+
+DROP PROCEDURE IF EXISTS sp93;
+delimiter //;
+CREATE PROCEDURE sp93( in f1 numeric (64) unsigned zerofill, inout f2 numeric (64) unsigned zerofill, out f3 numeric (64) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute93;
+delimiter //;
+eval CREATE PROCEDURE spexecute93()
+BEGIN
+ declare var1 numeric (64) unsigned zerofill;
+ declare var2 numeric (64) unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = $procvar01_40;
+ set var3 = $procvar03;
+ set var5 = $procvar05;
+ set var7 = $procvar07;
+ CALL sp93($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute93();
+DROP PROCEDURE spexecute93;
+DROP PROCEDURE sp93;
+
+
+DROP PROCEDURE IF EXISTS sp94;
+delimiter //;
+CREATE PROCEDURE sp94( in f1 smallint, inout f2 smallint, out f3 smallint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute94;
+delimiter //;
+CREATE PROCEDURE spexecute94()
+BEGIN
+ declare var1 smallint;
+ declare var2 smallint;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -32701;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp94(-32701, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute94();
+DROP PROCEDURE spexecute94;
+DROP PROCEDURE sp94;
+
+
+DROP PROCEDURE IF EXISTS sp95;
+delimiter //;
+CREATE PROCEDURE sp95( in f1 smallint unsigned, inout f2 smallint unsigned, out f3 smallint unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute95;
+delimiter //;
+CREATE PROCEDURE spexecute95()
+BEGIN
+ declare var1 smallint unsigned;
+ declare var2 smallint unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 65531;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp95(65531, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute95();
+DROP PROCEDURE spexecute95;
+DROP PROCEDURE sp95;
+
+
+DROP PROCEDURE IF EXISTS sp96;
+delimiter //;
+CREATE PROCEDURE sp96( in f1 smallint unsigned zerofill, inout f2 smallint unsigned zerofill, out f3 smallint unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute96;
+delimiter //;
+CREATE PROCEDURE spexecute96()
+BEGIN
+ declare var1 smallint unsigned zerofill;
+ declare var2 smallint unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 65531;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp96(65531, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute96();
+DROP PROCEDURE spexecute96;
+DROP PROCEDURE sp96;
+
+
+DROP PROCEDURE IF EXISTS sp97;
+delimiter //;
+CREATE PROCEDURE sp97( in f1 smallint zerofill, inout f2 smallint zerofill, out f3 smallint zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute97;
+delimiter //;
+CREATE PROCEDURE spexecute97()
+BEGIN
+ declare var1 smallint zerofill;
+ declare var2 smallint zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -32601;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp97(-32601, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute97();
+DROP PROCEDURE spexecute97;
+DROP PROCEDURE sp97;
+
+
+DROP PROCEDURE IF EXISTS sp98;
+delimiter //;
+CREATE PROCEDURE sp98( in f1 tinyint, inout f2 tinyint, out f3 tinyint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute98;
+delimiter //;
+CREATE PROCEDURE spexecute98()
+BEGIN
+ declare var1 tinyint;
+ declare var2 tinyint;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -115;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp98(-115, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute98();
+DROP PROCEDURE spexecute98;
+DROP PROCEDURE sp98;
+
+
+DROP PROCEDURE IF EXISTS sp99;
+delimiter //;
+CREATE PROCEDURE sp99( in f1 tinyint unsigned, inout f2 tinyint unsigned, out f3 tinyint unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute99;
+delimiter //;
+CREATE PROCEDURE spexecute99()
+BEGIN
+ declare var1 tinyint unsigned;
+ declare var2 tinyint unsigned;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 251;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp99(251, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute99();
+DROP PROCEDURE spexecute99;
+DROP PROCEDURE sp99;
+
+
+DROP PROCEDURE IF EXISTS sp100;
+delimiter //;
+CREATE PROCEDURE sp100( in f1 tinyint unsigned zerofill, inout f2 tinyint unsigned zerofill, out f3 tinyint unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute100;
+delimiter //;
+CREATE PROCEDURE spexecute100()
+BEGIN
+ declare var1 tinyint unsigned zerofill;
+ declare var2 tinyint unsigned zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = 201;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp100(201, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute100();
+DROP PROCEDURE spexecute100;
+DROP PROCEDURE sp100;
+
+
+DROP PROCEDURE IF EXISTS sp101;
+delimiter //;
+CREATE PROCEDURE sp101( in f1 tinyint zerofill, inout f2 tinyint zerofill, out f3 tinyint zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
+BEGIN
+ set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
+ set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
+ set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
+ set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
+ SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
+END//
+delimiter ;//
+
+DROP PROCEDURE IF EXISTS spexecute101;
+delimiter //;
+CREATE PROCEDURE spexecute101()
+BEGIN
+ declare var1 tinyint zerofill;
+ declare var2 tinyint zerofill;
+ declare var3 bigint;
+ declare var4 bigint;
+ declare var5 bigint;
+ declare var6 bigint;
+ declare var7 bigint;
+ declare var8 bigint;
+ set var1 = -101;
+ set var3 = -9.22e+18;
+ set var5 = -9.22e+18;
+ set var7 = -9.22e+18;
+ CALL sp101(-101, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
+ SELECT var1, var2, var3, var4, var5, var6, var7, var8;
+END//
+delimiter ;//
+
+CALL spexecute101();
+DROP PROCEDURE spexecute101;
+DROP PROCEDURE sp101;
+
+USE db_storedproc;
+DROP DATABASE db1;
+
+
+
+USE db_storedproc;
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.7.2:
+FIXME: a wrong testcase number and/or description has been detected here. This
+FIXME: needs to be checked to be sure where the missing testcase is located.
+.
+check for "allow_invalid_dates" server sql mode
+;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp2;
+drop table IF EXISTS temp_table;
+--enable_warnings
+
+create table temp_table (f1 datetime);
+
+set @@sql_mode = 'allow_invalid_dates';
+
+delimiter //;
+CREATE PROCEDURE sp2 ()
+BEGIN
+ declare a datetime;
+ set a = '2005-03-14 01:01:02';
+ insert into temp_table values(a);
+END//
+delimiter ;//
+
+show CREATE PROCEDURE sp2;
+
+set @@sql_mode = 'traditional';
+
+CALL sp2 ();
+SELECT * from temp_table;
+
+SELECT @@sql_mode;
+
+# cleanup
+DROP PROCEDURE sp2;
+drop table temp_table;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.7.3:
+FIXME: a wrong testcase number and/or description has been detected here. This
+FIXME: needs to be checked to be sure where the missing testcase is located.
+.
+check for *high_not_precedence* server sql mode
+;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp3;
+--enable_warnings
+
+set @@sql_mode = 'high_not_precedence';
+
+delimiter //;
+CREATE PROCEDURE sp3()
+BEGIN
+ declare a int signed;
+ declare b int unsigned;
+ set a = -5;
+ set b = 5;
+ SELECT not 1 between a and b;
+END//
+delimiter ;//
+
+show CREATE PROCEDURE sp3;
+
+set @@sql_mode='';
+
+CALL sp3();
+SELECT @@sql_mode;
+
+# cleanup
+DROP PROCEDURE sp3;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.7.4:
+FIXME: a wrong testcase number and/or description has been detected here. This
+FIXME: needs to be checked to be sure where the missing testcase is located.
+.
+check for combination of server sql modes
+;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp4;
+--enable_warnings
+
+set @@sql_mode = 'ansi, error_for_division_by_zero';
+
+# now set the corrent value:
+set @@sql_mode = 'ansi,error_for_division_by_zero';
+
+SHOW VARIABLES LIKE 'sql_mode';
+
+delimiter //;
+CREATE PROCEDURE sp4()
+BEGIN
+ declare a int;
+ declare b int;
+ declare c int;
+ set a = 0;
+ set b = 1;
+ set c = b/a;
+ show warnings;
+END//
+delimiter ;//
+
+show CREATE PROCEDURE sp4;
+
+set @@sql_mode='';
+
+CALL sp4();
+
+# cleanup
+DROP PROCEDURE sp4;
+set @@sql_mode='';
+
+
+# ==============================================================================
+let $message= Section 3.1.8 - SHOW statement checks:;
+--source include/show_msg80.inc
+
+
+USE db_storedproc;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.1:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the definition of a procedure is properly recorded and displayed when a show create
+# procedure statement is executed.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+DROP PROCEDURE IF EXISTS sp6a;
+DROP PROCEDURE IF EXISTS sp6b;
+DROP PROCEDURE IF EXISTS sp6c;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6a (i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real)
+language sql
+BEGIN
+ set @x=i1;
+ set @y=@x;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE sp6b (out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real)
+deterministic
+BEGIN
+ set @x=i1;
+ set @y=@x;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE sp6c (inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) comment 'this is a comment'
+BEGIN
+ set @x=i1;
+ set @y=@x;
+END//
+delimiter ;//
+
+show CREATE PROCEDURE sp6a;
+
+show CREATE PROCEDURE sp6b;
+
+show CREATE PROCEDURE sp6c;
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE status like 'sp6a';
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE status like 'sp6b';
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE status like 'sp6c';
+
+# cleanup
+DROP PROCEDURE sp6a;
+DROP PROCEDURE sp6b;
+DROP PROCEDURE sp6c;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.2:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the definition of a procedure is properly recorded and displayed when a show procedure
+# status statement is executed.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x=i1;
+ set @y=@x;
+END//
+delimiter ;//
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE status like 'sp6';
+
+# cleanup
+DROP PROCEDURE sp6;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.3:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the definition of a procedure is not displayed when a show create function
+# statement is executed.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x=i1;
+ set @y=@x;
+END//
+delimiter ;//
+
+--error ER_SP_DOES_NOT_EXIST
+SHOW CREATE FUNCTION sp6;
+
+# cleanup
+DROP PROCEDURE sp6;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.4:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the definition of a procedure is properly recorded and displayed when a show function
+# status statement is executed.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns longtext
+ BEGIN
+ set @x=i1;
+ set @y=@x;
+ return 0;
+END//
+delimiter ;//
+
+--replace_column 5 <modified> 6 <created>
+ show function status like 'sp6';
+
+# cleanup
+DROP FUNCTION sp6;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.5:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the attempt to execute show CREATE PROCEDURE with the name of a non-existing
+# procedure fails with an appropriate error message.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp7;
+--enable_warnings
+
+--error ER_SP_DOES_NOT_EXIST
+ show CREATE PROCEDURE sp7;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.6:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the attempt to execute SHOW PROCEDURE status with the name of a non-existing
+# procedure returns an empty set.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+ show procedure status like 'sp6';
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.7:;
+--source include/show_msg80.inc
+
+# testcase: ensure that an attempt to execute show CREATE PROCEDURE with the name of a function fails
+# with an appropriate error message.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1 (i1 real) returns real
+ BEGIN
+ return i1;
+END//
+delimiter ;//
+
+--error ER_SP_DOES_NOT_EXIST
+ show CREATE PROCEDURE fn1;
+
+# cleanup
+DROP FUNCTION fn1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.8:;
+--source include/show_msg80.inc
+
+# testcase: ensure that an attempt to execute SHOW PROCEDURE status with the name of a
+# function returns an empty set.
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1 (i1 real) returns real
+ BEGIN
+ return i1;
+END//
+delimiter ;//
+
+--replace_column 5 <modified> 6 <created>
+ show procedure status like 'fn1';
+
+# cleanup
+DROP FUNCTION fn1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.9:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the definition of a function is properly recorded and displayed when a
+# show CREATE FUNCTION statement is executed.
+
+# part of 3.1.8.9
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.10:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the definition of a function is properly recorded and displayed when a
+# SHOW FUNCTION status.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1 (i1 real) returns real
+BEGIN
+ return i1;
+END//
+delimiter ;//
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+# cleanup
+DROP FUNCTION fn1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.11:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the definition of a function is not displayed when a
+# show CREATE PROCEDURE statement is executed.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1 (x int) returns int
+ BEGIN
+ return x;
+END//
+delimiter ;//
+
+--error ER_SP_DOES_NOT_EXIST
+ show CREATE PROCEDURE fn1;
+
+# cleanup
+DROP FUNCTION fn1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.12:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the attempt to execute show CREATE FUNCTION with the name of a
+# non-existing function fails with an appropriate error message.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1(x int) returns int
+ BEGIN
+ return x;
+END//
+delimiter ;//
+
+DROP FUNCTION fn1;
+
+--error ER_SP_DOES_NOT_EXIST
+ show CREATE FUNCTION fn1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.13:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the attempt to execute show function status with the name of a
+# non-existing function returns an empty set.
+
+
+--disable_warnings
+DROP FUNCTION IF EXISTS f1000;
+--enable_warnings
+
+SHOW FUNCTION STATUS LIKE 'f1000';
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.14:;
+--source include/show_msg80.inc
+
+# testcase: ensure that an attempt to execute show CREATE FUNCTION with the name of a procedure
+# fails with an appropriate error message.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1()
+BEGIN
+ SELECT * from t8;
+END//
+delimiter ;//
+
+--error ER_SP_DOES_NOT_EXIST
+ show CREATE FUNCTION sp1;
+
+# cleanup
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.15:;
+--source include/show_msg80.inc
+
+# testcase: ensure that an attempt to execute show function status with the name of a procedure fails with an
+# appropriate error message.
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x=i1;
+ set @y=@x;
+END//
+delimiter ;//
+
+--replace_column 5 <modified> 6 <created>
+ show function status like 'sp6';
+
+# cleanup
+DROP PROCEDURE sp6;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.16:;
+--source include/show_msg80.inc
+
+# testcase: ensure that all stored procedure changes made with alter procedure are properly recorded
+# and displayed when a show CREATE PROCEDURE statement is executed.
+
+# part of 3.1.8.9
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.17:;
+--source include/show_msg80.inc
+
+# testcase: ensure that all stored procedure changes made with alter procedure are properly recorded
+# and displayed when a SHOW PROCEDURE status statement is executed.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x=i1;
+ set @y=@x;
+END//
+delimiter ;//
+
+ alter procedure sp6 sql security invoker;
+
+ alter procedure sp6 comment 'this is a new comment';
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE status like 'sp6';
+
+# cleanup
+DROP PROCEDURE sp6;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.18:;
+--source include/show_msg80.inc
+
+# testcase: ensure that all stored procedure changes made with alter function are properly recorded
+# and displayed when a show CREATE FUNCTION statement is executed.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1 (x int) returns int
+ BEGIN
+ return x;
+END//
+delimiter ;//
+
+ alter function fn1 sql security invoker;
+
+ show create function fn1;
+
+# cleanup
+DROP FUNCTION fn1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.19:;
+--source include/show_msg80.inc
+
+# testcase: ensure that all function changes made with alter function are properly recorded and
+# displayed when a show function status statement is executed.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1 (i1 longtext) returns longtext
+ BEGIN
+ return i1;
+END//
+delimiter ;//
+
+ alter function fn1 sql security invoker;
+ alter function fn1 comment 'this is a function 3242#@%$#@';
+
+--replace_column 5 <modified> 6 <created>
+ show function status like 'fn1';
+
+# cleanup
+DROP FUNCTION fn1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.20:;
+--source include/show_msg80.inc
+
+# testcase: ensure that all stored procedure changes made with alter procedure are properly
+# recorded and displayed when a show CREATE PROCEDURE statement is executed.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 int , i2 int)
+BEGIN
+ set @x=i1;
+ set @y=@x;
+END//
+delimiter ;//
+
+ alter procedure sp6 comment 'this is simple';
+
+ show CREATE PROCEDURE sp6;
+
+# cleanup
+DROP PROCEDURE sp6;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.21:;
+--source include/show_msg80.inc
+
+# testcase: ensure that when a stored procedure is dropped, its definition no longer appears when
+# a show CREATE PROCEDURE is executed.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 int, i2 int)
+BEGIN
+ set @x=i1;
+ set @y=@x;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp6;
+
+--error ER_SP_DOES_NOT_EXIST
+ show CREATE PROCEDURE sp6;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.22:;
+--source include/show_msg80.inc
+
+# testcase: ensure that when a stored procedure is dropped, its definition no longer appears when
+# SHOW PROCEDURE status.
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x=i3;
+ set @y=@x;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp6;
+
+--replace_column 5 <modified> 6 <created>
+SHOW PROCEDURE status like 'sp6';
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.23:;
+--source include/show_msg80.inc
+
+# testcase: ensure that when a stored procedure is dropped, its definition no longer appears
+# when a statement or a show CREATE FUNCTION statement is executed.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1 (x int) returns int
+ BEGIN
+ return x;
+END//
+delimiter ;//
+
+DROP FUNCTION fn1;
+
+--error ER_SP_DOES_NOT_EXIST
+ show CREATE FUNCTION fn1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.8.24:;
+--source include/show_msg80.inc
+
+# testcase: ensure that when a function is dropped, its definition no longer appears when a
+# SHOW FUNCTION status statement is executed.
+# suppressed: the test does not display an error message. it just returns an empty set
+
+--disable_warnings
+DROP FUNCTION IF EXISTS fn1;
+--enable_warnings
+
+delimiter //;
+CREATE FUNCTION fn1 (i1 longtext) returns longtext
+BEGIN
+ return i1;
+END//
+delimiter ;//
+
+DROP FUNCTION fn1;
+
+--replace_column 5 <modified> 6 <created>
+SHOW FUNCTION STATUS LIKE 'fn1';
+
+
+# ==============================================================================
+let $message= Section 3.1.9 - Routine body checks:;
+--source include/show_msg80.inc
+
+USE db_storedproc;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.9.1:;
+--source include/show_msg80.inc
+
+# testcase: verify SELECT sql statements that may be executed by a stored procedure.
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x = i3;
+ set @a = i5;
+ set @y = @x;
+ set @b = @a;
+ SELECT * from t9 limit 0, 100;
+END//
+delimiter ;//
+
+--sorted_result
+CALL sp6 (10, 20, 30, 40, 50);
+
+# cleanup
+DROP PROCEDURE sp6;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.9.2:;
+--source include/show_msg80.inc
+
+# testcase: verify insert sql statements that can be executed by a stored procedure.
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+--enable_warnings
+
+ create table res_t9 (f1 int, f2 char(25), f3 int);
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x = i3;
+ set @a = i5;
+ set @y = @x;
+ set @b = @a;
+ insert into res_t9 values (@y, @a, 111);
+ SELECT * from res_t9;
+END//
+delimiter ;//
+
+CALL sp6 (10, 20, 30, 40, 50);
+
+# cleanup
+DROP PROCEDURE sp6;
+drop table res_t9;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.9.3:;
+--source include/show_msg80.inc
+
+# testcase: verify delete sql statements that may be executed by a stored procedure.
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+--enable_warnings
+
+ create table res_t9 (f1 int, f2 char(25), f3 int);
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x = i3;
+ set @a = i5;
+ set @y = @x;
+ set @b = @a;
+ insert into res_t9 values (@y, @a, 111);
+ SELECT * from res_t9;
+ delete from res_t9;
+ SELECT * from res_t9;
+END//
+delimiter ;//
+
+
+CALL sp6 (10, 20, 30, 40, 50);
+
+# cleanup
+DROP PROCEDURE sp6;
+drop table res_t9;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.9.4:;
+--source include/show_msg80.inc
+
+# testcase: verify update sql statements that may be executed by a stored procedure.
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+--enable_warnings
+
+ create table res_t9 (f1 int, f2 char(25), f3 int);
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x = i3;
+ set @a = i5;
+ set @y = @x;
+ set @b = @a;
+ insert into res_t9 values (@y, @a, 111);
+ SELECT * from res_t9;
+ update res_t9 set f2 = 1000 where f2 = 50;
+ SELECT * from res_t9;
+END//
+delimiter ;//
+
+CALL sp6 (10, 20, 30, 40, 50);
+
+# cleanup
+DROP PROCEDURE sp6;
+drop table res_t9;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.9.5:;
+--source include/show_msg80.inc
+
+# testcase: verify create sql statements that may be executed by a stored procedure
+#
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x = i1;
+ set @y = i3;
+ set @z = i5;
+ set @a = @x;
+ set @b = @y;
+ set @c = @z;
+ create table res_t9(f1 longtext, f2 longblob, f3 real);
+ insert into res_t9 values (@a, @b, @c);
+ SELECT * from res_t9;
+END//
+delimiter ;//
+
+CALL sp6 (10, 20, 30, 40, 50);
+
+# cleanup
+DROP PROCEDURE sp6;
+--disable_warnings
+drop table IF EXISTS res_t9;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.9.6:;
+--source include/show_msg80.inc
+
+# testcase: verify select/insert/update/create statements are disallowed in a function.
+# updated testcase: verify select/insert/update/create statements are ALLOWED in a function.
+#
+DROP FUNCTION IF EXISTS fn1;
+
+delimiter //;
+--error ER_SP_NO_RETSET
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+ SELECT * from t9 limit 0, 100;
+ return i1;
+END//
+delimiter ;//
+
+DROP FUNCTION IF EXISTS fn1;
+drop table IF EXISTS res_t9;
+
+create table res_t9 (f1 int, f2 char(25), f3 int);
+insert into res_t9 values (10, 'abc', 20);
+
+delimiter //;
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+ delete from res_t9;
+ drop table res_t9;
+ return i1;
+END//
+delimiter ;//
+
+DROP FUNCTION IF EXISTS fn1;
+drop table IF EXISTS res_t9;
+
+delimiter //;
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+ create table res_t9 (f1 longtext, f2 longblob, f3 real);
+ drop table res_t9;
+ return i1;
+END//
+delimiter ;//
+
+DROP FUNCTION IF EXISTS fn1;
+drop table IF EXISTS res_t9;
+
+create table res_t9 (f1 int, f2 char(25), f3 int);
+
+delimiter //;
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+ insert into res_t9 values (100, 'abc', 300);
+ drop table res_t9;
+ return i1;
+END//
+delimiter ;//
+
+DROP FUNCTION IF EXISTS fn1;
+drop table IF EXISTS res_t9;
+
+create table res_t9 (f1 int, f2 char(25), f3 int);
+insert into res_t9 values (10, 'abc', 20);
+
+delimiter //;
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+CREATE FUNCTION fn1(i1 longtext) returns longtext
+BEGIN
+ update res_t9 set f1 = 20;
+ drop table res_t9;
+ return i1;
+END//
+delimiter ;//
+
+# cleanup
+drop table res_t9;
+DROP FUNCTION IF EXISTS fn1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.9.7:;
+--source include/show_msg80.inc
+
+# testcase: verify create index sql statement that may be executed by a stored procedure
+#
+--disable_warnings
+DROP PROCEDURE IF EXISTS sp6;
+drop table IF EXISTS res_t9;
+--enable_warnings
+
+ create table res_t9 (f1 longtext, f2 longblob, f3 real);
+
+delimiter //;
+CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
+BEGIN
+ set @x = i1;
+ set @y = i3;
+ set @z = i5;
+ set @a = @x;
+ set @b = @y;
+ set @c = @z;
+ insert into res_t9 values (@a, @b, @c);
+ SELECT * from res_t9;
+ create index index_1 on res_t9 (f1 (5));
+ show index from res_t9;
+END//
+delimiter ;//
+
+CALL sp6 (10, 20, 30, 40, 50);
+
+# cleanup
+DROP PROCEDURE sp6;
+drop table res_t9;
+
+
+# ==============================================================================
+#
+# test plan section: 4.11 - verify handlers with continue and exit conditions
+#
+# ==============================================================================
+let $message= Section 3.1._ - :;
+--source include/show_msg80.inc
+
+USE db_storedproc;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.1:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for error code 1318 (er_sp_wrong_no_of_args)
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @y=x;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare continue handler for 1318 set @x2 = 1;
+ set @x=0;
+ CALL sp1 (1);
+ set @x=1;
+ SELECT @x, @x2;
+END//
+delimiter ;//
+
+CALL h1 ();
+
+# cleanup
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.2:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for error code 1305 (er_sp_does_not_exist)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare continue handler for 1305 set @x2 = 1;
+ set @x=0;
+ CALL sp1 (1);
+ set @x=1;
+ SELECT @x, @x2;
+END//
+delimiter ;//
+
+CALL h1 ();
+
+# cleanup
+DROP PROCEDURE h1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.3:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for error code 1318 (er_sp_wrong_no_of_args)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @xx=1;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare exit handler for 1318 set @x2 = 1;
+ set @x=1;
+ set @x2=0;
+ CALL sp1 (1);
+ set @x=0;
+END//
+delimiter ;//
+
+CALL h1();
+
+ SELECT @x, @x2;
+
+# cleanup
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.4:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for error code 1305 (er_sp_does_not_exist)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare exit handler for 1305 set @x2 = 1;
+ set @x=1;
+ set @x2=0;
+ CALL sp1 (1);
+ set @x=0;
+END//
+delimiter ;//
+
+CALL h1 ();
+
+ SELECT @x, @x2;
+
+# cleanup
+DROP PROCEDURE h1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.5:;
+--source include/show_msg80.inc
+
+# testcase: verify undo handler for error code 1318 (er_sp_wrong_no_of_args)
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @y=x;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare continue handler for 1318 set @x2 = 1;
+ set @x=0;
+ CALL sp1 (1);
+ set @x=1;
+ SELECT @x, @x2;
+END//
+delimiter ;//
+
+CALL h1 ();
+
+# cleanup
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.6:;
+--source include/show_msg80.inc
+
+# testcase: verify undo handler for error code 1305 (er_sp_does_not_exist)
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @y=x;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare continue handler for 1318 set @x2 = 1;
+ set @x=0;
+ CALL sp1 (1);
+ set @x=1;
+ SELECT @x, @x2;
+END//
+delimiter ;//
+
+CALL h1 ();
+
+# cleanup
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.7:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for sql state 42000 (er_sp_wrong_no_of_args)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @y=x;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare continue handler for sqlstate '42000' set @x2 = 1;
+ set @x=0;
+ CALL sp1 (1);
+ set @x=1;
+ SELECT @x, @x2;
+END//
+delimiter ;//
+
+CALL h1 ();
+
+# cleanup
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.8:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for sql state 42000 (er_sp_does_not_exist)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+--enable_warnings
+
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare continue handler for sqlstate '42000' set @x2 = 1;
+ set @x=0;
+ CALL sp1 (1);
+ set @x=1;
+ SELECT @x, @x2;
+END//
+delimiter ;//
+
+CALL h1 ();
+
+# cleanup
+DROP PROCEDURE h1;
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.9:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for sql state 42000 (er_sp_wrong_no_of_args)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @xx=1;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare exit handler for sqlstate '42000' set @x2 = 1;
+ set @x=1;
+ set @x2=0;
+ CALL sp1 (1);
+ set @x=0;
+END//
+delimiter ;//
+
+CALL h1();
+
+ SELECT @x, @x2;
+
+# cleanup
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.10:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for sql state 42000 (er_sp_does_not_exist)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare exit handler for sqlstate '42000' set @x2 = 1;
+ set @x=1;
+ set @x2=0;
+ CALL sp1 (1);
+ set @x=0;
+END//
+delimiter ;//
+
+CALL h1 ();
+ SELECT @x, @x2;
+
+# cleanup
+DROP PROCEDURE h1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.11:;
+--source include/show_msg80.inc
+
+# testcase: verify undo handler for sql state 42000 (er_sp_wrong_no_of_args)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @y=x;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare continue handler for sqlstate '42000' set @x2 = 1;
+ set @x=0;
+ CALL sp1 (1);
+ set @x=1;
+ SELECT @x, @x2;
+END//
+delimiter ;//
+
+CALL h1 ();
+
+# cleanup
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.12:;
+--source include/show_msg80.inc
+
+# testcase: verify undo handler for sql state 42000 (er_sp_does_not_exist)
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP PROCEDURE IF EXISTS sp1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE sp1 (x int, y int)
+BEGIN
+ set @y=x;
+END//
+delimiter ;//
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare continue handler for sqlstate '42000' set @x2 = 1;
+ set @x=0;
+ CALL sp1 (1);
+ set @x=1;
+ SELECT @x, @x2;
+END//
+delimiter ;//
+
+CALL h1 ();
+
+# cleanup
+DROP PROCEDURE h1;
+DROP PROCEDURE sp1;
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.13:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for sql state 02000 (er_sp_fetch_no_data)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for sqlstate '02000' set done = 1;
+ open cur1;
+ repeat
+ SELECT done;
+ fetch cur1 into a, b;
+ SELECT done;
+ if not done then
+ insert into res_t2 values (a, b);
+ END if;
+ until done END repeat;
+ SELECT done;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.14:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for error code 1329 (er_sp_fetch_no_data)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+
+ create table res_t1(w char, x char);
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for sqlstate '02000' set done = 1;
+ open cur1;
+ repeat
+ SELECT done;
+ fetch cur1 into a, b;
+ SELECT done;
+ if not done then
+ insert into res_t2 values (a, b);
+ END if;
+ until done END repeat;
+ SELECT done;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.15:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for error code 1329 (er_sp_fetch_no_data)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for sqlstate '02000' set done = 1;
+ open cur1;
+ repeat
+ SELECT done;
+ set @x=0;
+ fetch cur1 into a, b;
+ SELECT @x=1;
+ if not done then
+ insert into res_t2 values (a, b);
+ END if;
+ until done END repeat;
+ SELECT done;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.16:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for sql state '02000' (er_sp_fetch_no_data)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for sqlstate '02000' set done = 1;
+ open cur1;
+ repeat
+ SELECT done;
+ set @x=0;
+ fetch cur1 into a, b;
+ SELECT @x=1;
+ if not done then
+ insert into res_t2 values (a, b);
+ END if;
+ until done END repeat;
+ SELECT done;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.17:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for sql state HY000 (er_sp_wrong_no_of_fetch_args)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for sqlstate 'HY000' set done = 1;
+ open cur1;
+ SELECT done;
+ fetch cur1 into a;
+ SELECT done;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.18:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for error code 1328 (er_sp_wrong_no_of_fetch_args)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for 1328 set done = 1;
+ open cur1;
+ SELECT done;
+ fetch cur1 into a;
+ SELECT done;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.19:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for sql state HY000 (er_sp_wrong_no_of_fetch_args)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare exit handler for sqlstate 'HY000' set done = 1;
+ open cur1;
+ SELECT done;
+ set @x=0;
+ fetch cur1 into a;
+ set @x=1;
+ SELECT done, @x;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.20:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for error code 1328 (er_sp_wrong_no_of_fetch_args)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare exit handler for 1328 set done = 1;
+ open cur1;
+ SELECT done;
+ set @x=0;
+ fetch cur1 into a;
+ set @x=1;
+ SELECT done;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.21:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for error code 1325 (er_sp_cursor_already_open)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for 1325 set done = 1;
+ open cur1;
+ SELECT done;
+ open cur1;
+ SELECT done;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.22:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for sqlstate 24000 (er_sp_cursor_already_open)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for 1325 set done = 1;
+ open cur1;
+ SELECT done;
+ open cur1;
+ set @x=1;
+ SELECT done, @x;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.23:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for error code 1325 (er_sp_cursor_already_open)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare exit handler for 1325 set done = 1;
+ open cur1;
+ set @x=0;
+ SELECT done;
+ open cur1;
+ set @x=1;
+ SELECT done;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.24:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for sqlstate 24000 (er_sp_cursor_already_open)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare exit handler for sqlstate '24000' set done = 1;
+ open cur1;
+ set @x=0;
+ SELECT done;
+ open cur1;
+ set @x=1;
+ SELECT done, @x;
+ close cur1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.25:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for error code 1326 (er_sp_cursor_not_open)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for 1326 set done = 1;
+ set @x=0;
+ fetch cur1 into a, b;
+ set @x=1;
+ SELECT done, @x;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.26:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for sqlstate 24000 (er_sp_cursor_not_open)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for sqlstate '24000' set done = 1;
+ set @x=0;
+ fetch cur1 into a, b;
+ set @x=1;
+ SELECT done, @x;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.27:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for error code 1326 (er_sp_cursor_not_open)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare exit handler for 1326 set done = 1;
+ set @x=0;
+ fetch cur1 into a, b;
+ set @x=1;
+ SELECT done, @x;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.28:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for sqlstate 24000 (er_sp_cursor_not_open)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare exit handler for sqlstate '24000' set done = 1;
+ set @x=0;
+ fetch cur1 into a, b;
+ set @x=1;
+ SELECT done, @x;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.29:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for error code 1339 (er_sp_case_not_found)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for 1339 set done = 1;
+ set @x=0;
+ case @x
+ when 1 then set @x=10;
+ when 2 then set @x=11;
+ END case;
+ set @x=1;
+ SELECT done, @x;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.30:;
+--source include/show_msg80.inc
+
+# testcase: verify continue handler for sqlstate 20000 (er_sp_case_not_found)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare continue handler for sqlstate '20000' set done = 1;
+ set @x=0;
+ case @x
+ when 1 then set @x=10;
+ when 2 then set @x=11;
+ END case;
+ set @x=1;
+ SELECT done, @x;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.31:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for error code 1339 (er_sp_case_not_found)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare exit handler for 1339 set done = 1;
+ set @x=0;
+ case @x
+ when 1 then set @x=10;
+ when 2 then set @x=11;
+ END case;
+ set @x=1;
+ SELECT done, @x;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.32:;
+--source include/show_msg80.inc
+
+# testcase: verify exit handler for sqlstate 20000 (er_sp_case_not_found)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+drop table IF EXISTS res_t2;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+ create table res_t2(y char, z char);
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ declare done int default 0;
+ declare a, b char;
+ declare cur1 cursor for SELECT w, x from res_t1;
+ declare exit handler for sqlstate '20000' set done = 1;
+ set @x=0;
+ case @x
+ when 1 then set @x=10;
+ when 2 then set @x=11;
+ END case;
+ set @x=1;
+ SELECT done, @x;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+DROP TABLE IF EXISTS res_t2;
+--enable_warnings
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.33:;
+--source include/show_msg80.inc
+
+# testcase: ensure that no two conditions declared with the same scope may have the same condition name.
+# (same condition name in same scope)
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+--enable_warnings
+
+ create table res_t1(w char, x char);
+
+ insert into res_t1 values('a', 'b');
+ insert into res_t1 values('c', 'd');
+
+delimiter //;
+--error ER_SP_DUP_COND
+CREATE PROCEDURE h1()
+BEGIN
+ declare condname condition for sqlstate '20000';
+ declare done int default 0;
+ declare a, b char;
+ declare condname condition for sqlstate '20000';
+ declare cur1 cursor for SELECT w, x from t1;
+ set @x=2;
+ case @x
+ when 1 then set @x=10;
+ when 2 then set @x=11;
+ END case;
+ set @x=1;
+ SELECT done, @x;
+END//
+delimiter ;//
+
+# cleanup
+--disable_warnings
+DROP TABLE IF EXISTS res_t1;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.35:;
+
+# Ensure that every sqlstate value declared with a declare condition for
+# statement and declare handler is a character string that is 5 character and
+# cannot be an invalid state.;
+
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+drop table IF EXISTS res_t1;
+--enable_warnings
+
+CREATE TABLE res_t1(w INT UNIQUE, x CHAR);
+
+insert into res_t1 values (1, 'a');
+
+delimiter //;
+
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE h1 ()
+begin1_label:BEGIN
+ declare condname1 condition for sqlstate '020';
+ declare condname2 condition for sqlstate 'wewe';
+ declare condname3 condition for 9999;
+ declare exit handler for sqlstate '020' set @var1 = 1;
+ declare exit handler for sqlstate 'wewe'set @var1 = 1;
+ declare exit handler for 9999 set @var1 = 1;
+ set @var2 = 1;
+ insert into res_t1 values (2, 'b');
+ begin2_label: BEGIN
+ declare continue handler for sqlstate '90000023' set @var3= 1;
+ set @var4 = 1;
+ insert into res_t1 values (3, 'c');
+ END begin2_label;
+END begin1_label//
+
+--error ER_SP_BAD_SQLSTATE
+CREATE PROCEDURE h1 ()
+begin1_label:BEGIN
+ declare condname1 condition for sqlstate '020';
+ declare condname2 condition for sqlstate 'wewe';
+ declare condname3 condition for 9999;
+ set @var2 = 1;
+ insert into res_t1 values (2, 'b');
+ begin2_label: BEGIN
+ declare continue handler for sqlstate '90000023' set @var3= 1;
+ set @var4 = 1;
+ insert into res_t1 values (3, 'c');
+ END begin2_label;
+END begin1_label//
+delimiter ;//
+
+# cleanup
+--disable_warnings
+DROP TABLE IF EXISTS res_t1;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.36:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the declare condition for statement cannot declare a condition for the successful
+# completion sqlstate: 00000.
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ declare x1 int default 0;
+ BEGIN
+ declare condname1 condition for sqlstate '00000';
+ declare exit handler for condname1 set @x = 1;
+ set x1 = 1;
+ set x1 = 2;
+ END;
+ SELECT @x, x1;
+END//
+delimiter ;//
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+--enable_warnings
+
+
+
+
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.40:;
+--source include/show_msg80.inc
+
+# testcase: ensure that within the same scope, no two handlers may be declared for the same condition
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+--enable_warnings
+
+CREATE TABLE res_t1(w CHAR UNIQUE, x CHAR);
+INSERT INTO res_t1 VALUES ('a', 'b');
+
+# suppressed--error for having two similar handlers in the same scope
+
+delimiter //;
+--error ER_SP_DUP_HANDLER
+CREATE PROCEDURE h1 ()
+BEGIN
+ DECLARE x1, x2, x3, x4, x5 int default 0;
+ DECLARE condname1 CONDITION FOR SQLSTATE '42000';
+ DECLARE condname2 CONDITION FOR SQLSTATE '42000';
+ DECLARE CONTINUE HANDLER FOR condname1 set x1 = 1;
+ DECLARE CONTINUE HANDLER FOR condname1 set x2 = 1;
+ DECLARE EXIT HANDLER FOR condname1 SET x3 = 1;
+ DECLARE CONTINUE HANDLER FOR condname2 SET x4 = 1;
+ DECLARE EXIT HANDLER FOR condname2 SET x5 = 1;
+END//
+delimiter ;//
+
+#CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+let $message= Testcase 4.11.41:;
+--source include/show_msg80.inc
+
+# testcase: ensure that the declare handler for statement cannot declare a condition for the successful
+# completion sqlstate: 00000.
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE h1 ()
+BEGIN
+ DECLARE x1 INT DEFAULT 0;
+ BEGIN
+ DECLARE condname1 CONDITION FOR SQLSTATE '00000';
+ DECLARE EXIT HANDLER FOR SQLSTATE '00000' SET @x = 1;
+ SET x1 = 1;
+ SET x1 = 2;
+ END;
+ SELECT @x, x1;
+END//
+delimiter ;//
+
+CALL h1();
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+--enable_warnings
+
+
+# ------------------------------------------------------------------------------
+# FIXME 3.1.2.53: check numbering difference
+let $message= * Testcase 3.1.2.53 (4.11.42):
+* Ensure that a handler condition of sqlwarning takes the same action as a
+* handler condition defined with an sqlstate that begins with 01.;
+--source include/show_msg80.inc
+
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ DECLARE EXIT HANDLER FOR SQLWARNING SET @done = 1;
+ SET @done=0;
+ SET @x=1;
+ INSERT INTO res_t1 VALUES('xxx', 'yy');
+ SET @x=0;
+END//
+delimiter ;//
+
+# table doesn't exist
+--error ER_NO_SUCH_TABLE
+CALL h1();
+SELECT @done, @x;
+
+CREATE TABLE res_t1(w CHAR, x CHAR);
+INSERT INTO res_t1 VALUES('a', 'b');
+INSERT INTO res_t1 VALUES('c', 'd');
+
+# now table exists
+CALL h1();
+SELECT @done, @x;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+--enable_warnings
+
+delimiter //;
+CREATE PROCEDURE h1()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING SET @done = 1;
+ SET @done=0;
+ SET @x=0;
+ INSERT INTO res_t1 VALUES('xxx', 'yy');
+ SET @x=1;
+END//
+delimiter ;//
+
+# table doesn't exist
+--error ER_NO_SUCH_TABLE
+CALL h1();
+SELECT @done, @x;
+
+CREATE TABLE res_t1(w CHAR, x CHAR);
+INSERT INTO res_t1 VALUES('a', 'b');
+INSERT INTO res_t1 VALUES('c', 'd');
+
+# now table exists
+CALL h1();
+SELECT @done, @x;
+
+# cleanup
+--disable_warnings
+DROP PROCEDURE IF EXISTS h1;
+DROP TABLE IF EXISTS res_t1;
+--enable_warnings
+
+
+# ==============================================================================
+# USE the same .inc to cleanup before and after the test
+--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
+
+# ==============================================================================
+let $message= . +++ END OF SCRIPT +++;
+--source include/show_msg80.inc
+# ==============================================================================
+--enable_ps_protocol
diff --git a/mysql-test/suite/funcs_1/triggers/trig_frkey.inc b/mysql-test/suite/funcs_1/triggers/trig_frkey.inc
new file mode 100644
index 00000000..5aba368f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/trig_frkey.inc
@@ -0,0 +1,108 @@
+#################################################################
+# This file include tests that address the foreign key cases of
+# the following requirements since they are specific to innodb.
+# Other test cases for these requirements are included in the
+# triggers_*.inc files.
+#################################################################
+
+--disable_abort_on_error
+
+# Section x.x.x.1
+# Test case: Verifing that a trigger that activates a primary key results in
+# the primary key acting correctly on the foreign key
+let $message= Testcase x.x.x.1:;
+--source include/show_msg.inc
+
+
+--disable_warnings
+DROP TABLE IF EXISTS t0, t1, t2;
+--enable_warnings
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+CREATE TABLE t0 (col1 CHAR(50))
+ENGINE = $engine_type;
+--replace_result $engine_type <engine_to_be_tested>
+eval
+CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id))
+ENGINE = $engine_type;
+--replace_result $engine_type <engine_to_be_tested>
+eval
+CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
+ INDEX par_ind (f_id), col1 CHAR(50),
+ FOREIGN KEY (f_id) REFERENCES t1(id) ON DELETE SET NULL)
+ENGINE = $engine_type;
+
+INSERT INTO t1 VALUES (1,'Department A');
+INSERT INTO t1 VALUES (2,'Department B');
+INSERT INTO t1 VALUES (3,'Department C');
+INSERT INTO t2 VALUES (1,2,'Emp 1');
+INSERT INTO t2 VALUES (2,2,'Emp 2');
+INSERT INTO t2 VALUES (3,2,'Emp 3');
+
+CREATE TRIGGER trig AFTER INSERT ON t0 FOR EACH ROW
+DELETE FROM t1 WHERE col1 = new.col1;
+
+--sorted_result
+SELECT * FROM t2;
+LOCK TABLES t0 WRITE, t1 WRITE;
+INSERT INTO t0 VALUES ('Department B');
+UNLOCK TABLES;
+--sorted_result
+SELECT * FROM t2;
+
+# Cleanup
+DROP TRIGGER trig;
+DROP TABLE t2, t1;
+
+
+#Section x.x.x.2
+# Test case: Checking that triggers can be used as a way to address missing foreign
+# key definition
+let $message= Testcase x.x.x.2:;
+--source include/show_msg.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+--enable_warnings
+
+--replace_result $engine_type <engine_to_be_tested>
+eval
+CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id))
+ENGINE = $engine_type;
+--replace_result $engine_type <engine_to_be_tested>
+eval
+CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
+ INDEX par_ind (f_id), col1 CHAR(50),
+ FOREIGN KEY (f_id) REFERENCES t1(id) ON UPDATE CASCADE)
+ENGINE = $engine_type;
+
+INSERT INTO t1 VALUES (1,'Department A');
+INSERT INTO t1 VALUES (2,'Department B');
+INSERT INTO t1 VALUES (3,'Department C');
+INSERT INTO t2 VALUES (1,2,'Emp 1');
+INSERT INTO t2 VALUES (2,3,'Emp 2');
+
+--error ER_NO_REFERENCED_ROW_2
+insert into t2 VALUES (3,4,'Emp 3');
+
+CREATE TRIGGER tr_t2 BEFORE INSERT ON t2 FOR EACH ROW
+INSERT INTO t1 VALUES(new.f_id, CONCAT('New Department ', new.f_id));
+
+LOCK TABLES t1 WRITE, t2 WRITE;
+INSERT INTO t2 VALUES (3,4,'Emp 3');
+UNLOCK TABLES;
+
+--sorted_result
+SELECT * FROM t1;
+--sorted_result
+SELECT * FROM t2;
+
+# Cleanup
+DROP TRIGGER tr_t2;
+DROP TABLE t2, t1, t0;
+
+
+--echo
+--echo Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test)
+--echo -------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/triggers/trig_frkey2.inc b/mysql-test/suite/funcs_1/triggers/trig_frkey2.inc
new file mode 100644
index 00000000..c3de88a2
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/trig_frkey2.inc
@@ -0,0 +1,244 @@
+#################################################################
+# This file inclde tests that address the foreign key cases of
+# the following requirements since they are specific to innodb.
+# Other test cases for these requirements are included in the
+# triggers_master.test file.
+#################################################################
+
+--disable_abort_on_error
+
+# OBN - The following tests are disabled until triggers are supported with forign
+# keys in innodb (foreign keys tests dispabled - bug 11472)
+#################################################################################
+#Section x.x.x.3
+# Test case: Similar to 3.5.10.5 but with ten tables to see if multiple triggers
+# can be executed at once
+let $message= Testcase x.x.x.3:;
+--source include/show_msg.inc
+
+ --disable_warnings
+ DROP TABLE IF EXISTS t1, t2;
+ --enable_warnings
+
+ eval CREATE TABLE t0 (col1 char(50)) ENGINE=$engine_type;
+ eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50),
+ PRIMARY KEY (id)) ENGINE=$engine_type;
+ eval CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL) ENGINE=$engine_type;
+ eval CREATE TABLE t3 (id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+ eval CREATE TABLE t4 (id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+ eval CREATE TABLE t5 (id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+ eval CREATE TABLE t6 (id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+ eval CREATE TABLE t7 (id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+ eval CREATE TABLE t8 (id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+ eval CREATE TABLE t9 (id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+ eval CREATE TABLE t10(id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+ eval CREATE TABLE t11(id INT PRIMARY KEY, f_id INT, INDEX par_ind
+ (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+
+ create trigger tr1 after update on t2 for each row
+ insert into t0 values ('tr_t2');
+ create trigger tr2 after update on t3 for each row
+ insert into t0 values ('tr_t3');
+ create trigger tr3 after update on t4 for each row
+ insert into t0 values ('tr_t4');
+ create trigger tr3 after update on t5 for each row
+ insert into t0 values ('tr_t5');
+ create trigger tr4 after update on t6 for each row
+ insert into t0 values ('tr_t6');
+ create trigger tr5 after update on t7 for each row
+ insert into t0 values ('tr_t7');
+ create trigger tr5 after update on t8 for each row
+ insert into t0 values ('tr_t8');
+ create trigger tr6 after update on t9 for each row
+ insert into t0 values ('tr_t9');
+ create trigger tr7 after update on t10 for each row
+ insert into t0 values ('tr_t10');
+ create trigger tr8 after update on t11 for each row
+ insert into t0 values ('tr_t11');
+
+ insert into t1 values (1,'Department A');
+ insert into t1 values (2,'Department B');
+ insert into t1 values (3,'Department C');
+
+ insert into t2 values (1,2,'Employee');
+ insert into t3 values (1,2,'Employee');
+ insert into t4 values (1,2,'Employee');
+ insert into t5 values (1,2,'Employee');
+ insert into t6 values (1,2,'Employee');
+ insert into t7 values (1,2,'Employee');
+ insert into t8 values (1,2,'Employee');
+ insert into t9 values (1,2,'Employee');
+ insert into t10 values (1,2,'Employee');
+ insert into t11 values (1,2,'Employee');
+
+ select * from t1;
+ select * from t2;
+ select * from t3;
+ select * from t4;
+ select * from t5;
+ select * from t6;
+ select * from t7;
+ select * from t8;
+ select * from t9;
+ select * from t10;
+ select * from t11;
+
+ delete from t1 where id=2;
+ select * from t1;
+ select * from t2;
+ select * from t3;
+ select * from t4;
+ select * from t5;
+ select * from t6;
+ select * from t7;
+ select * from t8;
+ select * from t9;
+ select * from t10;
+ select * from t11;
+
+ select * from t0;
+
+# Cleanup
+ drop trigger tr1;
+ drop trigger tr2;
+ drop trigger tr3;
+ drop trigger tr4;
+ drop trigger tr5;
+ drop trigger tr6;
+ drop trigger tr7;
+ drop trigger tr8;
+ drop trigger tr9;
+ drop trigger tr10;
+ drop table t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t1,t0;
+
+
+
+
+#Section 3.5.10.5
+# Test case: Ensure that every trigger that should be activated by every possible
+# type of implicit update of its subject table (e.g. a FOREIGN KEY SET
+# DEFAULT action or an UPDATE of a view based on the subject table)
+# is indeed activated correctly.
+let $message= Testcase 3.5.10.5 (foreign keys):;
+--source include/show_msg.inc
+
+
+ --disable_warnings
+ DROP TABLE IF EXISTS t1, t2;
+ --enable_warnings
+
+ eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50),
+ PRIMARY KEY (id)) ENGINE=$engine_type;
+ eval CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
+ INDEX par_ind (f_id), col1 char(50),
+ FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=$engine_type;
+ create trigger tr_t2 after update on t2
+ for each row set @counter=@counter+1;
+
+ insert into t1 values (1,'Department A');
+ insert into t1 values (2,'Department B');
+ insert into t1 values (3,'Department C');
+ insert into t2 values (1,2,'Emp 1');
+ insert into t2 values (2,2,'Emp 2');
+ insert into t2 values (3,2,'Emp 3');
+ insert into t2 values (4,2,'Emp 4');
+ insert into t2 values (5,2,'Emp 5');
+ insert into t2 values (6,3,'Emp 6');
+ set @counter=0;
+
+ select * from t1;
+ select * from t2;
+ select @counter;
+
+ update t1 set id=4 where id=3;
+ select * from t1;
+ select * from t2;
+ select @counter;
+
+ delete from t1 where id=2;
+ select * from t1;
+ select * from t2;
+ select @counter;
+
+# This is to verify that the trigger works when updated directly
+ update t2 set col1='Emp 5a' where id=5;
+ select * from t2;
+ select @counter;
+
+# Cleanup
+ drop trigger tr_t2;
+ drop table t2, t1;
+
+
+#Section 3.5.10.6
+# Test case: Ensure that every trigger that should be activated by every possible
+# type of implicit deletion from its subject table (e.g. a FOREIGN KEY
+# CASCADE action or a DELETE from a view based on the subject table)
+# is indeed activated correctly.
+let $message= Testcase 3.5.10.6 (foreign keys):;
+--source include/show_msg.inc
+
+ --disable_warnings
+ DROP TABLE IF EXISTS t1, t2;
+ --enable_warnings
+
+ eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50),
+ PRIMARY KEY (id)) ENGINE=$engine_type;
+ eval CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
+ INDEX par_ind (f_id), col1 char(50),
+ FOREIGN KEY (f_id) REFERENCES t1(id)
+ ON DELETE CASCADE) ENGINE=$engine_type;
+
+ create trigger tr_t2 before delete on t2
+ for each row set @counter=@counter+1;
+
+ insert into t1 values (1,'Department A');
+ insert into t1 values (2,'Department B');
+ insert into t1 values (3,'Department C');
+ insert into t2 values (1,2,'Emp 1');
+ insert into t2 values (2,2,'Emp 2');
+ insert into t2 values (3,2,'Emp 3');
+ insert into t2 values (4,2,'Emp 4');
+ insert into t2 values (5,2,'Emp 5');
+ insert into t2 values (6,3,'Emp 6');
+ set @counter=0;
+
+ select * from t1;
+ select * from t2;
+ select @counter;
+
+ delete from t1 where id=2;
+
+ select * from t1;
+ select * from t2;
+ select @counter;
+
+# This is to verify that the trigger works when deleted directly
+ delete from t2 where id=6;
+ select * from t2;
+ select @counter;
+
+# Cleanup
+ drop trigger tr_t2;
+ drop table t2, t1;
+
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0102.inc b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc
new file mode 100644
index 00000000..19d87739
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc
@@ -0,0 +1,474 @@
+#======================================================================
+#
+# Trigger Tests
+# (test case numbering refer to requirement document TP v1.1)
+#======================================================================
+
+USE test;
+--source suite/funcs_1/include/tb3.inc
+
+# OBM - ToDo
+############
+# 1. Performace
+###############################################
+
+--disable_abort_on_error
+
+#####################################################
+################# Section 3.5.1 #####################
+# Syntax checks for CREATE TRIGGER and DROP TRIGGER #
+#####################################################
+
+#Section 3.5.1.1
+# Testcase: Ensure that all clauses that should be supported are supported.
+let $message= Testcase: 3.5.1.1:;
+--source include/show_msg.inc
+# OBN - This test case tests basic trigger definition and execution
+# of INSERT/UPDATE/DELETE actions and BEFORE/AFTER timings.
+# As such it covers the equirements in sections 3.5.6.1, 3.5.6.2,
+# 3.5.6.4, 3.5.6.5, 3.5.7.1, 3.5.7.2, 3.5.7.3, 3.5.7.17 below.
+# - Note currently as a result of limitations with locking tables in
+# triggers, a specifc lockingof the tables is done.
+# Once fixed, the locking and alias referances should be removed
+
+use test;
+# Trigger Definition
+ Create trigger trg1_1 BEFORE INSERT
+ on tb3 for each row set @test_before = 2, new.f142 = @test_before;
+ Create trigger trg1_2 AFTER INSERT
+ on tb3 for each row set @test_after = 6;
+ Create trigger trg1_4 BEFORE UPDATE
+ on tb3 for each row set @test_before = 27,
+ new.f142 = @test_before,
+ new.f122 = 'Before Update Trigger';
+ Create trigger trg1_3 AFTER UPDATE
+ on tb3 for each row set @test_after = '15';
+ Create trigger trg1_5 BEFORE DELETE on tb3 for each row
+ select count(*) into @test_before from tb3 as tr_tb3
+ where f121 = 'Test 3.5.1.1';
+ Create trigger trg1_6 AFTER DELETE on tb3 for each row
+ select count(*) into @test_after from tb3 as tr_tb3
+ where f121 = 'Test 3.5.1.1';
+# Trigger Execution Insert (before and after)
+ set @test_before = 1;
+ set @test_after = 5;
+ select @test_before, @test_after;
+ Insert into tb3 (f121, f122, f142, f144, f134)
+ values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
+ --sorted_result
+ select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+ select @test_before, @test_after;
+
+# Trigger Execution Update (before and after)
+ set @test_before = 18;
+ set @test_after = 8;
+ select @test_before, @test_after;
+ Update tb3 set tb3.f122 = 'Update',
+ tb3.f142 = @test_before,
+ tb3.f144 = @test_after
+ where tb3.f121 = 'Test 3.5.1.1';
+ --sorted_result
+ select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+ select @test_before, @test_after;
+
+# Trigger Execution Delete (before and after)
+ Insert into tb3 (f121, f122, f142, f144, f134)
+ values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
+ set @test_before = 0;
+ set @test_after = 0;
+ --sorted_result
+ select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+ select @test_before, @test_after;
+ Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2;
+ --sorted_result
+ select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
+ select @test_before, @test_after;
+
+#Cleanup
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_1;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_2;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_3;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_4;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_5;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_6;
+ --enable_warnings
+ delete from tb3 where f121='Test 3.5.1.1';
+ --enable_warnings
+
+#Section 3.5.1.2
+# Testcase: Ensure that all clauses that should not be supported are disallowed
+# with an appropriate error message.
+let $message= Testcase: 3.5.1.2:;
+--source include/show_msg.inc
+
+ --error ER_PARSE_ERROR
+ Create trigger trg_1 after insert
+ on tb3 for each statement set @x= 1;
+
+#Cleanup
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg_1;
+ --enable_warnings
+
+
+#Section 3.5.1.3
+# Testcase: Ensure that all supported clauses are supported only in the correct order.
+let $message= Testcase 3.5.1.3:;
+--source include/show_msg.inc
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't';
+
+ --error ER_PARSE_ERROR
+ CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's';
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row;
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row;
+
+ --error ER_PARSE_ERROR
+ CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test';
+
+#Cleanup
+# OBN - Although none of the above should have been created we should do a cleanup
+# since if they have been created, not dropping them will affect following
+# tests.
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg3_1;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg3_2;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg3_3;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg3_4;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg3_5;
+ --enable_warnings
+
+
+#Section 3.5.1.4
+# Testcase: Ensure that an appropriate error message is returned if a clause
+# is out-of-order in an SQL statement.
+# OBN - FIXME - Missing 3.5.1.4 need to add
+
+#Section 3.5.1.5
+# Testcase: Ensure that all clauses that are defined to be mandatory are indeed
+# required to be mandatory by the MySQL server and tools
+let $message= Testcase: 3.5.1.5:;
+--source include/show_msg.inc
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e';
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f';
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g';
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g';
+
+ --error ER_PARSE_ERROR
+ CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g';
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g';
+
+#Cleanup
+# OBN - Although none of the above should have been created we should do a cleanup
+# since if they have been created, not dropping them will affect following
+# tests.
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4_1;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4_2;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4_3;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4_4;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4_5;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4_6;
+ --enable_warnings
+
+#Section 3.5.1.6
+# Testcase: Ensure that any clauses that are defined to be optional are indeed
+# trated as optional by MySQL server and tools
+let $message= Testcase 3.5.1.6: - Need to fix;
+--source include/show_msg.inc
+# OBN - FIXME - Missing 3.5.1.6 need to add
+
+#Section 3.5.1.7
+# Testcase: Ensure that all valid, fully-qualified, and non-qualified,
+# trigger names are accepted, at creation time.
+let $message= Testcase 3.5.1.7: - need to fix;
+--source include/show_msg.inc
+
+ drop table if exists t1;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 int, f2 char(25),f3 int) engine = $engine_type;
+ CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
+ for each row set new.f3 = '14';
+# In 5.0 names to long (more than 64 chars) were trimed without an error
+# In 5.1 an error is returned. So adding a call with the expected error
+# and one with a shorter name to validate proper execution
+ --error ER_TOO_LONG_IDENT
+ CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
+ CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
+ BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
+
+ insert into t1 (f2) values ('insert 3.5.1.7');
+ select * from t1;
+ update t1 set f2='update 3.5.1.7';
+ select * from t1;
+ select trigger_name from information_schema.triggers where trigger_schema <> 'sys' order by trigger_name;
+
+#Cleanup
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg5_1;
+ # In 5.1 the long name should generate an error that is to long
+ --error ER_TOO_LONG_IDENT
+ drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ;
+ drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX;
+ drop table t1;
+
+#Section 3.5.1.8
+# Testcase: Ensure that any invalid trigger name is never accepted, and that an
+# appropriate error message is returned when the name is rejected.
+let $message= Testcase 3.5.1.8:;
+--source include/show_msg.inc
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't';
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't';
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't';
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
+
+ --error ER_PARSE_ERROR
+ CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
+
+ --error ER_TRG_IN_WRONG_SCHEMA
+ CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
+ for each row set new.f120 ='X';
+
+ --disable_warnings
+ drop database if exists trig_db;
+ --enable_warnings
+ create database trig_db;
+ use trig_db;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 integer) engine = $engine_type;
+
+ # Can't create a trigger in a different database
+ use test;
+ --error ER_NO_SUCH_TABLE
+ CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
+ for each row set @ret_trg6_2 = 5;
+
+ # Can't create a trigger refrencing a table in a different db
+ use trig_db;
+ --error ER_TRG_IN_WRONG_SCHEMA
+ CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
+ for each row set @ret_trg6_3 = 18;
+
+ use test;
+
+#Cleanup
+ --disable_warnings
+ drop database trig_db;
+# OBN - Although none of the above should have been created we should do a cleanup
+# since if they have been created, not dropping them will affect following
+# tests.
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg6_1;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg6_3;
+ --enable_warnings
+
+#Section 3.5.1.9
+#Testcase: Ensure that a reference to a non-existent trigger is rejected with
+# an appropriate error message.
+let $message= Testcase 3.5.1.9:(cannot be inplemented at this point);
+--source include/show_msg.inc
+
+
+#Section 3.5.1.10
+#Testcase: Ensure that it is not possible to create two triggers with the same name on
+# the same table
+let $message= Testcase 3.5.1.10:;
+--source include/show_msg.inc
+
+ CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X';
+
+ --error ER_TRG_ALREADY_EXISTS
+ CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y';
+
+#Cleanup
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg7_1;
+ --enable_warnings
+
+
+#Section 3.5.1.?
+# Testcase: Ensure that it is not possible to create two or more triggers with
+# the same name, provided each is associated with a different table.
+let $message= Testcase 3.5.1.?:;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop table if exists t1;
+ drop table if exists t2;
+ --enable_warnings
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(50), f2 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2 (f1 char(50), f2 integer) engine = $engine_type;
+
+ create trigger trig before insert on t1
+ for each row set new.f1 ='trig t1';
+
+ --error ER_TRG_ALREADY_EXISTS
+ create trigger trig before update on t2
+ for each row set new.f1 ='trig t2';
+
+ insert into t1 value ('insert to t1',1);
+ select * from t1;
+ update t1 set f1='update to t1';
+ select * from t1;
+ insert into t2 value ('insert to t2',2);
+ update t2 set f1='update to t1';
+ select * from t2;
+
+#Cleanup
+ --disable_warnings
+ drop table t1;
+ drop table t2;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trig;
+ --enable_warnings
+
+
+#Section 3.5.1.11
+# Testcase: Ensure that it is possible to create two or more triggers with
+# the same name, provided each resides in a different database
+let $message= Testcase 3.5.1.11:;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists trig_db1;
+ drop database if exists trig_db2;
+ drop database if exists trig_db3;
+ --enable_warnings
+ create database trig_db1;
+ create database trig_db2;
+ create database trig_db3;
+ use trig_db1;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(50), f2 integer) engine = $engine_type;
+ create trigger trig before insert on t1
+ for each row set new.f1 ='trig1', @test_var1='trig1';
+ use trig_db2;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2 (f1 char(50), f2 integer) engine = $engine_type;
+ create trigger trig before insert on t2
+ for each row set new.f1 ='trig2', @test_var2='trig2';
+ use trig_db3;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(50), f2 integer) engine = $engine_type;
+ create trigger trig before insert on t1
+ for each row set new.f1 ='trig3', @test_var3='trig3';
+
+ set @test_var1= '', @test_var2= '', @test_var3= '';
+ use trig_db1;
+ insert into t1 (f1,f2) values ('insert to db1 t1',1);
+ insert into trig_db1.t1 (f1,f2) values ('insert to db1 t1 from db1',2);
+ insert into trig_db2.t2 (f1,f2) values ('insert to db2 t2 from db1',3);
+ insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4);
+ select @test_var1, @test_var2, @test_var3;
+ select * from t1 order by f2;
+ select * from trig_db2.t2;
+ select * from trig_db3.t1;
+ select * from t1 order by f2;
+ use test;
+
+#Cleanup
+ --disable_warnings
+ drop database trig_db1;
+ drop database trig_db2;
+ drop database trig_db3;
+ --enable_warnings
+
+###########################################
+################ Section 3.5.2 ############
+# Check for the global nature of Triggers #
+###########################################
+
+#Section 3.5.2.1
+# Test case: Ensure that if a trigger created without a qualifying database
+# name belongs to the database in use at creation time.
+#Section 3.5.2.2
+# Test case: Ensure that if a trigger created with a qualifying database name
+# belongs to the database specified.
+#Section 3.5.2.3
+# Test case: Ensure that if a trigger created with a qualifying database name
+# does not belong to the database in use at creation time unless
+# the qualifying database name identifies the database that is
+# also in use at creation time.
+let $message= Testcase 3.5.2.1/2/3:;
+--source include/show_msg.inc
+
+
+ --disable_warnings
+ drop database if exists trig_db1;
+ drop database if exists trig_db2;
+ --enable_warnings
+ create database trig_db1;
+ create database trig_db2;
+ use trig_db1;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(50), f2 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table trig_db2.t1 (f1 char(50), f2 integer) engine = $engine_type;
+ create trigger trig1_b before insert on t1
+ for each row set @test_var1='trig1_b';
+ create trigger trig_db1.trig1_a after insert on t1
+ for each row set @test_var2='trig1_a';
+ create trigger trig_db2.trig2 before insert on trig_db2.t1
+ for each row set @test_var3='trig2';
+ select trigger_schema, trigger_name, event_object_table
+ from information_schema.triggers
+ where trigger_schema like 'trig_db%'
+ order by trigger_name;
+
+ set @test_var1= '', @test_var2= '', @test_var3= '';
+ insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
+ insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
+ select @test_var1, @test_var2, @test_var3;
+
+#Cleanup
+ --disable_warnings
+ drop database trig_db1;
+ drop database trig_db2;
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03.inc b/mysql-test/suite/funcs_1/triggers/triggers_03.inc
new file mode 100644
index 00000000..c16737af
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03.inc
@@ -0,0 +1,655 @@
+#### suite/funcs_1/triggers/triggers_03.inc
+#======================================================================
+#
+# Trigger Tests
+# (test case numbering refer to requirement document TP v1.1)
+#======================================================================
+# WL#4084: enable disabled parts. 2007-11-15, hhunger
+
+# This test cannot be used for the embedded server because we check here
+# privilgeges.
+--source include/not_embedded.inc
+
+USE test;
+--source suite/funcs_1/include/tb3.inc
+
+
+
+--disable_abort_on_error
+
+###########################################
+################ Section 3.5.3 ############
+# Check for the global nature of Triggers #
+###########################################
+
+# General setup to be used in all testcases of 3.5.3
+let $message= Testcase 3.5.3:;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists priv_db;
+ --enable_warnings
+ create database priv_db;
+ use priv_db;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+
+ create User test_noprivs@localhost;
+ set password for test_noprivs@localhost = password('PWD');
+
+ create User test_yesprivs@localhost;
+ set password for test_yesprivs@localhost = password('PWD');
+
+#Section 3.5.3.1 / 3.5.3.2
+# Test case: Ensure TRIGGER privilege is required to create a trigger
+#Section 3.5.3.3 / 3.5.3.4
+# Test case: Ensure that root always has the TRIGGER privilege.
+# OMR - No need to test this since SUPER priv is an existing one and not related
+# or added for triggers (TP 2005-06-06)
+#Section 3.5.3.5 / 3.5.3.6
+# Test case: Ensure that the TRIGGER privilege is required to drop a trigger.
+let $message= Testcase 3.5.3.2/6:;
+--source include/show_msg.inc
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant ALL on *.* to test_noprivs@localhost;
+ revoke TRIGGER on *.* from test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER on *.* to test_yesprivs@localhost;
+# Adding the minimal priv to be able to set to the db
+ grant SELECT on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection default;
+
+let $message= Testcase 3.5.3.2:;
+--source include/show_msg.inc
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 3.5.3.2_1-no';
+
+ connection default;
+ use priv_db;
+ insert into t1 (f1) values ('insert 3.5.3.2-no');
+ select f1 from t1 order by f1;
+
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+
+ create trigger trg1_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 3.5.3.2_2-yes';
+
+ connection default;
+ select current_user;
+ use priv_db;
+
+ --error ER_COLUMNACCESS_DENIED_ERROR
+ insert into t1 (f1) values ('insert 3.5.3.2-yes');
+ select f1 from t1 order by f1;
+
+ grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
+ insert into t1 (f1) values ('insert 3.5.3.2-yes');
+ select f1 from t1 order by f1;
+
+let $message= Testcase 3.5.3.6:;
+--source include/show_msg.inc
+
+ connection no_privs;
+ use priv_db;
+
+ --error ER_TABLEACCESS_DENIED_ERROR
+ drop trigger trg1_2;
+
+ connection default;
+ use priv_db;
+ insert into t1 (f1) values ('insert 3.5.3.6-yes');
+ select f1 from t1 order by f1;
+
+ connection yes_privs;
+ use priv_db;
+
+ drop trigger trg1_2;
+
+ connection default;
+ use priv_db;
+ insert into t1 (f1) values ('insert 3.5.3.6-no');
+ select f1 from t1 order by f1;
+
+# Cleanup
+ --disable_warnings
+ connection default;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_2;
+ disconnect no_privs;
+ disconnect yes_privs;
+ --enable_warnings
+
+
+#Section 3.5.3.7
+# Test case: Ensure that use of the construct "SET NEW. <column name> = <value>"
+# fails at CREATE TRIGGER time, if the current user does not have the
+# UPDATE privilege on the column specified
+
+# --- 3.5.3.7a - Privs set on a global level
+let $message=Testcase 3.5.3.7a:;
+--source include/show_msg.inc
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant ALL on *.* to test_noprivs@localhost;
+ revoke UPDATE on *.* from test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connect (no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+ connection no_privs_424a;
+ select current_user;
+ use priv_db;
+ show grants;
+ select f1 from t1 order by f1;
+
+ create trigger trg4a_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 3.5.3.7-1a';
+
+ connection default;
+ --error ER_COLUMNACCESS_DENIED_ERROR
+ insert into t1 (f1) values ('insert 3.5.3.7-1a');
+ select f1 from t1 order by f1;
+ drop trigger trg4a_1;
+
+ connection yes_privs_424a;
+ use priv_db;
+ select current_user;
+ show grants;
+ create trigger trg4a_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 3.5.3.7-2a';
+
+ connection default;
+
+ insert into t1 (f1) values ('insert 3.5.3.7-2b');
+ select f1 from t1 order by f1;
+
+# Cleanup
+ --disable_warnings
+ drop trigger trg4a_2;
+ disconnect no_privs_424a;
+ disconnect yes_privs_424a;
+ --enable_warnings
+
+# --- 3.5.3.7b - Privs set on a database level
+let $message= Testcase 3.5.3.7b:;
+--source include/show_msg.inc
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant TRIGGER on *.* to test_noprivs;
+ grant ALL on priv_db.* to test_noprivs@localhost;
+ revoke UPDATE on priv_db.* from test_noprivs@localhost;
+ show grants for test_noprivs;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER on *.* to test_yesprivs@localhost;
+ grant UPDATE on priv_db.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connect (no_privs_424b,localhost,test_noprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection default;
+
+ connection no_privs_424b;
+ show grants;
+ use priv_db;
+
+ create trigger trg4b_1 before UPDATE on t1 for each row
+ set new.f1 = 'trig 3.5.3.7-1b';
+
+ connection default;
+ insert into t1 (f1) values ('insert 3.5.3.7-1b');
+ select f1 from t1 order by f1;
+ update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
+ select f1 from t1 order by f1;
+ drop trigger trg4b_1;
+
+ connection yes_privs_424b;
+ show grants;
+ use priv_db;
+ create trigger trg4b_2 before UPDATE on t1 for each row
+ set new.f1 = 'trig 3.5.3.7-2b';
+
+ connection default;
+
+ insert into t1 (f1) values ('insert 3.5.3.7-2b');
+ select f1 from t1 order by f1;
+ update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
+ select f1 from t1 order by f1;
+# Cleanup
+ --disable_warnings
+ drop trigger trg4b_2;
+ disconnect no_privs_424b;
+ disconnect yes_privs_424b;
+ --enable_warnings
+
+# --- 3.5.3.7c - Privs set on a table level
+let $message= Testcase 3.5.3.7c;
+--source include/show_msg.inc
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant TRIGGER on *.* to test_noprivs@localhost;
+ grant ALL on priv_db.t1 to test_noprivs@localhost;
+ revoke UPDATE on priv_db.t1 from test_noprivs@localhost;
+ show grants for test_noprivs;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER on *.* to test_yesprivs@localhost;
+ grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connect (no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection default;
+
+ connection no_privs_424c;
+ show grants;
+ use priv_db;
+
+ create trigger trg4c_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 3.5.3.7-1c';
+
+ connection default;
+ insert into t1 (f1) values ('insert 3.5.3.7-1c');
+ select f1 from t1 order by f1;
+ drop trigger trg4c_1;
+
+ connection yes_privs_424c;
+ show grants;
+ use priv_db;
+ create trigger trg4c_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 3.5.3.7-2c';
+
+ connection default;
+
+ insert into t1 (f1) values ('insert 3.5.3.7-2c');
+ select f1 from t1 order by f1;
+
+# Cleanup
+ --disable_warnings
+ drop trigger trg4c_2;
+ disconnect no_privs_424c;
+ disconnect yes_privs_424c;
+ --enable_warnings
+
+# --- 3.5.3.7d - Privs set on a column level
+--disable_query_log
+let $message= Testcase 3.5.3.7d:;
+--enable_query_log
+--source include/show_msg.inc
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant TRIGGER on *.* to test_noprivs@localhost;
+# There is no ALL privs on the column level
+ grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
+ show grants for test_noprivs;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER on *.* to test_yesprivs@localhost;
+ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_noprivs;
+
+ connect (no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection default;
+
+ connection no_privs_424d;
+ show grants;
+ use priv_db;
+ create trigger trg4d_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 3.5.3.7-1d';
+
+ connection default;
+ insert into t1 (f1) values ('insert 3.5.3.7-1d');
+ select f1 from t1 order by f1;
+ drop trigger trg4d_1;
+
+ connection yes_privs_424d;
+ show grants;
+ use priv_db;
+ create trigger trg4d_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 3.5.3.7-2d';
+
+ connection default;
+
+ insert into t1 (f1) values ('insert 3.5.3.7-2d');
+ select f1 from t1 order by f1;
+
+# Cleanup
+ --disable_warnings
+ drop trigger trg4d_2;
+ disconnect no_privs_424d;
+ disconnect yes_privs_424d;
+ --enable_warnings
+
+#Section 3.5.3.8
+# Test case: Ensure that use of the construct "SET <target> = NEW. <Column name>" fails
+# at CREATE TRIGGER time, if the current user does not have the SELECT privilege
+# on the column specified.
+
+# --- 3.5.3.8a - Privs set on a global level
+let $message= Testcase 3.5.3.8a:;
+--source include/show_msg.inc
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant ALL on *.* to test_noprivs@localhost;
+ revoke SELECT on *.* from test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connect (no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection default;
+
+ connection no_privs_425a;
+ select current_user;
+ use priv_db;
+ show grants;
+
+ create trigger trg5a_1 before INSERT on t1 for each row
+ set @test_var = new.f1;
+
+ connection default;
+ set @test_var = 'before trig 3.5.3.8-1a';
+ select @test_var;
+ insert into t1 (f1) values ('insert 3.5.3.8-1a');
+ select @test_var;
+ drop trigger trg5a_1;
+
+ connection yes_privs_425a;
+ use priv_db;
+ select current_user;
+ show grants;
+ create trigger trg5a_2 before INSERT on t1 for each row
+ set @test_var= new.f1;
+
+ connection default;
+ set @test_var= 'before trig 3.5.3.8-2a';
+ select @test_var;
+
+ insert into t1 (f1) values ('insert 3.5.3.8-2a');
+ select @test_var;
+
+# Cleanup
+ --disable_warnings
+ drop trigger trg5a_2;
+ disconnect no_privs_425a;
+ disconnect yes_privs_425a;
+ --enable_warnings
+
+# --- 3.5.3.8b - Privs set on a database level
+let $message= Testcase: 3.5.3.8b;
+--source include/show_msg.inc
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant TRIGGER on *.* to test_noprivs@localhost;
+ grant ALL on priv_db.* to test_noprivs@localhost;
+ revoke SELECT on priv_db.* from test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER on *.* to test_yesprivs@localhost;
+ grant SELECT on priv_db.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connect (no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection default;
+
+ connection no_privs_425b;
+ show grants;
+ use priv_db;
+
+ create trigger trg5b_1 before UPDATE on t1 for each row
+ set @test_var= new.f1;
+
+ connection default;
+ set @test_var= 'before trig 3.5.3.8-1b';
+ insert into t1 (f1) values ('insert 3.5.3.8-1b');
+ select @test_var;
+ update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
+ select @test_var;
+ drop trigger trg5b_1;
+
+ connection yes_privs_425b;
+ show grants;
+ use priv_db;
+ create trigger trg5b_2 before UPDATE on t1 for each row
+ set @test_var= new.f1;
+
+ connection default;
+ set @test_var= 'before trig 3.5.3.8-2b';
+ insert into t1 (f1) values ('insert 3.5.3.8-2b');
+ select @test_var;
+
+ update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
+ select @test_var;
+# Cleanup
+ --disable_warnings
+ drop trigger trg5b_2;
+ disconnect no_privs_425b;
+ disconnect yes_privs_425b;
+ --enable_warnings
+
+# --- 3.5.3.8c - Privs set on a table level
+let $message= Testcase 3.5.3.8c:;
+--source include/show_msg.inc
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant TRIGGER on *.* to test_noprivs@localhost;
+ grant ALL on priv_db.t1 to test_noprivs@localhost;
+ revoke SELECT on priv_db.t1 from test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER on *.* to test_yesprivs@localhost;
+ grant SELECT on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connect (no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection default;
+
+ connection no_privs_425c;
+ show grants;
+ use priv_db;
+
+ create trigger trg5c_1 before INSERT on t1 for each row
+ set @test_var= new.f1;
+
+ connection default;
+ set @test_var= 'before trig 3.5.3.8-1c';
+ insert into t1 (f1) values ('insert 3.5.3.8-1c');
+ select @test_var;
+ drop trigger trg5c_1;
+
+ connection yes_privs_425c;
+ show grants;
+ use priv_db;
+ create trigger trg5c_2 before INSERT on t1 for each row
+ set @test_var= new.f1;
+
+ connection default;
+ set @test_var='before trig 3.5.3.8-2c';
+
+ insert into t1 (f1) values ('insert 3.5.3.8-2c');
+ select @test_var;
+# Cleanup
+ --disable_warnings
+ drop trigger trg5c_2;
+ disconnect no_privs_425c;
+ disconnect yes_privs_425c;
+ --enable_warnings
+
+# --- 3.5.3.8d - Privs set on a column level
+let $message=Testcase: 3.5.3.8d:;
+--source include/show_msg.inc
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant TRIGGER on *.* to test_noprivs@localhost;
+# There is no ALL prov on the column level
+ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER on *.* to test_yesprivs@localhost;
+ grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ connect (no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection default;
+
+ connection no_privs_425d;
+ show grants;
+ use priv_db;
+ create trigger trg5d_1 before INSERT on t1 for each row
+ set @test_var= new.f1;
+
+ connection default;
+ set @test_var='before trig 3.5.3.8-1d';
+ insert into t1 (f1) values ('insert 3.5.3.8-1d');
+ select @test_var;
+ drop trigger trg5d_1;
+
+ connection yes_privs_425d;
+ show grants;
+ use priv_db;
+ create trigger trg5d_2 before INSERT on t1 for each row
+ set @test_var= new.f1;
+
+ connection default;
+ set @test_var='before trig 3.5.3.8-2d';
+
+ insert into t1 (f1) values ('insert 3.5.3.8-2d');
+ select @test_var;
+
+# Cleanup 3.5.3.8
+ --disable_warnings
+ drop trigger trg5d_2;
+ --enable_warnings
+
+# --- 3.5.3.x to test for trigger definer privs in the case of trigger
+# actions (insert/update/delete/select) performed on other
+# tables.
+let $message=Testcase: 3.5.3.x:;
+--source include/show_msg.inc
+
+ use priv_db;
+ --disable_warnings
+ drop table if exists t1;
+ drop table if exists t2;
+ --enable_warnings
+
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 int) engine= $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2 (f2 int) engine= $engine_type;
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER on *.* to test_yesprivs@localhost;
+ grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
+ grant SELECT on priv_db.t2 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connect (yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+ connection yes_353x;
+ select current_user;
+ use priv_db;
+
+ create trigger trg1 before insert on t1 for each row
+ insert into t2 values (new.f1);
+
+ connection default;
+ use priv_db;
+ insert into t1 (f1) values (4);
+ revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
+ grant INSERT on priv_db.t2 to test_yesprivs@localhost;
+ insert into t1 (f1) values (4);
+ select f1 from t1 order by f1;
+ select f2 from t2 order by f2;
+
+ connection yes_353x;
+ use priv_db;
+ drop trigger trg1;
+
+ create trigger trg2 before insert on t1 for each row
+ update t2 set f2=new.f1-1;
+
+ connection default;
+ use priv_db;
+ insert into t1 (f1) values (2);
+ revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
+ grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
+ insert into t1 (f1) values (2);
+ select f1 from t1 order by f1;
+ select f2 from t2 order by f2;
+
+ connection yes_353x;
+ use priv_db;
+ drop trigger trg2;
+
+ create trigger trg3 before insert on t1 for each row
+ select f2 into @aaa from t2 where f2=new.f1;
+
+ connection default;
+ use priv_db;
+ insert into t1 (f1) values (1);
+ revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
+ grant SELECT on priv_db.t2 to test_yesprivs@localhost;
+ insert into t1 (f1) values (1);
+ select f1 from t1 order by f1;
+ select f2 from t2 order by f2;
+ select @aaa;
+
+ connection yes_353x;
+ use priv_db;
+ drop trigger trg3;
+
+ create trigger trg4 before insert on t1 for each row
+ delete from t2;
+
+ connection default;
+ use priv_db;
+ insert into t1 (f1) values (1);
+ revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
+ grant DELETE on priv_db.t2 to test_yesprivs@localhost;
+ insert into t1 (f1) values (1);
+ select f1 from t1 order by f1;
+ select f2 from t2 order by f2;
+
+
+
+# Cleanup 3.5.3
+ --disable_warnings
+ drop database if exists priv_db;
+ drop user test_yesprivs@localhost;
+ drop user test_noprivs@localhost;
+ drop user test_noprivs;
+ --enable_warnings
+
+use test;
+drop table tb3;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc
new file mode 100644
index 00000000..3b2ffc57
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc
@@ -0,0 +1,252 @@
+#======================================================================
+#
+# Trigger Tests
+# test cases for TRIGGER privilege on db, table and column level
+#======================================================================
+
+--disable_abort_on_error
+
+#########################################################
+################ Section 3.5.3 ##########################
+# Check for column privileges of Triggers #
+#########################################################
+
+# General setup to be used in all testcases
+let $message= ####### Testcase for column privileges of triggers: #######;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists priv_db;
+ drop database if exists no_priv_db;
+ --enable_warnings
+ create database priv_db;
+ use priv_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+ eval create table t2 (f1 char(20)) engine= $engine_type;
+
+ create User test_yesprivs@localhost;
+ set password for test_yesprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ create User test_noprivs@localhost;
+ set password for test_noprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ connect (yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection yes_privs;
+
+ connect (no_privs,localhost,test_noprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection no_privs;
+
+# grant TRIGGER and UPDATE on column -> succeed
+
+let $message= update only on column:;
+--source include/show_msg.inc
+
+ connection default;
+ select current_user;
+ grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t1
+ to test_yesprivs@localhost;
+ grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t2
+ to test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert1-yes');
+ insert into t2 (f1) values ('insert1-yes');
+ create trigger trg1_1 before UPDATE on t1 for each row
+ set new.f1 = 'trig 1_1-yes';
+ create trigger trg2_1 before UPDATE on t2 for each row
+ set new.f1 = 'trig 2_1-yes';
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ select f1 from t1 order by f1;
+ update t1 set f1 = 'update1_no'
+ where f1 like '%insert%';
+ select f1 from t1 order by f1;
+ select f1 from t2 order by f1;
+ update t2 set f1 = 'update1_no'
+ where f1 like '%insert%';
+ select f1 from t2 order by f1;
+
+ connection default;
+ select current_user;
+ revoke UPDATE on priv_db.*
+ from test_yesprivs@localhost;
+ revoke UPDATE(f1) on priv_db.t2
+ from test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert2-yes');
+ insert into t2 (f1) values ('insert2-yes');
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ update t1 set f1 = 'update2_no'
+ where f1 like '%insert%';
+ --error ER_COLUMNACCESS_DENIED_ERROR
+ update t2 set f1 = 'update2_no'
+ where f1 like '%insert%';
+ update t1 set f1 = 'update3_no'
+ where f1 like '%insert%';
+ --error ER_COLUMNACCESS_DENIED_ERROR
+ update t2 set f1 = 'update3_no'
+ where f1 like '%insert%';
+ select f1 from t1 order by f1;
+ select f1 from t2 order by f1;
+
+# check with three columns
+let $message= check if access only on one of three columns;
+--source include/show_msg.inc
+
+ connection default;
+ select current_user;
+ alter table priv_db.t1 add f2 char(20), add f3 int;
+ revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+ grant TRIGGER,SELECT on priv_db.t1 to test_yesprivs@localhost;
+ grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 values ('insert2-yes','insert2-yes',1);
+ insert into t1 values ('insert3-yes','insert3-yes',2);
+ select * from t1 order by f1;
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ update t1 set f1 = 'update4-no',
+ f2 = 'update4-yes',
+ f3 = f3*10
+ where f2 like '%yes';
+ select * from t1 order by f1,f2,f3;
+
+ connection yes_privs;
+ select current_user;
+ create trigger trg1_2 after UPDATE on t1 for each row
+ set @f2 = 'trig 1_2-yes';
+
+ connection no_privs;
+ select current_user;
+ update t1 set f1 = 'update5-yes',
+ f2 = 'update5-yes'
+ where f2 like '%yes';
+ select * from t1 order by f1,f2,f3;
+ select @f2;
+
+ update t1 set f1 = 'update6_no'
+ where f1 like '%insert%';
+ --error ER_TABLEACCESS_DENIED_ERROR
+ update t2 set f1 = 'update6_no'
+ where f1 like '%insert%';
+ update t1 set f1 = 'update7_no'
+ where f1 like '%insert%';
+ --error ER_TABLEACCESS_DENIED_ERROR
+ update t2 set f1 = 'update7_no'
+ where f1 like '%insert%';
+ select f1 from t1 order by f1;
+ select f1 from t2 order by f1;
+
+# check with three columns
+
+
+# check if update is rejected without trigger privilege
+
+let $message= check if rejected without trigger privilege:;
+--source include/show_msg.inc
+
+ connection default;
+ select current_user;
+ revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+
+ connection no_privs;
+ select current_user;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ update t1 set f1 = 'update8-no',
+ f2 = 'update8-no'
+ where f2 like '%yes';
+ select * from t1 order by f1,f2,f3;
+ select @f2;
+
+# check trigger, but not update privilege on column
+
+let $message= check trigger, but not update privilege on column:;
+--source include/show_msg.inc
+
+ connection default;
+ select current_user;
+ revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost;
+ grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1
+ to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+ drop trigger trg1_1;
+ create trigger trg1_3 before UPDATE on t1 for each row
+ set new.f1 = 'trig 1_3-yes';
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ --error ER_COLUMNACCESS_DENIED_ERROR
+ update t1 set f1 = 'update9-no',
+ f2 = 'update9-no'
+ where f2 like '%yes';
+ select * from t1 order by f1,f2,f3;
+
+# trigger is involved (table privilege) ->fail
+ --error ER_COLUMNACCESS_DENIED_ERROR
+ update t1 set f3= f3+1;
+ select f3 from t1 order by f3;
+
+ connection default;
+ select current_user;
+ revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+ grant UPDATE(f1),UPDATE(f2),UPDATE(f3) on priv_db.t1
+ to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+# trigger is involved (table privilege) ->fail
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ update t1 set f3= f3+1;
+ select f3 from t1 order by f3;
+
+let $message= ##### trigger privilege on column level? #######;
+--source include/show_msg.inc
+ --error ER_PARSE_ERROR
+ grant TRIGGER(f1) on priv_db.t1 to test_yesprivs@localhost;
+
+# Cleanup table level
+ --disable_warnings
+ disconnect yes_privs;
+ disconnect no_privs;
+
+ connection default;
+ select current_user;
+
+
+# general Cleanup
+ drop database if exists priv_db;
+ drop user test_yesprivs@localhost;
+ drop user test_noprivs@localhost;
+ --enable_warnings
+
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc
new file mode 100644
index 00000000..1170bb78
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc
@@ -0,0 +1,222 @@
+#======================================================================
+#
+# Trigger Tests
+# test cases for TRIGGER privilege on db, table and column level
+#======================================================================
+
+--disable_abort_on_error
+
+############################################
+################ Section 3.5.3 #############
+# basic tests for the db level of Triggers #
+############################################
+
+# General setup to be used in all testcases
+let $message= Testcase for db level:;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists priv_db;
+ drop database if exists no_priv_db;
+ --enable_warnings
+ create database priv_db;
+ create database no_priv_db;
+ use priv_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+
+ create User test_yesprivs@localhost;
+ set password for test_yesprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant select on priv_db.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ create User test_noprivs@localhost;
+ set password for test_noprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant select,insert on priv_db.* to test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+# no trigger privilege->create trigger must fail:
+ connect (yes_privs,localhost,test_yesprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection yes_privs;
+let $message= no trigger privilege on db level for create:;
+--source include/show_msg.inc
+ use priv_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_1-no';
+
+# user with minimum privs on t1->no trigger executed;
+ connect (no_privs,localhost,test_noprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection no_privs;
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+# user got trigger privilege->create successful:
+let $message= trigger privilege on db level for create:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+ create trigger trg1_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_2-yes';
+
+# user with minimum privs on t1->fail,as trigger definer no update priv:;
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ grant UPDATE on priv_db.* to test_yesprivs@localhost;
+# succeed,as trigger definer has update privilege:
+# new privilege take effect after 'use db':
+ use priv_db;
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+
+# succeed:
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+# drop must fail, as no trigger privilege:
+let $message= no trigger privilege on db level for drop:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ drop trigger trg1_2;
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+# no trigger privilege at activation time:
+let $message= no trigger privilege at activation time:;
+--source include/show_msg.inc
+ --error ER_TABLEACCESS_DENIED_ERROR
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+
+let $message= trigger privilege at activation time:;
+--source include/show_msg.inc
+ connection default;
+ select current_user;
+ grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+
+# succeed, as trigger privilege at activation time:
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+# drop must fail, as no 'use db' executed:
+let $message= trigger privilege on db level for drop:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+ show grants for test_yesprivs@localhost;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ drop trigger trg1_2;
+
+# succeed
+let $message= takes effect after use priv_db:;
+--source include/show_msg.inc
+ use priv_db;
+ drop trigger trg1_2;
+
+ connection default;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+
+let $message= switch to db without having trigger priv for it:;
+--source include/show_msg.inc
+ use no_priv_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+# Adding the minimal priv to be able to set to the db
+ grant SELECT,UPDATE on no_priv_db.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+# trigger privilege is hold over changes between priv and no priv db:
+let $message= use db with trigger privilege on db level and without...:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+ use no_priv_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_3 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_3-no';
+ use priv_db;
+ create trigger trg1_3 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_3-yes';
+ use no_priv_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_4 before UPDATE on t1 for each row
+ set new.f1 = 'trig 1_4-no';
+ use priv_db;
+ create trigger trg1_4 before UPDATE on t1 for each row
+ set new.f1 = 'trig 1_4-yes';
+
+ connection no_privs;
+ select current_user;
+ use no_priv_db;
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+ use priv_db;
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+ --disable_warnings
+ disconnect no_privs;
+ --enable_warnings
+
+ connection yes_privs;
+ select current_user;
+ use no_priv_db;
+ --error ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_3;
+ use priv_db;
+ drop trigger trg1_3;
+ use no_priv_db;
+ --error ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_4;
+ use priv_db;
+ drop trigger trg1_4;
+
+
+# Cleanup db level
+ --disable_warnings
+ disconnect yes_privs;
+
+ connection default;
+ select current_user;
+ drop table priv_db.t1;
+ drop table no_priv_db.t1;
+ --enable_warnings
+
+# general Cleanup
+ --disable_warnings
+ drop database if exists priv_db;
+ drop database if exists no_priv_db;
+ drop user test_yesprivs@localhost;
+ drop user test_noprivs@localhost;
+ --enable_warnings
+
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
new file mode 100644
index 00000000..6566cd6f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
@@ -0,0 +1,203 @@
+#======================================================================
+#
+# Trigger Tests
+# test cases for TRIGGER privilege on db, table and column level
+#======================================================================
+
+--disable_abort_on_error
+
+#########################################################
+################ Section 3.5.3 ##########################
+# Check for mix of db and table level of Triggers #
+#########################################################
+
+# General setup to be used in all testcases
+let $message= ####### Testcase for mix of db and table level: #######;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists priv1_db;
+ drop database if exists priv2_db;
+ --enable_warnings
+ create database priv1_db;
+ create database priv2_db;
+ use priv1_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+ eval create table t2 (f1 char(20)) engine= $engine_type;
+ use priv2_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+
+ create User test_yesprivs@localhost;
+ set password for test_yesprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant ALL on priv1_db.* to test_yesprivs@localhost;
+ grant SELECT,UPDATE on priv2_db.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ create User test_noprivs@localhost;
+ set password for test_noprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant SELECT,INSERT,UPDATE on priv1_db.* to test_noprivs@localhost;
+ grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ connect (yes_privs,localhost,test_yesprivs,PWD,priv1_db,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (no_privs,localhost,test_noprivs,PWD,priv1_db,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+# trigger priv on db level->create trigger for all tables successful
+
+let $message= trigger privilege on one db1 db level, not on db2;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+ use priv1_db;
+ create trigger trg1_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_1-yes';
+ create trigger trg2_1 before INSERT on t2 for each row
+ set new.f1 = 'trig 2_1-yes';
+ use priv2_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_1 before INSERT on t1 for each row
+ set new.f1 = 'trig1_1-yes';
+
+ connection no_privs;
+ select current_user;
+ insert into t1 (f1) values ('insert1_no');
+ select f1 from t1 order by f1;
+ insert into t2 (f1) values ('insert1_no');
+ select f1 from t2 order by f1;
+ insert into priv2_db.t1 (f1) values ('insert21-yes');
+ select f1 from priv2_db.t1 order by f1;
+
+ use priv2_db;
+ insert into t1 (f1) values ('insert1_yes');
+ select f1 from t1 order by f1;
+ insert into priv1_db.t1 (f1) values ('insert11-no');
+ select f1 from priv1_db.t1 order by f1;
+ insert into priv1_db.t2 (f1) values ('insert22-no');
+ select f1 from priv1_db.t2 order by f1;
+
+# revoke trigger priv on table level, that doesn't exists->fail
+
+let $message= revoke trigger privilege on table level (not existing);
+--source include/show_msg.inc
+ connection default;
+ select current_user;
+ use priv1_db;
+ --error ER_NONEXISTING_TABLE_GRANT
+ revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ drop trigger trg1_1;
+ drop trigger trg2_1;
+ use priv1_db;
+ drop trigger trg1_1;
+ drop trigger trg2_1;
+
+# revoke the db level->create/drop/use trigger fail
+
+ connection default;
+ select current_user;
+ use priv1_db;
+ revoke TRIGGER on priv1_db.* from test_yesprivs@localhost;
+
+################ Section 3.5.3 ############
+# Check for the table level of Triggers #
+###########################################
+let $message= no trigger privilege on table level for create:;
+--source include/show_msg.inc
+
+ connection yes_privs;
+ select current_user;
+ use priv1_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_1-no';
+
+ connection default;
+ select current_user;
+--replace_column 6 #
+ show triggers;
+ grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+let $message= trigger privilege on table level for create:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+--replace_column 6 #
+ show triggers;
+ create trigger trg1_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_2-yes';
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg2_1 before INSERT on t2 for each row
+ set new.f1 = 'trig 2_1-no';
+
+ connection no_privs;
+ select current_user;
+# need 'use db' to get the newest privileges
+ use priv1_db;
+ insert into t1 (f1) values ('insert2-no');
+ select f1 from t1 order by f1;
+ insert into t2 (f1) values ('insert2-yes');
+ select f1 from t2 order by f1;
+ insert into priv2_db.t1 (f1) values ('insert22-yes');
+ select f1 from priv2_db.t1 order by f1;
+
+ connection default;
+ select current_user;
+ grant TRIGGER on priv1_db.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+# though granted on db level->create trigger fails (no use db)
+
+ connection yes_privs;
+ select current_user;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg2_1 before INSERT on t2 for each row
+ set new.f1 = 'trig 2_1-yes';
+
+# grant trigger takes effect
+
+ use priv1_db;
+ create trigger trg2_1 before INSERT on t2 for each row
+ set new.f1 = 'trig 2_1-yes';
+
+ connection no_privs;
+ select current_user;
+ use priv1_db;
+ insert into t1 (f1) values ('insert3-no');
+ select f1 from t1 order by f1;
+ insert into t2 (f1) values ('insert3-no');
+ select f1 from t2 order by f1;
+ use priv2_db;
+ insert into priv1_db.t1 (f1) values ('insert12-no');
+ select f1 from priv1_db.t1 order by f1;
+ insert into priv1_db.t2 (f1) values ('insert23-no');
+ select f1 from priv1_db.t2 order by f1;
+
+ disconnect no_privs;
+
+ connection yes_privs;
+ select current_user;
+
+ drop trigger trg1_2;
+ drop trigger trg2_1;
+
+# Cleanup table level
+ --disable_warnings
+ disconnect yes_privs;
+
+ connection default;
+ select current_user;
+
+
+# general Cleanup
+ drop database if exists priv1_db;
+ drop database if exists priv2_db;
+ drop user test_yesprivs@localhost;
+ drop user test_noprivs@localhost;
+ --enable_warnings
+
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc
new file mode 100644
index 00000000..8e3dff9b
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc
@@ -0,0 +1,120 @@
+#======================================================================
+#
+# Trigger Tests
+# test cases for TRIGGER privilege on db, table and column level
+#======================================================================
+
+--disable_abort_on_error
+
+###########################################
+################ Section 3.5.3 ############
+# Check for the definer of Triggers #
+###########################################
+
+# General setup to be used in all testcases
+let $message= ######### Testcase for definer: ########;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists priv_db;
+ --enable_warnings
+ create database priv_db;
+ use priv_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+
+ create User test_yesprivs@localhost;
+ set password for test_yesprivs@localhost = password('PWD');
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+
+ connect (yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection yes_privs;
+
+# create trigger with not existing definer shall deliver a warning:
+ connection default;
+ select current_user;
+# --warning 1449
+ create definer=not_ex_user@localhost trigger trg1_0
+ before INSERT on t1 for each row
+ set new.f1 = 'trig 1_0-yes';
+ drop trigger trg1_0;
+# create trigger with definer test_yesprivs@localhost->succeed:
+ create definer=test_yesprivs@localhost trigger trg1_0
+ before INSERT on t1 for each row
+ set new.f1 = 'trig 1_0-yes';
+ grant select, insert, update
+ on priv_db.t1 to test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+# user hasn't trigger privilege->fail:
+ --error ER_TABLEACCESS_DENIED_ERROR
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ drop trigger trg1_0;
+
+ connection default;
+ select current_user;
+ grant select, insert, update ,trigger
+ on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+# user now has trigger privilege->succeed:
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+ drop trigger trg1_0;
+# user has not super privilege->fail:
+ --error ER_SPECIFIC_ACCESS_DENIED_ERROR
+ create definer=not_ex_user@localhost trigger trg1_0
+ before INSERT on t1 for each row
+ set new.f1 = 'trig 1_0-yes';
+# shall always succeed:
+ create definer=current_user trigger trg1_1
+ before INSERT on t1 for each row
+ set new.f1 = 'trig 1_1-yes';
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+# shall always succeed:
+ create definer=test_yesprivs@localhost trigger trg1_2
+ before UPDATE on t1 for each row
+ set new.f1 = 'trig 1_2-yes';
+ update t1 set f1 = 'update-yes' where f1 like '%trig%';
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ grant trigger on priv_db.* to test_yesprivs@localhost
+ with grant option;
+
+# user has not super privilege->fail:
+ connection yes_privs;
+ select current_user;
+ show grants;
+ --error ER_SPECIFIC_ACCESS_DENIED_ERROR
+ create definer=not_ex_user@localhost trigger trg1_3
+ after UPDATE on t1 for each row
+ set @var1 = 'trig 1_3-yes';
+
+ connection default;
+ select current_user;
+
+# Cleanup prepare
+ --disable_warnings
+ disconnect yes_privs;
+
+ connection default;
+ select current_user;
+ --enable_warnings
+
+
+# general Cleanup
+ --disable_warnings
+ drop database if exists priv_db;
+ drop user test_yesprivs@localhost;
+ --enable_warnings
+
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
new file mode 100644
index 00000000..f84474f1
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
@@ -0,0 +1,216 @@
+#======================================================================
+#
+# Trigger Tests
+# test cases for TRIGGER privilege on db, table and column level
+#======================================================================
+
+--disable_abort_on_error
+
+#########################################################
+################ Section 3.5.3 ##########################
+# Check for mix of user and db level of Triggers #
+#########################################################
+
+# General setup to be used in all testcases
+let $message= #### Testcase for mix of user(global) and db level: ####;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists priv_db;
+ drop database if exists no_priv_db;
+ --enable_warnings
+ create database priv_db;
+ create database no_priv_db;
+ use priv_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+ use no_priv_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+
+ create User test_yesprivs@localhost;
+ set password for test_yesprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ grant ALL on *.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ create User test_noprivs@localhost;
+ set password for test_noprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+ grant SELECT,INSERT on *.* to test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+ connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+ connection yes_privs;
+ select current_user;
+let $message= trigger privilege on user level for create:;
+--source include/show_msg.inc
+ use priv_db;
+
+ create trigger trg1_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_1-yes';
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+
+ use no_priv_db;
+ create trigger priv_db.trg1_5 before UPDATE on priv_db.t1
+ for each row
+ set new.f1 = 'trig 1_5-yes';
+ insert into priv_db.t1 (f1) values ('insert-no');
+ select f1 from priv_db.t1 order by f1;
+ drop trigger priv_db.trg1_5;
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+
+ revoke TRIGGER on *.* from test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+# change of privilege only active after reconnecting the session
+
+ --disable_warnings
+ disconnect yes_privs;
+ --enable_warnings
+ connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ select current_user;
+ use priv_db;
+--replace_column 6 #
+ show triggers;
+ select * from information_schema.triggers;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ drop trigger trg1_1;
+
+ connection default;
+ select current_user;
+ show grants;
+ drop trigger trg1_1;
+ use priv_db;
+
+################ Section 3.5.3 ############
+# Check for the db level of Triggers #
+###########################################
+let $message= no trigger privilege on db level for create:;
+--source include/show_msg.inc
+
+ connection yes_privs;
+ select current_user;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_1-no';
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ grant TRIGGER on priv_db.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+let $message= trigger privilege on db level for create:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+
+# active after 'use db'
+
+ use priv_db;
+ create trigger trg1_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_2-yes';
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
+ for each row
+ set new.f1 = 'trig 1_9-yes';
+ use no_priv_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_2-no';
+ create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
+ for each row
+ set new.f1 = 'trig 1_9-yes';
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+ use no_priv_db;
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ drop trigger priv_db.trg1_9;
+
+ connection default;
+ select current_user;
+ drop trigger priv_db.trg1_9;
+ revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
+ use priv_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+ grant TRIGGER on *.* to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ use no_priv_db;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_2-no';
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+ use no_priv_db;
+ insert into t1 (f1) values ('insert-yes');
+ select f1 from t1 order by f1;
+
+ --disable_warnings
+ disconnect yes_privs;
+ --enable_warnings
+ connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ select current_user;
+ use no_priv_db;
+ create trigger trg1_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_2-yes';
+ --disable_warnings
+ disconnect yes_privs;
+ --enable_warnings
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+ use no_priv_db;
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+ --disable_warnings
+ disconnect no_privs;
+
+# Cleanup table level
+ connection default;
+ select current_user;
+
+# general Cleanup
+ drop database if exists priv_db;
+ drop database if exists no_priv_db;
+ drop database if exists h1;
+ drop user test_yesprivs@localhost;
+ drop user test_noprivs@localhost;
+ --enable_warnings
+
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc
new file mode 100644
index 00000000..64794394
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc
@@ -0,0 +1,181 @@
+#======================================================================
+#
+# Trigger Tests
+# test cases for TRIGGER privilege on db, table and column level
+# These tests ensure that at activation time (execute statement)
+# the user must have trigger privilege.
+#======================================================================
+
+--disable_abort_on_error
+
+###########################################################
+################ Section 3.5.3 ############################
+# Check for the trigger privilege in case of prepare/exec #
+###########################################################
+
+# General setup to be used in all testcases
+let $message= #### Testcase for trigger privilege on execution time ########;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists priv_db;
+ --enable_warnings
+ create database priv_db;
+ use priv_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+
+ create User test_yesprivs@localhost;
+ set password for test_yesprivs@localhost = password('PWD');
+ create User test_useprivs@localhost;
+ set password for test_useprivs@localhost = password('PWD');
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
+
+ connect (yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection yes_privs;
+
+ connection default;
+ select current_user;
+--replace_column 6 #
+ show triggers;
+ grant select, insert, update ,trigger
+ on priv_db.t1 to test_yesprivs@localhost
+ with grant option;
+ grant select
+ on priv_db.t1 to test_useprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+ create trigger trg1_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_1-yes';
+ grant insert on t1 to test_useprivs@localhost;
+ prepare ins1 from 'insert into t1 (f1) values (''insert1-no'')';
+ execute ins1;
+ select f1 from t1 order by f1;
+ prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
+
+ connect (use_privs,localhost,test_useprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection use_privs;
+ select current_user;
+ prepare ins1 from 'insert into t1 (f1) values (''insert3-no'')';
+ execute ins1;
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ execute ins1;
+ select f1 from t1 order by f1;
+ prepare ins1 from 'insert into t1 (f1) values (''insert4-no'')';
+
+ connection use_privs;
+ select current_user;
+ prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
+ --error ER_TABLEACCESS_DENIED_ERROR
+ execute ins1;
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ execute ins1;
+ select f1 from t1 order by f1;
+ prepare ins1 from 'insert into t1 (f1) values (''insert6-no'')';
+
+ connection use_privs;
+ select current_user;
+ execute ins1;
+ select f1 from t1 order by f1;
+ prepare ins1 from 'insert into t1 (f1) values (''insert7-no'')';
+
+ connection default;
+ select current_user;
+ revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ execute ins1;
+ select f1 from t1 order by f1;
+
+ connection use_privs;
+ select current_user;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ execute ins1;
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ execute ins1;
+ select f1 from t1 order by f1;
+
+ connection use_privs;
+ select current_user;
+ execute ins1;
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ execute ins1;
+ select f1 from t1 order by f1;
+ deallocate prepare ins1;
+
+ connection use_privs;
+ select current_user;
+ execute ins1;
+ select f1 from t1 order by f1;
+ deallocate prepare ins1;
+
+ connection default;
+ select current_user;
+ grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ drop trigger trg1_1;
+
+ connection default;
+ select current_user;
+
+# Cleanup prepare
+ --disable_warnings
+ disconnect yes_privs;
+
+ connection default;
+ select current_user;
+ --enable_warnings
+
+
+# general Cleanup
+ --disable_warnings
+ drop database if exists priv_db;
+ drop user test_yesprivs@localhost;
+ drop user test_useprivs@localhost;
+ --enable_warnings
+
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc
new file mode 100644
index 00000000..bc73511a
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc
@@ -0,0 +1,224 @@
+#======================================================================
+#
+# Trigger Tests
+# test cases for TRIGGER privilege on db, table and column level
+#======================================================================
+
+--disable_abort_on_error
+
+###########################################
+################ Section 3.5.3 ############
+# Check for the db level of Triggers #
+###########################################
+
+# General setup to be used in all testcases
+let $message= ######### Testcase for table level: ########;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists priv_db;
+ --enable_warnings
+ create database priv_db;
+ use priv_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+
+ create User test_yesprivs@localhost;
+ set password for test_yesprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+
+ create User test_noprivs@localhost;
+ set password for test_noprivs@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
+
+ connect (yes_privs,localhost,test_yesprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection yes_privs;
+
+ connect (no_privs,localhost,test_noprivs,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection no_privs;
+
+################ Section 3.5.3 ############
+# Check for the table level of Triggers #
+###########################################
+
+# user has no trigger privilege->create trigger fail
+
+let $message= no trigger privilege on table level for create:;
+--source include/show_msg.inc
+ connection default;
+ select current_user;
+--replace_column 6 #
+ show triggers;
+ grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+ grant select, update, insert on priv_db.t1 to test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+ connection yes_privs;
+ select current_user;
+ use priv_db;
+ show tables;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg1_1 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_1-no';
+
+# no trigger execution, as trigger does'nt exist
+
+ connection no_privs;
+ select current_user;
+ use priv_db;
+ insert into t1 (f1) values ('insert1-yes');
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+--replace_column 6 #
+ show triggers;
+ show tables;
+ insert into t1 (f1) values ('insert2-yes');
+ select f1 from t1 order by f1;
+ grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+# user got trigger privilege->create trigger successful
+
+let $message= trigger privilege on table level for create:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+--replace_column 6 #
+ show triggers;
+ create trigger trg1_2 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_2-yes';
+
+# insert now executes the trigger
+
+ connection no_privs;
+ select current_user;
+ insert into t1 (f1) values ('insert3-no');
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ insert into t1 (f1) values ('insert4-no');
+ select f1 from t1 order by f1;
+ revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+# revoke triggerprivilege->drop trigger fail
+
+let $message= no trigger privilege on table level for drop:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+
+ --error ER_TABLEACCESS_DENIED_ERROR
+ drop trigger trg1_2;
+
+# no trigger priv at activation time->insert fails
+
+let $message= no trigger privilege at activation time:;
+--source include/show_msg.inc
+ connection no_privs;
+ select current_user;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ insert into t1 (f1) values ('insert5-no');
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ grant TRIGGER on priv_db.t1 to test_yesprivs@localhost;
+
+# trigger privilege at activation time->insert with trigger successful
+
+let $message= trigger privilege at activation time:;
+--source include/show_msg.inc
+ connection no_privs;
+ select current_user;
+ insert into t1 (f1) values ('insert6-no');
+ select f1 from t1 order by f1;
+
+# trigger privilege->drop trigger successful
+let $message= trigger privilege on table level for drop:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+ show grants for test_yesprivs@localhost;
+ drop trigger trg1_2;
+
+# inserts without trigger
+
+ connection no_privs;
+ select current_user;
+ insert into t1 (f1) values ('insert7-yes');
+ select f1 from t1 order by f1;
+
+ connection default;
+ select current_user;
+ insert into t1 (f1) values ('insert8-yes');
+ select f1 from t1 order by f1;
+
+# trigger privilege must be keep when mixinf tables with and without
+# trigger privilege
+
+let $message= switch to table without having trigger priv for it:;
+--source include/show_msg.inc
+ eval create table t2 (f1 char(20)) engine= $engine_type;
+# Adding the minimal priv to be able to set to the db
+ grant SELECT, INSERT, UPDATE on priv_db.t2 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ grant SELECT, INSERT, UPDATE on priv_db.t2 to test_noprivs@localhost;
+ show grants for test_noprivs@localhost;
+
+let $message= use table with trigger privilege and without...:;
+--source include/show_msg.inc
+ connection yes_privs;
+ select current_user;
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg2_1 before INSERT on t2 for each row
+ set new.f1 = 'trig 2_1-no';
+ create trigger trg1_3 before INSERT on t1 for each row
+ set new.f1 = 'trig 1_3-yes';
+ --error ER_TABLEACCESS_DENIED_ERROR
+ create trigger trg2_2 before UPDATE on t2 for each row
+ set new.f1 = 'trig 2_2-no';
+ create trigger trg1_4 before UPDATE on t1 for each row
+ set new.f1 = 'trig 1_4-yes';
+--replace_column 6 #
+ show triggers;
+ connection no_privs;
+ select current_user;
+ insert into t2 (f1) values ('insert9-yes');
+ select f1 from t2 order by f1;
+ insert into t1 (f1) values ('insert10-no');
+ select f1 from t1 order by f1;
+ disconnect no_privs;
+
+ connection yes_privs;
+ select current_user;
+ --error ER_TRG_DOES_NOT_EXIST
+ drop trigger trg2_1;
+ drop trigger trg1_3;
+ --error ER_TRG_DOES_NOT_EXIST
+ drop trigger trg2_2;
+ drop trigger trg1_4;
+
+
+# Cleanup table level
+ --disable_warnings
+ disconnect yes_privs;
+
+ connection default;
+ select current_user;
+ --enable_warnings
+
+
+# general Cleanup
+ --disable_warnings
+ drop database if exists priv_db;
+ drop user test_yesprivs@localhost;
+ drop user test_noprivs@localhost;
+ --enable_warnings
+
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc
new file mode 100644
index 00000000..35c0ec76
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc
@@ -0,0 +1,80 @@
+#======================================================================
+#
+# Trigger Tests
+# test cases for TRIGGER privilege on db, table and column level
+#======================================================================
+
+--disable_abort_on_error
+
+###########################################
+################ Section 3.5.3 ############
+# Check for Triggers in transactions #
+###########################################
+
+# General setup to be used in all testcases
+let $message= ######### Testcase for transactions: ########;
+--source include/show_msg.inc
+
+ --disable_warnings
+ drop database if exists priv_db;
+ --enable_warnings
+ create database priv_db;
+ use priv_db;
+ eval create table t1 (f1 char(20)) engine= $engine_type;
+
+ create User test_yesprivs@localhost;
+ set password for test_yesprivs@localhost = password('PWD');
+
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
+
+
+ connection default;
+ select current_user;
+ grant select, insert, update ,trigger
+ on priv_db.t1 to test_yesprivs@localhost;
+ show grants for test_yesprivs@localhost;
+
+ connect (yes_privs,localhost,test_yesprivs,PWD,priv_db,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection yes_privs;
+ select current_user;
+ set autocommit=0;
+ create definer=current_user trigger trg1_1
+ before INSERT on t1 for each row
+ set new.f1 = 'trig 1_1-yes';
+ rollback work;
+ insert into t1 (f1) values ('insert-no');
+ select f1 from t1 order by f1;
+
+ create definer=test_yesprivs@localhost trigger trg1_2
+ before UPDATE on t1 for each row
+ set new.f1 = 'trig 1_2-yes';
+ commit work;
+ update t1 set f1 = 'update-yes' where f1 like '%trig%';
+ select f1 from t1 order by f1;
+ commit work;
+ drop trigger trg1_1;
+ rollback work;
+ --error ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1_1;
+ drop trigger trg1_2;
+ commit work;
+ set autocommit=1;
+
+ connection default;
+ select current_user;
+
+# Cleanup prepare
+ --disable_warnings
+ disconnect yes_privs;
+
+ connection default;
+ select current_user;
+ --enable_warnings
+
+
+# general Cleanup
+ --disable_warnings
+ drop database if exists priv_db;
+ drop user test_yesprivs@localhost;
+ --enable_warnings
+
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc
new file mode 100644
index 00000000..81281156
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc
@@ -0,0 +1,614 @@
+#======================================================================
+#
+# Trigger Tests
+# (test case numbering refer to requirement document TP v1.1)
+#======================================================================
+set GLOBAL sql_mode="";
+
+USE test;
+--source suite/funcs_1/include/tb3.inc
+
+--disable_abort_on_error
+
+# General setup for Trigger tests
+let $message= Testcase: 3.5:;
+--source include/show_msg.inc
+
+--disable_abort_on_error
+
+ create User test_general@localhost;
+ set password for test_general@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
+
+ create User test_super@localhost;
+ set password for test_super@localhost = password('PWD');
+ grant ALL on *.* to test_super@localhost with grant OPTION;
+ connect (con1_general,localhost,test_general,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection con1_general;
+ connect (con1_super,localhost,test_super,PWD,"*NO-ONE*",$MASTER_MYPORT,$MASTER_MYSOCK);
+# next is to check that we connected above
+ connection con1_super;
+ connection default;
+
+####################################
+############ Section 3.5.4 #########
+# Drop Trigger Checkes: #
+####################################
+let $message= Testcase 3.5.4:;
+--source include/show_msg.inc
+
+ connection default;
+ use test;
+
+#Section 3.5.4.1
+# Testcase: Ensure that the DROP TRIGGER statement cleanly drops its target trigger.
+let $message= Testcase 3.5.4.1:;
+--source include/show_msg.inc
+
+ connection con1_super;
+ create database db_drop;
+ Use db_drop;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(30)) engine = $engine_type;
+ grant INSERT, SELECT on db_drop.t1 to test_general;
+ Use db_drop;
+ Create trigger trg1 BEFORE INSERT on t1
+ for each row set new.f1='Trigger 3.5.4.1';
+ connection con1_general;
+ Use db_drop;
+ Insert into t1 values ('Insert error 3.5.4.1');
+ Select * from t1 order by f1;
+ connection con1_super;
+ drop trigger trg1;
+ select trigger_schema, trigger_name, event_object_table
+ from information_schema.triggers
+ where trigger_schema = 'db_drop'
+ order by trigger_name;
+ connection con1_general;
+ Insert into t1 values ('Insert no trigger 3.5.4.1');
+ Select * from t1 order by f1;
+
+#Cleanup
+ --disable_warnings
+ connection con1_super;
+ --disable_warnings
+ --error 0,ER_TRG_DOES_NOT_EXIST
+ drop trigger trg1;
+ drop database if exists db_drop;
+ revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+ --enable_warnings
+
+#Section 3.5.4.2
+# Test case: Ensure that DROP TRIGGER <trigger name> fails, with an appropriate error
+# message, if the trigger name does not exist.
+let $message= Testcase 3.5.4.2:;
+--source include/show_msg.inc
+
+ connection con1_super;
+ create database db_drop2;
+ Use db_drop2;
+ --disable_warnings
+ drop table if exists t1_432 ;
+ --enable_warnings
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1_432 (f1 char (30)) engine = $engine_type;
+ --error ER_TRG_DOES_NOT_EXIST
+ Drop trigger tr_does_not_exit;
+#cleanup
+ --disable_warnings
+ drop table if exists t1_432 ;
+ drop database if exists db_drop2;
+ --enable_warnings
+
+#Section 3.5.4.3
+# Test case: Ensure that DROP TRIGGER <trigger name> fails, with an appropriate
+# error message, if <trigger name> is not a qualified name.
+let $message= Testcase 3.5.4.3:;
+--source include/show_msg.inc
+
+ connection con1_super;
+ create database db_drop3;
+ Use db_drop3;
+ --disable_warnings
+ drop table if exists t1_433 ;
+ drop table if exists t1_433a ;
+ --enable_warnings
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1_433 (f1 char (30)) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1_433a (f1a char (5)) engine = $engine_type;
+
+ CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
+ set new.f1 = 'Trigger 3.5.4.3';
+
+# Using table
+ --error ER_PARSE_ERROR
+ Drop trigger t1.433.trg3;
+
+# Using database.table
+ --error ER_PARSE_ERROR
+ Drop trigger db_drop3.t1.433.trg3;
+
+# wrong database
+ --error ER_TRG_DOES_NOT_EXIST
+ Drop trigger mysql.trg3;
+
+# database does not exist
+ --error ER_TRG_DOES_NOT_EXIST
+ Drop trigger tbx.trg3;
+
+#cleanup
+ Drop trigger db_drop3.trg3;
+ drop table if exists t1_433;
+ drop table if exists t1_433a;
+ drop database if exists db_drop3;
+
+#Section 3.5.4.4
+# Test case: Ensure that when a database is dropped, all triggers created within
+# that database are also cleanly dropped.
+let $message= Testcase 3.5.4.4:;
+--source include/show_msg.inc
+
+ connection con1_super;
+ create database db_drop4;
+ Use db_drop4;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(30)) engine = $engine_type;
+ grant INSERT, SELECT on db_drop4.t1 to test_general;
+ Create trigger trg4 BEFORE INSERT on t1
+ for each row set new.f1='Trigger 3.5.4.4';
+ connection con1_general;
+ Use db_drop4;
+ Insert into t1 values ('Insert 3.5.4.4');
+ Select * from t1;
+ connection con1_super;
+ Drop database db_drop4;
+ Show databases like 'db_drop4';
+ select trigger_schema, trigger_name, event_object_table
+ from information_schema.triggers
+ where information_schema.triggers.trigger_name='trg4';
+ create database db_drop4;
+ Use db_drop4;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(30)) engine = $engine_type;
+ grant INSERT, SELECT on db_drop4.t1 to test_general;
+ connection con1_general;
+ Insert into t1 values ('2nd Insert 3.5.4.4');
+ Select * from t1;
+
+#Cleanup
+ connection con1_super;
+ --disable_warnings
+ --error ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4;
+ drop database if exists db_drop4;
+ --enable_warnings
+ revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+#Section 3.5.4.5
+# Test case: Ensure that when a table is dropped, all triggers for which it is the
+# subject table are also cleanly dropped.
+let $message= Testcase 3.5.4.5:;
+--source include/show_msg.inc
+
+ connection con1_super;
+ create database db_drop5;
+ Use db_drop5;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(50)) engine = $engine_type;
+ grant INSERT, SELECT on t1 to test_general;
+ Create trigger trg5 BEFORE INSERT on t1
+ for each row set new.f1='Trigger 3.5.4.5';
+ connection con1_general;
+ Use db_drop5;
+ Insert into t1 values ('Insert 3.5.4.5');
+ Select * from t1;
+ connection con1_super;
+ Drop table t1;
+ Show tables;
+ select trigger_schema, trigger_name, event_object_table
+ from information_schema.triggers
+ where information_schema.triggers.trigger_name='trg5';
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 char(50)) engine = $engine_type;
+ grant INSERT, SELECT on t1 to test_general;
+ connection con1_general;
+ Insert into t1 values ('2nd Insert 3.5.4.5');
+ Select * from t1;
+
+#Cleanup
+ connection con1_super;
+ --disable_warnings
+ --error ER_TRG_DOES_NOT_EXIST
+ drop trigger trg5;
+ drop database if exists db_drop5;
+ --enable_warnings
+ revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+
+
+##################################
+######### Section 3.5.5 ##########
+# Checks on the Subject Table #
+##################################
+
+let $message= Testcase 3.5.5:;
+--source include/show_msg.inc
+
+ connection default;
+ use test;
+
+#Section 3.5.5.1
+# Test case: Ensure that, if CREATE TRIGGER is executed with a non-existent
+# subject table, the statement fails with an appropriate error message.
+let $message= Testcase 3.5.5.1:;
+--source include/show_msg.inc
+
+ --error ER_NO_SUCH_TABLE
+ Create trigger trg1 before INSERT on t100 for each row set new.f2=1000;
+
+
+#Section 3.5.5.2
+# Test case: Ensure that, if CREATE TRIGGER is executed with a temporary table
+# as the subject table, the statement fails with an appropriate error message.
+let $message= Testcase 3.5.5.2:;
+--source include/show_msg.inc
+
+ Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
+
+ --error ER_TRG_ON_VIEW_OR_TEMP_TABLE
+ Create trigger trg2 before INSERT
+ on t1_temp for each row set new.f2=9999;
+
+#Cleanup
+ --disable_warnings
+ drop table t1_temp;
+ --enable_warnings
+
+
+#Section 3.5.5.3
+# Test case: Ensure that, if CREATE TRIGGER is executed with a view as the subject
+# table, the statement fails with an appropriate error message.
+let $message= Testcase 3.5.5.3:;
+--source include/show_msg.inc
+
+ Create view vw3 as select f118 from tb3;
+
+# OBN Not sure why the server is returning error ER_WRONG_OBJECT
+ --error ER_WRONG_OBJECT
+ Create trigger trg3 before INSERT
+ on vw3 for each row set new.f118='s';
+
+#Cleanup
+ --disable_warnings
+ drop view vw3;
+ --enable_warnings
+
+
+#Section 3.5.5.4
+# Test case: Ensure that, if CREATE TRIGGER is executed with a table that resides
+# in a different database than in which the trigger will reside, the
+# statement fails with an appropriate error message; that is, ensure that
+# the trigger and its subject table must reside in the same database.
+let $message= Testcase 3.5.5.4:;
+--source include/show_msg.inc
+
+ connection con1_super;
+ create database dbtest_one;
+ create database dbtest_two;
+ use dbtest_two;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2 (f1 char(15)) engine = $engine_type;
+ use dbtest_one;
+ --error ER_TRG_IN_WRONG_SCHEMA
+ create trigger trg4 before INSERT
+ on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
+ grant INSERT, SELECT on dbtest_two.t2 to test_general;
+ grant SELECT on dbtest_one.* to test_general;
+ connection con1_general;
+ use dbtest_two;
+ Insert into t2 values ('1st Insert 3.5.5.4');
+ Select * from t2;
+ use dbtest_one;
+ Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4');
+ Select * from dbtest_two.t2 order by f1;
+
+#Cleanup
+ connection con1_super;
+ --disable_warnings
+ revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+ DROP DATABASE if exists dbtest_one;
+ drop database if EXISTS dbtest_two;
+ --enable_warnings
+
+#####################################
+########### Section 3.5.6 ###########
+# Check on the Trigger Action Time #
+#####################################
+
+let $message= Testcase 3.5.6:;
+--source include/show_msg.inc
+
+ connection default;
+ use test;
+
+#Section 3.5.6.1
+# Test case: Ensure that a trigger definition can specify a trigger action time of BEFORE.
+# See section 3.5.1.1
+let $message= Testcase 3.5.6.1 (see Testcase 3.5.1.1);
+--source include/show_msg.inc
+
+#Section 3.5.6.2
+# Test case: Ensure that a trigger definition can specify a trigger action time of AFTER.
+# See section 3.5.1.1
+let $message= Testcase 3.5.6.2 (see Testcase 3.5.1.1);
+--source include/show_msg.inc
+
+#Section 3.5.6.3
+# Test case: Ensure that a trigger definition that specifies a trigger action
+# time that is not either BEFORE or AFTER fails, with an appropriate
+# error message, at CREATE TRIGGER time.
+let $message= Testcase 3.5.6.3:;
+--source include/show_msg.inc
+
+ --error ER_PARSE_ERROR
+ Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25;
+ --error ER_PARSE_ERROR
+ Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15;
+
+#Cleanup
+# OBN - Although none of the above should have been created we should do a cleanup
+# since if they have been created, not dropping them will affect following
+# tests.
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger tb3.trg3_1;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger tb3.trg3_2;
+ --enable_warnings
+
+#Section 3.5.6.4
+# Test case: Ensure that a trigger defined with a trigger action time of BEFORE
+# always executes its triggered action immediately before the trigger event.
+# See section 3.5.1.1
+let $message= Testcase 3.5.6.4 (see Testcase 3.5.1.1);
+--source include/show_msg.inc
+
+#Section 3.5.6.5
+# Test case: Ensure that a trigger defined with a trigger action time of AFTER
+# always executes its triggered action immediately after the trigger event.
+let $message= Testcase 3.5.6.5 (see Testcase 3.5.1.1);
+--source include/show_msg.inc
+
+#############################
+####### Section 3.5.7 #######
+# Check on Trigger Event #
+#############################
+
+#Section 3.5.7.1
+#Test case: Ensure that a trigger definition can specify a trigger event of INSERT.
+let $message= Testcase 3.5.7.1 (see Testcase 3.5.1.1);
+--source include/show_msg.inc
+
+#Section 3.5.7.2
+# Test case: Ensure that a trigger definition can specify a trigger event of UPDATE.
+let $message= Testcase 3.5.7.2 (see Testcase 3.5.1.1);
+--source include/show_msg.inc
+
+#Section 3.5.7.3
+# Test case: Ensure that a trigger definition can specify a trigger event of DELETE.
+let $message= Testcase 3.5.7.3 (see Testcase 3.5.1.1);
+--source include/show_msg.inc
+
+#Section 3.5.7.4
+# Test case: Ensure that a trigger definition that specifies a trigger event that
+# is not either INSERT, UPDATE or DELETE fails, with an appropriate error
+# message, at CREATE TRIGGER time.
+let $message= Testcase 3.5.7.4:;
+--source include/show_msg.inc
+
+ --error ER_PARSE_ERROR
+ Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5;
+ --error ER_PARSE_ERROR
+ Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1;
+
+#Cleanup
+# OBN - Although none of the above should have been created we should do a cleanup
+# since if they have been created, not dropping them will affect following
+# tests.
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger tb3.trg4_1;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger tb3.trg4_2;
+ --enable_warnings
+
+#Section 3.5.7.5 / 3.5.7.6
+# Test case: Ensure that it is possible to create multiple BEFORE INSERT
+# triggers on the same table
+#
+let $message= Testcase 3.5.7.5 / 3.5.7.6:;
+--source include/show_msg.inc
+
+ Create trigger trg5_1 BEFORE INSERT
+ on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
+
+ Create trigger trg5_2 BEFORE INSERT
+ on tb3 for each row set new.f122='Trigger2 3.5.7.5';
+
+ Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
+ Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
+ update tb3 set f122='Update 3.5.7.6' where f121= 'Test 3.5.7.5/6';
+ Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg5_1;
+ drop trigger trg5_2;
+ delete from tb3 where f121='Test 3.5.7.5/6';
+ --enable_warnings
+
+
+#Section 3.5.7.7 / 3.5.7.8
+# Test case: Ensure that it is possible to create multiple AFTER INSERT
+# triggers on the same table
+let $message= Testcase 3.5.7.7 / 3.5.7.8:;
+--source include/show_msg.inc
+
+ set @test_var='Before trig 3.5.7.7';
+ Create trigger trg6_1 AFTER INSERT
+ on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
+
+ Create trigger trg6_2 AFTER INSERT
+ on tb3 for each row set @test_var='Trigger2 3.5.7.7';
+
+ select @test_var;
+ Insert into tb3 (f121,f122) values ('Test 3.5.7.7/8','Insert 3.5.7.7');
+ Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
+ select @test_var;
+ update tb3 set f122='Update 3.5.7.8' where f121= 'Test 3.5.7.7/8';
+ Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
+ select @test_var;
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg6_1;
+ drop trigger trg6_2;
+ delete from tb3 where f121='Test 3.5.7.7/8';
+ --enable_warnings
+
+
+#Section 3.5.7.9 / 3.5.7.10
+# Test case: Ensure that it is possible to create multiple BEFORE UPDATE
+# triggers on the same table
+let $message= Testcase 3.5.7.9/10:;
+--source include/show_msg.inc
+
+ Create trigger trg7_1 BEFORE UPDATE
+ on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
+
+ Create trigger trg7_2 BEFORE UPDATE
+ on tb3 for each row set new.f122='Trigger2 3.5.7.9';
+
+ Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
+ Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
+ update tb3 set f122='update 3.5.7.10' where f121='Test 3.5.7.9/10';
+ Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg7_1;
+ drop trigger trg7_2;
+ delete from tb3 where f121='Test 3.5.7.9/10';
+
+#Section 3.5.7.11 / 3.5.7.12
+# Test case: Ensure that it is possible to create multiple AFTER UPDATE
+# triggers on the same table
+let $message= Testcase 3.5.7.11/12:;
+--source include/show_msg.inc
+
+ set @test_var='Before trig 3.5.7.11';
+ Create trigger trg8_1 AFTER UPDATE
+ on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
+
+ Create trigger trg8_2 AFTER UPDATE
+ on tb3 for each row set @test_var='Trigger2 3.5.7.11';
+
+ select @test_var;
+ Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12');
+ select @test_var;
+ Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
+ update tb3 set f122='update 3.5.7.12' where f121='Test 3.5.7.11/12';
+ Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
+ select @test_var;
+ delete from tb3 where f121='Test 3.5.7.11/12';
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg8_1;
+ drop trigger trg8_2;
+ delete from tb3 where f121='Test 3.5.7.11/12';
+
+#Section 3.5.7.13 / 3.5.7.14
+# Test case: Ensure that it is possible to create multiple BEFORE DELETE
+# triggers on the same table
+let $message= Testcase 3.5.7.13/14:;
+--source include/show_msg.inc
+
+ set @test_var=1;
+ Create trigger trg9_1 BEFORE DELETE
+ on tb3 for each row set @test_var=@test_var+1;
+
+ Create trigger trg9_2 BEFORE DELETE
+ on tb3 for each row set @test_var=@test_var+10;
+
+ select @test_var;
+ Insert into tb3 (f121,f122) values ('Test 3.5.7.13/14','Insert 3.5.7.13');
+ Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
+ select @test_var;
+ delete from tb3 where f121='Test 3.5.7.13/14';
+ Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
+ select @test_var;
+ delete from tb3 where f121='Test 3.5.7.13/14';
+ select @test_var;
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg9_1;
+ drop trigger trg9_2;
+ delete from tb3 where f121='Test 3.5.7.13/14';
+
+#Section 3.5.7.15 / 3.5.7.16
+# Test case: Ensure that possible to create multiple AFTER DELETE triggers
+# on the same table
+let $message= Testcase 3.5.7.15/16:;
+--source include/show_msg.inc
+
+ set @test_var=1;
+ Create trigger trg_3_406010_1 AFTER DELETE
+ on tb3 for each row set @test_var=@test_var+5;
+
+ Create trigger trg_3_406010_2 AFTER DELETE
+ on tb3 for each row set @test_var=@test_var+50;
+
+ --error ER_TRG_ALREADY_EXISTS
+ Create trigger trg_3_406010_1 AFTER INSERT
+ on tb3 for each row set @test_var=@test_var+1;
+
+ select @test_var;
+ Insert into tb3 (f121,f122) values ('Test 3.5.7.15/16','Insert 3.5.7.15/16');
+ Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
+ select @test_var;
+ delete from tb3 where f121='Test 3.5.7.15/16';
+ Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
+ select @test_var;
+ delete from tb3 where f121='Test 3.5.7.15/16';
+ select @test_var;
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg_3_406010_1;
+ drop trigger trg_3_406010_2;
+ delete from tb3 where f121='Test 3.5.7.15/16';
+ --enable_warnings
+
+
+#Section 3.5.7.17
+# Test case: Ensure that it is possible to have a BEFORE INSERT, an AFTER INSERT,
+# a BEFORE UPDATE, an AFTER UPDATE, a BEFORE DELETE, and an AFTER DELETE
+# trigger on the same table; that is, ensure that every persistent base
+# table may be the subject table for exactly six triggers
+let $message= Testcase 3.5.7.17 (see Testcase 3.5.1.1);
+--source include/show_msg.inc
+
+
+# Cleanup section 3.5
+ connection default;
+ drop user test_general@localhost;
+ drop user test_general;
+ drop user test_super@localhost;
+
+DROP TABLE test.tb3;
+
+
+set GLOBAL sql_mode=default;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_08.inc b/mysql-test/suite/funcs_1/triggers/triggers_08.inc
new file mode 100644
index 00000000..7169f160
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_08.inc
@@ -0,0 +1,562 @@
+#======================================================================
+#
+# Trigger Tests
+# (test case numbering refer to requirement document TP v1.1)
+#======================================================================
+# WL#4084: enable disabled parts, 2007-11-15 hhunger
+set GLOBAL sql_mode="";
+
+USE test;
+--source suite/funcs_1/include/tb3.inc
+
+
+
+# General setup for Trigger tests
+let $message= Testcase: 3.5:;
+--source include/show_msg.inc
+
+--disable_abort_on_error
+
+ create User test_general@localhost;
+ set password for test_general@localhost = password('PWD');
+ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
+ grant SELECT,UPDATE,DELETE,INSERT on test.* to test_general@localhost;
+
+ create User test_super@localhost;
+ set password for test_super@localhost = password('PWD');
+ grant ALL on *.* to test_super@localhost with grant OPTION;
+ connect (con2_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connect (con2_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+ connection default;
+
+#################################
+####### Section 3.5.8 ###########
+# Checks on Triggered Actions #
+#################################
+
+#Section 3.5.8.1
+# Testcase: Ensure that the triggered action of every trigger always executes
+# correctly and the results in all expected changes made to the database
+let $message= Testcase 3.5.8.1: (implied in previous tests);
+--source include/show_msg.inc
+
+#Section 3.5.8.2
+# Testcase: Ensure that the triggered actions of every trigger never results
+# in an unexpected change made to the database.
+let $message= Testcase 3.5.8.2: (implied in previous tests);
+--source include/show_msg.inc
+
+
+#Section 3.5.8.3 / 3.5.8.4
+#Test case: Ensure that the triggered action can any valid SQL statement / set
+# of valid SQL statements, provided the statements are written within
+# a BEGIN/END compound statement construct
+# OBN - At this point the tests focuses on the the INSERT/UPDATE/DELETE SQL statements
+# as there are the most likely to be used in triggers
+let $message= Testcase 3.5.8.3/4:;
+--source include/show_msg.inc
+
+# creating test tables to perform the trigger SQL on
+ connection con2_super;
+ create database db_test;
+ grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
+ grant LOCK TABLES on db_test.* to test_general;
+ Use db_test;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1_i (
+ i120 char ascii not null DEFAULT b'101',
+ i136 smallint zerofill not null DEFAULT 999,
+ i144 int zerofill not null DEFAULT 99999,
+ i163 decimal (63,30)) engine=$engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1_u (
+ u120 char ascii not null DEFAULT b'101',
+ u136 smallint zerofill not null DEFAULT 999,
+ u144 int zerofill not null DEFAULT 99999,
+ u163 decimal (63,30)) engine=$engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1_d (
+ d120 char ascii not null DEFAULT b'101',
+ d136 smallint zerofill not null DEFAULT 999,
+ d144 int zerofill not null DEFAULT 99999,
+ d163 decimal (63,30)) engine=$engine_type;
+ Insert into t1_u values ('a',111,99999,999.99);
+ Insert into t1_u values ('b',222,99999,999.99);
+ Insert into t1_u values ('c',333,99999,999.99);
+ Insert into t1_u values ('d',222,99999,999.99);
+ Insert into t1_u values ('e',222,99999,999.99);
+ Insert into t1_u values ('f',333,99999,999.99);
+ Insert into t1_d values ('a',111,99999,999.99);
+ Insert into t1_d values ('b',222,99999,999.99);
+ Insert into t1_d values ('c',333,99999,999.99);
+ Insert into t1_d values ('d',444,99999,999.99);
+ Insert into t1_d values ('e',222,99999,999.99);
+ Insert into t1_d values ('f',222,99999,999.99);
+
+let $message= 3.5.8.4 - multiple SQL;
+--source include/show_msg.inc
+# Trigger definition - multiple SQL
+ use test;
+ delimiter //;
+ Create trigger trg1 AFTER INSERT on tb3 for each row
+ BEGIN
+ insert into db_test.t1_i
+ values (new.f120, new.f136, new.f144, new.f163);
+ update db_test.t1_u
+ set u144=new.f144, u163=new.f163
+ where u136=new.f136;
+ delete from db_test.t1_d where d136= new.f136;
+ select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
+ where u136= new.f136;
+ END//
+ delimiter ;//
+
+# Test trigger execution - multiple SQL
+ connection con2_general;
+ Use test;
+ set @test_var=0;
+ Insert into tb3 (f120, f122, f136, f144, f163)
+ values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
+ Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
+ --sorted_result
+ select * from db_test.t1_i;
+ --sorted_result
+ select * from db_test.t1_u;
+ --sorted_result
+ select * from db_test.t1_d;
+ select @test_var;
+
+
+let $message= 3.5.8.4 - single SQL - insert;
+--source include/show_msg.inc
+# Trigger definition - single SQL Insert
+ connection con2_super;
+ delimiter //;
+ Create trigger trg2 BEFORE UPDATE on tb3 for each row
+ BEGIN
+ insert into db_test.t1_i
+ values (new.f120, new.f136, new.f144, new.f163);
+ END//
+ delimiter ;//
+
+# Trigger exeution - single SQL Insert
+ connection con2_general;
+ Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+ select * from db_test.t1_i order by i120;
+ update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert'
+ where f122='Test 3.5.8.4';
+ Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+ select * from db_test.t1_i order by i120;
+
+
+let $message= 3.5.8.4 - single SQL - update;
+--source include/show_msg.inc
+# Trigger definition - single SQL update
+ connection con2_super;
+ drop trigger trg2;
+ Create trigger trg3 BEFORE UPDATE on tb3 for each row
+ update db_test.t1_u
+ set u120=new.f120
+ where u136=new.f136;
+
+# Trigger exeution - single SQL - update;
+ connection con2_general;
+ update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
+ where f122='Test 3.5.8.4-Single Insert';
+ Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+ select * from db_test.t1_u order by u120;
+
+
+let $message= 3.5.8.3/4 - single SQL - delete;
+--source include/show_msg.inc
+# Trigger definition - single SQL delete
+ connection con2_super;
+ drop trigger trg3;
+ Create trigger trg4 AFTER UPDATE on tb3 for each row
+ delete from db_test.t1_d where d136= new.f136;
+
+# Trigger exeution - single SQL delete
+ connection con2_general;
+#lock tables tb3 write, db_test.t1_i write, db_test.t1_u write, db_test.t1_d write;
+ update tb3 set f120='D', f136=444,
+ f122='Test 3.5.8.4-Single Delete'
+ where f122='Test 3.5.8.4-Single Update';
+#unlock tables;
+ Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+ select * from db_test.t1_d order by d120;
+
+
+let $message= 3.5.8.3/4 - single SQL - select;
+--source include/show_msg.inc
+# Trigger definition - single SQL select
+ connection con2_super;
+ drop trigger trg4;
+ Create trigger trg5 AFTER UPDATE on tb3 for each row
+ select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
+ where u136= new.f136;
+
+# Trigger exeution - single SQL select
+ connection con2_general;
+ set @test_var=0;
+ update tb3 set f120='S', f136=111,
+ f122='Test 3.5.8.4-Single Select'
+ where f122='Test 3.5.8.4-Single Delete';
+ Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
+ select @test_var;
+
+#Cleanup
+ connection default;
+ --disable_warnings
+ drop trigger trg1;
+ drop trigger trg5;
+ drop database if exists db_test;
+ delete from tb3 where f122 like 'Test 3.5.8.4%';
+ revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
+ --enable_warnings
+
+
+#Section 3.5.8.5 (IF)
+# Test case: Ensure that the stored procedure-specific flow control statement like IF
+# works correctly when it is a part of the triggered action portion of a
+# trigger definition.
+let $message= Testcase 3.5.8.5 (IF):;
+--source include/show_msg.inc
+
+ delimiter //;
+ create trigger trg2 before insert on tb3 for each row
+ BEGIN
+ IF new.f120='1' then
+ set @test_var='one', new.f120='2';
+ ELSEIF new.f120='2' then
+ set @test_var='two', new.f120='3';
+ ELSEIF new.f120='3' then
+ set @test_var='three', new.f120='4';
+ END IF;
+
+ IF (new.f120='4') and (new.f136=10) then
+ set @test_var2='2nd if', new.f120='d';
+ ELSE
+ set @test_var2='2nd else', new.f120='D';
+ END IF;
+ END//
+ delimiter ;//
+
+ set @test_var='Empty', @test_var2=0;
+ Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
+ select f120, f122, f136, @test_var, @test_var2
+ from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+ Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
+ select f120, f122, f136, @test_var, @test_var2
+ from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+ Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
+ select f120, f122, f136, @test_var, @test_var2
+ from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+ Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
+ select f120, f122, f136, @test_var, @test_var2
+ from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
+
+ delimiter //;
+ --error ER_PARSE_ERROR
+ create trigger trg3 before update on tb3 for each row
+ BEGIN
+ ELSEIF new.f120='2' then
+ END IF;
+ END//
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg3//
+
+ --error ER_PARSE_ERROR
+ create trigger trg4 before update on tb3 for each row
+ BEGIN
+ IF (new.f120='4') and (new.f136=10) then
+ set @test_var2='2nd if', new.f120='d';
+ ELSE
+ set @test_var2='2nd else', new.f120='D';
+ END//
+ delimiter ;//
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4;
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg2;
+ delete from tb3 where f121='Test 3.5.8.5-if';
+ --enable_warnings
+
+
+#Section 3.5.8.5 (CASE)
+# Test case: Ensure that the stored procedure-specific flow control statement
+# like CASE works correctly when it is a part of the triggered action
+# portion of a trigger definition.
+let $message= Testcase 3.5.8.5-case:;
+--source include/show_msg.inc
+
+ delimiter //;
+ create trigger trg3 before insert on tb3 for each row
+ BEGIN
+ SET new.f120=char(ascii(new.f120)-32);
+ CASE
+ when new.f136<100 then set new.f136=new.f136+120;
+ when new.f136<10 then set new.f144=777;
+ when new.f136>100 then set new.f120=new.f136-1;
+ END case;
+ CASE
+ when new.f136=200 then set @test_var=CONCAT(new.f120, '=');
+ ELSE set @test_var=concat(new.f120, '*');
+ END case;
+ CASE new.f144
+ when 1 then set @test_var=concat(@test_var, 'one');
+ when 2 then set @test_var=concat(@test_var, 'two');
+ when 3 then set @test_var=concat(@test_var, 'three');
+ when 4 then set @test_var=concat(@test_var, 'four');
+ when 5 then set @test_var=concat(@test_var, 'five');
+ when 6 then set @test_var=concat(@test_var, 'six');
+ when 7 then set @test_var=concat(@test_var, 'seven');
+ when 8 then set @test_var=concat(@test_var, 'eight');
+ when 9 then set @test_var=concat(@test_var, 'nine');
+ when 10 then set @test_var=concat(@test_var, 'ten');
+ when 11 then set @test_var=concat(@test_var, 'eleven');
+ when 12 then set @test_var=concat(@test_var, 'twelve');
+ when 13 then set @test_var=concat(@test_var, 'thirteen');
+ when 14 then set @test_var=concat(@test_var, 'fourteen');
+ when 15 then set @test_var=concat(@test_var, 'fifteen');
+ ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
+ END case;
+ END//
+ delimiter ;//
+
+ set @test_var='Empty';
+ Insert into tb3 (f120, f122, f136, f144)
+ values ('a', 'Test 3.5.8.5-case', 5, 7);
+ select f120, f122, f136, f144, @test_var
+ from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+ Insert into tb3 (f120, f122, f136, f144)
+ values ('b', 'Test 3.5.8.5-case', 71,16);
+ select f120, f122, f136, f144, @test_var
+ from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+ Insert into tb3 (f120, f122, f136, f144)
+ values ('c', 'Test 3.5.8.5-case', 80,1);
+ select f120, f122, f136, f144, @test_var
+ from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+ Insert into tb3 (f120, f122, f136)
+ values ('d', 'Test 3.5.8.5-case', 152);
+ select f120, f122, f136, f144, @test_var
+ from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+ Insert into tb3 (f120, f122, f136, f144)
+ values ('e', 'Test 3.5.8.5-case', 200, 8);
+ select f120, f122, f136, f144, @test_var
+ from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+ --error 0, ER_SP_CASE_NOT_FOUND
+ Insert into tb3 (f120, f122, f136, f144)
+ values ('f', 'Test 3.5.8.5-case', 100, 8);
+ select f120, f122, f136, f144, @test_var
+ from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
+
+ delimiter //;
+ --error ER_PARSE_ERROR
+ create trigger trg3a before update on tb3 for each row
+ BEGIN
+ CASE
+ when new.f136<100 then set new.f120='p';
+ END//
+ delimiter ;//
+
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg3a;
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg3;
+ delete from tb3 where f121='Test 3.5.8.5-case';
+ --enable_warnings
+
+#Section 3.5.8.5 (LOOP)
+# Test case: Ensure that the stored procedure-specific flow control
+# statement like LOOP / LEAVE work correctly when they are
+# part of the triggered action portion of a trigger definition.
+let $message= Testcase 3.5.8.5-loop/leave:;
+--source include/show_msg.inc
+
+ delimiter //;
+ Create trigger trg4 after insert on tb3 for each row
+ BEGIN
+ set @counter=0, @flag='Initial';
+ Label1: loop
+ if new.f136<new.f144 then
+ set @counter='Nothing to loop';
+ leave Label1;
+ else
+ set @counter=@counter+1;
+ if new.f136=new.f144+@counter then
+ set @counter=concat(@counter, ' loops');
+ leave Label1;
+ end if;
+ end if;
+ iterate label1;
+ set @flag='Final';
+ END loop Label1;
+ END//
+ delimiter ;//
+ Insert into tb3 (f122, f136, f144)
+ values ('Test 3.5.8.5-loop', 2, 8);
+ select @counter, @flag;
+ Insert into tb3 (f122, f136, f144)
+ values ('Test 3.5.8.5-loop', 11, 8);
+ select @counter, @flag;
+
+
+ delimiter //;
+
+ --error ER_PARSE_ERROR
+ Create trigger trg4_2 after update on tb3 for each row
+ BEGIN
+ Label1: loop
+ set @counter=@counter+1;
+ END;
+ END//
+ delimiter ;//
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4_2;
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg4;
+ delete from tb3 where f122='Test 3.5.8.5-loop';
+ --enable_warnings
+
+#Section 3.5.8.5 (REPEAT ITERATE)
+#Testcase: Ensure that the stored procedure-specific flow control statements
+# like REPEAT work correctly when they are part of the triggered action
+# portion of a trigger definition.
+let $message= Testcase 3.5.8.5-repeat:;
+--source include/show_msg.inc
+
+ delimiter //;
+ Create trigger trg6 after insert on tb3 for each row
+ BEGIN
+ rp_label: REPEAT
+ SET @counter1 = @counter1 + 1;
+ IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
+ END IF;
+ SET @counter2 = @counter2 + 1;
+ UNTIL @counter1> new.f136 END REPEAT rp_label;
+ END//
+ delimiter ;//
+
+ set @counter1= 0, @counter2= 0;
+ Insert into tb3 (f122, f136)
+ values ('Test 3.5.8.5-repeat', 13);
+ select @counter1, @counter2;
+
+
+ delimiter //;
+ --error ER_PARSE_ERROR
+ Create trigger trg6_2 after update on tb3 for each row
+ BEGIN
+ REPEAT
+ SET @counter2 = @counter2 + 1;
+ END//
+ delimiter ;//
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg6;
+ delete from tb3 where f122='Test 3.5.8.5-repeat';
+ --enable_warnings
+
+
+#Section 3.5.8.5 (WHILE)
+# Test case: Ensure that the stored procedure-specific flow control
+# statements WHILE, work correctly when they are part of
+# the triggered action portion of a trigger definition.
+let $message= Testcase 3.5.8.5-while:;
+--source include/show_msg.inc
+
+ delimiter //;
+ Create trigger trg7 after insert on tb3 for each row
+ wl_label: WHILE @counter1 < new.f136 DO
+ SET @counter1 = @counter1 + 1;
+ IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
+ END IF;
+ SET @counter2 = @counter2 + 1;
+ END WHILE wl_label//
+ delimiter ;//
+
+ set @counter1= 0, @counter2= 0;
+ Insert into tb3 (f122, f136)
+ values ('Test 3.5.8.5-while', 7);
+ select @counter1, @counter2;
+ delimiter //;
+ --error ER_PARSE_ERROR
+ Create trigger trg7_2 after update on tb3 for each row
+ BEGIN
+ WHILE @counter1 < new.f136
+ SET @counter1 = @counter1 + 1;
+ END//
+ delimiter ;//
+
+#Cleanup
+ --disable_warnings
+ delete from tb3 where f122='Test 3.5.8.5-while';
+ drop trigger trg7;
+ --enable_warnings
+
+#Section 3.5.8.6
+# Test case: Ensure that a trigger definition that includes a CALL to a stored
+# procedure fails, at CREATE TRIGGER time, with an appropriate error
+# message. Not more valid requirement.
+let $message= Testcase 3.5.8.6: (requirement void);
+--source include/show_msg.inc
+ delimiter //;
+ CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END//
+
+ CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW
+ BEGIN
+ CALL sp_01 ();
+ END//
+ delimiter ;//
+ Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101);
+ update tb3 set f120='S', f136=111,
+ f122='Test 3.5.8.6-tr8_1'
+ where f122='Test 3.5.8.6-insert';
+ select f120, f122
+ from tb3 where f122 like 'Test 3.5.8.6%' order by f120;
+ DROP TRIGGER trg8_1;
+ DROP PROCEDURE sp_01;
+
+
+#Section 3.5.8.7
+# Test case: Ensure that a trigger definition that includes a
+# transaction-delimiting statement (e.g. COMMIT,
+# ROLLBACK, START TRANSACTION) fails, at CREATE TRIGGER
+# time, with an appropriate error message.
+let $message= Testcase 3.5.8.7;
+--source include/show_msg.inc
+
+ delimiter //;
+ --error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+ Create trigger trg9_1 before update on tb3 for each row
+ BEGIN
+ Start transaction;
+ Set new.f120='U';
+ Commit;
+ END//
+
+ --error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+ Create trigger trg9_2 before delete on tb3 for each row
+ BEGIN
+ Start transaction;
+ Set @var2=old.f120;
+ Rollback;
+ END//
+ delimiter ;//
+
+
+# Cleanup section 3.5
+ connection default;
+ drop user test_general@localhost;
+ drop user test_general;
+ drop user test_super@localhost;
+
+DROP TABLE test.tb3;
+set GLOBAL sql_mode=default;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_09.inc b/mysql-test/suite/funcs_1/triggers/triggers_09.inc
new file mode 100644
index 00000000..93762b36
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_09.inc
@@ -0,0 +1,323 @@
+#======================================================================
+#
+# Trigger Tests
+# (test case numbering refer to requirement document TP v1.1)
+#======================================================================
+
+USE test;
+--source suite/funcs_1/include/tb3.inc
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
+
+#################################
+####### Section 3.5.9 ###########
+# Checks on old and new rows #
+#################################
+
+#Section 3.5.9.1
+#Test case: Ensure that every trigger executes its triggered action on each row
+# that meets the conditions stated in the trigger definition.
+#Section 3.5.9.2
+#Testcase: Ensure that a trigger never executes its triggered action on any row
+# that doesn't meet the conditions stated in the trigger definition.
+let $message= Testcase 3.5.9.1/2:;
+--source include/show_msg.inc
+
+ Create trigger trg1 BEFORE UPDATE on tb3 for each row
+ set new.f142 = 94087, @counter=@counter+1;
+--disable_query_log
+ select count(*) as TotalRows from tb3;
+ select count(*) as Affected from tb3 where f130<100;
+ select count(*) as NotAffected from tb3 where f130>=100;
+ select count(*) as NewValuew from tb3 where f142=94087;
+--enable_query_log
+ set @counter=0;
+ Update tb3 Set f142='1' where f130<100;
+ select count(*) as ExpectedChanged, @counter as TrigCounter
+ from tb3 where f142=94087;
+ select count(*) as ExpectedNotChange from tb3
+ where f130<100 and f142<>94087;
+ select count(*) as NonExpectedChanged from tb3
+ where f130>=130 and f142=94087;
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg1;
+ --enable_warnings
+
+
+#Section 3.5.9.3
+#Test case: Ensure that a reference to OLD.<column name> always correctly refers
+# to the values of the specified column of the subject table before a
+# data row is updated or deleted.
+let $message= Testcase 3.5.9.3:;
+--source include/show_msg.inc
+
+ Create trigger trg2_a before update on tb3 for each row
+ set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
+ @tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
+ @tr_var_b4_163=old.f163;
+
+ Create trigger trg2_b after update on tb3 for each row
+ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
+ @tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
+ @tr_var_af_163=old.f163;
+
+ Create trigger trg2_c before delete on tb3 for each row
+ set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
+ @tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
+ @tr_var_b4_163=old.f163;
+
+ Create trigger trg2_d after delete on tb3 for each row
+ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
+ @tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
+ @tr_var_af_163=old.f163;
+
+
+--disable_query_log
+ set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0,
+ @tr_var_b4_136=0, @tr_var_b4_163=0;
+ set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0,
+ @tr_var_af_136=0, @tr_var_af_163=0;
+ select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+ @tr_var_b4_136, @tr_var_b4_163;
+ select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+ @tr_var_af_136, @tr_var_af_163;
+--enable_query_log
+
+ Insert into tb3 (f122, f136, f163)
+ values ('Test 3.5.9.3', 7, 123.17);
+ Update tb3 Set f136=8 where f122='Test 3.5.9.3';
+
+ select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
+ select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+ @tr_var_b4_136, @tr_var_b4_163;
+ select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+ @tr_var_af_136, @tr_var_af_163;
+
+--disable_query_log
+ set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0,
+ @tr_var_b4_136=0, @tr_var_b4_163=0;
+ set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0,
+ @tr_var_af_136=0, @tr_var_af_163=0;
+ select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+ @tr_var_b4_136, @tr_var_b4_163;
+ select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+ @tr_var_af_136, @tr_var_af_163;
+--enable_query_log
+
+ delete from tb3 where f122='Test 3.5.9.3';
+
+ select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
+ select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+ @tr_var_b4_136, @tr_var_b4_163;
+ select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+ @tr_var_af_136, @tr_var_af_163;
+#Cleanup
+ --disable_warnings
+ drop trigger trg2_a;
+ drop trigger trg2_b;
+ drop trigger trg2_c;
+ drop trigger trg2_d;
+ --enable_warnings
+
+#Section 3.5.9.4
+#Test case: Ensure that a reference to NEW.<column name> always correctly refers
+# to the values of the specified column of the subject table after an
+# existing data row has been updated or a new data row has been inserted.
+let $message= Testcase 3.5.9.4:;
+--source include/show_msg.inc
+
+ Create trigger trg3_a before insert on tb3 for each row
+ set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
+ @tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
+ @tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
+
+ Create trigger trg3_b after insert on tb3 for each row
+ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
+ @tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
+ @tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
+
+ Create trigger trg3_c before update on tb3 for each row
+ set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
+ @tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
+ @tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
+
+ Create trigger trg3_d after update on tb3 for each row
+ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
+ @tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
+ @tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
+
+--disable_query_log
+ set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0,
+ @tr_var_b4_136=0, @tr_var_b4_151=0, @tr_var_b4_163=0;
+ set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0,
+ @tr_var_af_136=0, @tr_var_af_151=0, @tr_var_af_163=0;
+ select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+ @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+ select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+ @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+--enable_query_log
+
+ Insert into tb3 (f122, f136, f151, f163)
+ values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
+
+ select f118, f121, f122, f136, f151, f163 from tb3
+ where f122 like 'Test 3.5.9.4%' order by f163;
+ select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+ @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+ select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+ @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+
+--disable_query_log
+ set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0,
+ @tr_var_b4_136=0, @tr_var_b4_151=0, @tr_var_b4_163=0;
+ set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0,
+ @tr_var_af_136=0, @tr_var_af_151=0, @tr_var_af_163=0;
+ select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+ @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+ select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+ @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+--enable_query_log
+
+ 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
+ where f122 like 'Test 3.5.9.4-trig' order by f163;
+ select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
+ @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
+ select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
+ @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
+#Cleanup
+ --disable_warnings
+ drop trigger trg3_a;
+ drop trigger trg3_b;
+ drop trigger trg3_c;
+ drop trigger trg3_d;
+ delete from tb3 where f122='Test 3.5.9.4-trig';
+ --enable_warnings
+
+
+#Section 3.5.9.5
+# Test case: Ensure that the definition of an INSERT trigger can include a
+# reference to NEW. <Column name>.
+let $message= Testcase 3.5.9.5: (implied in previous tests);
+--source include/show_msg.inc
+
+#Section 3.5.9.6
+# Test case: Ensure that the definition of an INSERT trigger cannot include
+# a reference to OLD. <Column name>.
+let $message= Testcase 3.5.9.6:;
+--source include/show_msg.inc
+
+ --error ER_TRG_NO_SUCH_ROW_IN_TRG
+ create trigger trg4a before insert on tb3 for each row
+ set @temp1= old.f120;
+ --error ER_TRG_CANT_CHANGE_ROW
+ create trigger trg4b after insert on tb3 for each row
+ set old.f120= 'test';
+
+#Cleanup
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4a;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg4b;
+ --enable_warnings
+
+
+#Section 3.5.9.7
+# Test case: Ensure that the definition of an UPDATE trigger can include a
+# reference to NEW. <Column name>.
+let $message= Testcase 3.5.9.7: (implied in previous tests);
+--source include/show_msg.inc
+
+#Section 3.5.9.8
+# Test case: Ensure that the definition of an UPDATE trigger cannot include a
+# reference to OLD. <Column name>.
+let $message= Testcase 3.5.9.8: (implied in previous tests);
+--source include/show_msg.inc
+
+#Section 3.5.9.9
+# Test case: Ensure that the definition of a DELETE trigger cannot include a
+# reference to NEW.<column name>.
+let $message= Testcase 3.5.9.9:;
+--source include/show_msg.inc
+
+ --error ER_TRG_NO_SUCH_ROW_IN_TRG
+ create trigger trg5a before DELETE on tb3 for each row
+ set @temp1=new.f122;
+ --error ER_TRG_NO_SUCH_ROW_IN_TRG
+ create trigger trg5b after DELETE on tb3 for each row
+ set new.f122='test';
+
+#Cleanup
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg5a;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg5b;
+ --enable_warnings
+
+
+#Section 3.5.9.10
+# Test case: Ensure that the definition of a DELETE trigger can include a reference
+# to OLD.<column name>.
+let $message= Testcase 3.5.9.10: (implied in previous tests);
+--source include/show_msg.inc
+
+
+#Section 3.5.9.11
+# Testcase: Ensure that trigger definition that includes a referance to
+# NEW.<colunm name> fails with an appropriate error message,
+# at CREATE TRIGGER time, if the trigger event in not INSERT or UPDATE
+let $message= Testcase 3.5.9.11: covered by 3.5.9.9;
+--source include/show_msg.inc
+
+
+#Section 3.5.9.12
+# Testcase: Ensure that trigger definition that includes a referance to
+# OLD.<column name> fails with an appropriate error message, at
+# CREATE TRIGGER time, if the trigger event is not DELETE or UPDATE
+let $message= Testcase 3.5.9.12: covered by 3.5.9.6;
+--source include/show_msg.inc
+
+
+#Section 3.5.9.13
+# Test case: Ensure that all references to OLD. <Column name> are read-only,
+# that is, that they cannot be used to modify a data row.
+let $message= Testcase 3.5.9.13:;
+--source include/show_msg.inc
+
+ --error ER_TRG_CANT_CHANGE_ROW
+ create trigger trg6a before UPDATE on tb3 for each row
+ set old.f118='C', new.f118='U';
+ --error ER_TRG_CANT_CHANGE_ROW
+ create trigger trg6b after INSERT on tb3 for each row
+ set old.f136=163, new.f118='U';
+ --error ER_TRG_CANT_CHANGE_ROW
+ create trigger trg6c after UPDATE on tb3 for each row
+ set old.f136=NULL;
+
+#Cleanup
+ --disable_warnings
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg6a;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg6b;
+ --error 0, ER_TRG_DOES_NOT_EXIST
+ drop trigger trg6c;
+ --enable_warnings
+
+
+#Section 3.5.9.14
+# Test case: Ensure that all references to NEW. <Column name> may be used both to
+# read a data row and to modify a data row
+let $message= Testcase 3.5.9.14: (implied in previous tests);
+--source include/show_msg.inc
+
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc
new file mode 100644
index 00000000..88b04a0e
--- /dev/null
+++ b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc
@@ -0,0 +1,430 @@
+#======================================================================
+#
+# Trigger Tests
+# (test case numbering refer to requirement document TP v1.1)
+#======================================================================
+# WL#4084: enable disabled parts, 2007-11-15, hhunger
+
+USE test;
+--source suite/funcs_1/include/tb3.inc
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb3.txt'
+into table tb3;
+
+
+--disable_abort_on_error
+
+##############################################
+################ Section 3.5.10 #################
+# Check on Trigger Activation
+##############################################
+#Section 3.5.10.1
+# Test case: Ensure that every trigger that should be activated by
+# every possible type of implicit insertion into its subject
+# table (INSERT into a view based on the subject table) is
+# indeed activated correctly
+#Section 3.5.10.2
+# Test case: Ensure that every trigger that should be activated by every
+# possible type of implicit insertion into its subject table
+# (UPDATE into a view based on the subject table) is indeed
+# activated correctly
+#Section 3.5.10.3
+# Test case: Ensure that every trigger that should be activated by every
+# possible type of implicit insertion into its subject table
+# (DELETE from a view based on the subject table) is indeed
+# activated correctly
+let $message= Testcase 3.5.10.1/2/3:;
+--source include/show_msg.inc
+
+ Create view vw11 as select * from tb3
+ where f122 like 'Test 3.5.10.1/2/3%';
+ Create trigger trg1a before insert on tb3
+ for each row set new.f163=111.11;
+ Create trigger trg1b after insert on tb3
+ for each row set @test_var='After Insert';
+ Create trigger trg1c before update on tb3
+ for each row set new.f121='Y', new.f122='Test 3.5.10.1/2/3-Update';
+ Create trigger trg1d after update on tb3
+ for each row set @test_var='After Update';
+ Create trigger trg1e before delete on tb3
+ for each row set @test_var=5;
+ Create trigger trg1f after delete on tb3
+ for each row set @test_var= 2* @test_var+7;
+
+#Section 3.5.10.1
+ Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1);
+ Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2);
+ Insert into vw11 (f122, f151) values ('Not in View', 3);
+ select f121, f122, f151, f163
+ from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+ --sorted_result
+ select f121, f122, f151, f163 from vw11;
+ select f121, f122, f151, f163
+ from tb3 where f122 like 'Not in View';
+
+#Section 3.5.10.2
+ Update vw11 set f163=1;
+ select f121, f122, f151, f163 from tb3
+ where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+ --sorted_result
+ select f121, f122, f151, f163 from vw11;
+
+#Section 3.5.10.3
+ set @test_var=0;
+ Select @test_var as 'before delete';
+ delete from vw11 where f151=1;
+ select f121, f122, f151, f163 from tb3
+ where f122 like 'Test 3.5.10.1/2/3%' order by f151;
+ --sorted_result
+ select f121, f122, f151, f163 from vw11;
+ Select @test_var as 'after delete';
+
+#Cleanup
+ --disable_warnings
+ drop view vw11;
+ drop trigger trg1a;
+ drop trigger trg1b;
+ drop trigger trg1c;
+ drop trigger trg1d;
+ drop trigger trg1e;
+ drop trigger trg1f;
+ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%';
+ --enable_warnings
+
+
+#Section 3.5.10.4
+# Test case: Ensure that every trigger that should be activated by every
+# possible type of implicit insertion into its subject table
+# (LOAD into the subject table) is indeed activated correctly
+let $message= Testcase 3.5.10.4:;
+--source include/show_msg.inc
+
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table tb_load (f1 int, f2 char(25),f3 int) engine = $engine_type;
+ Create trigger trg4 before insert on tb_load
+ for each row set new.f3=-(new.f1 div 5), @counter= @counter+1;
+
+ set @counter= 0;
+ select @counter as 'Rows Loaded Before';
+ --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+ eval load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t9.txt' into table tb_load;
+
+ select @counter as 'Rows Loaded After';
+ Select * from tb_load order by f1 limit 10;
+
+#Cleanup
+ --disable_warnings
+ drop trigger trg4;
+ drop table tb_load;
+ --enable_warnings
+
+
+#Section 3.5.10.5
+# Testcase: Ensure that every trigger that should be activated by every possible
+# type of implicit update of its subject table (e.g.a FOREIGN KEY SET
+# DEFAULT action or an UPDATE of a view based on the subject table) is
+# indeed activated correctly
+let $message= Testcase 3.5.10.5: (implemented in trig_frkey.test);
+--source include/show_msg.inc
+
+
+#Section 3.5.10.6
+# Testcase: Ensure that every trigger that should be activated by every possible
+# type of implicit deletion from its subject table (e.g.a FOREIGN KEY
+# CASCADE action or a DELETE from a view based on the subject table) is
+# indeed activated correctly
+let $message= Testcase 3.5.10.6: (implemented in trig_frkey.test);
+--source include/show_msg.inc
+
+#Section 3.5.10.extra
+# Testcase: Ensure that every trigger that should be activated by every possible
+# type of implicit deletion from its subject table (e.g. an action performed
+# 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;
+
+ create trigger trg before insert on t1_sp
+ for each row set @counter=@counter+1;
+ # declare continue handler for sqlstate '01000' set done = 1;
+
+ delimiter //;
+ create procedure trig_sp()
+ begin
+ declare done int default 0;
+ declare var151 decimal;
+ declare var136 tinyint;
+ declare cur1 cursor for select f136, f151 from tb3;
+ declare continue handler for sqlstate '01000' set done = 1;
+ open cur1;
+ fetch cur1 into var136, var151;
+ wl_loop: WHILE NOT done DO
+ insert into t1_sp values (var136, var151);
+ fetch cur1 into var136, var151;
+ END WHILE wl_loop;
+ close cur1;
+ end//
+ delimiter ;//
+
+ set @counter=0;
+ select @counter;
+ --error ER_SP_FETCH_NO_DATA
+ call trig_sp();
+ select @counter;
+ select count(*) from tb3;
+ select count(*) from t1_sp;
+
+#Cleanup
+ --disable_warnings
+ drop procedure trig_sp;
+ drop trigger trg;
+ drop table t1_sp;
+ --enable_warnings
+ set sql_mode = default;
+
+##################################
+########## Section 3.5.11 ########
+# Check on Trigger Performance #
+##################################
+#Section 3.5.11.1
+# Testcase: Ensure that a set of complicated, interlocking triggers that are activated
+# by multiple trigger events on no fewer than 50 different tables with at least
+# 500,000 rows each, all work correctly, return the correct results, and have
+# the correct effects on the database. It is expected that the Services Provider
+# will use its own skills and experience in database testing to devise tables and
+# triggers that fulfill this requirement.
+let $message= Testcase 3.5.11.1 (implemented in trig_perf.test);
+--source include/show_msg.inc
+
+
+##########################################
+# Other Scenasrios (not in requirements) #
+##########################################
+# Testcase: y.y.y.2:
+# Checking for triggers starting triggers (no direct requirement)
+let $message= Testcase y.y.y.2: Check for triggers starting triggers;
+--source include/show_msg.inc
+
+ use test;
+ --disable_warnings
+ drop table if exists t1;
+ drop table if exists t2_1;
+ drop table if exists t2_2;
+ drop table if exists t2_3;
+ drop table if exists t2_4;
+ drop table if exists t3;
+ --enable_warnings
+
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2_1 (f1 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2_2 (f1 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2_3 (f1 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2_4 (f1 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t3 (f1 integer) engine = $engine_type;
+
+ insert into t1 values (1);
+ delimiter //;
+ create trigger tr1 after insert on t1 for each row
+ BEGIN
+ insert into t2_1 (f1) values (new.f1+1);
+ insert into t2_2 (f1) values (new.f1+1);
+ insert into t2_3 (f1) values (new.f1+1);
+ insert into t2_4 (f1) values (new.f1+1);
+ END//
+ delimiter ;//
+
+ create trigger tr2_1 after insert on t2_1 for each row
+ insert into t3 (f1) values (new.f1+10);
+ create trigger tr2_2 after insert on t2_2 for each row
+ insert into t3 (f1) values (new.f1+100);
+ create trigger tr2_3 after insert on t2_3 for each row
+ insert into t3 (f1) values (new.f1+1000);
+ create trigger tr2_4 after insert on t2_4 for each row
+ insert into t3 (f1) values (new.f1+10000);
+
+#lock tables t1 write, t2_1 write, t2_2 write, t2_3 write, t2_4 write, t3 write;
+ insert into t1 values (1);
+#unlock tables;
+ select * from t3 order by f1;
+
+#Cleanup
+ --disable_warnings
+ drop trigger tr1;
+ drop trigger tr2_1;
+ drop trigger tr2_2;
+ drop trigger tr2_3;
+ drop trigger tr2_4;
+ drop table t1, t2_1, t2_2, t2_3, t2_4, t3;
+ --enable_warnings
+
+# Testcase: y.y.y.3:
+# Checking for circular trigger definitions
+let $message= Testcase y.y.y.3: Circular trigger reference;
+--source include/show_msg.inc
+ use test;
+ --disable_warnings
+ drop table if exists t1;
+ drop table if exists t2;
+ drop table if exists t3;
+ drop table if exists t4;
+ --enable_warnings
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2 (f2 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t3 (f3 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t4 (f4 integer) engine = $engine_type;
+
+ insert into t1 values (0);
+ create trigger tr1 after insert on t1
+ for each row insert into t2 (f2) values (new.f1+1);
+ create trigger tr2 after insert on t2
+ for each row insert into t3 (f3) values (new.f2+1);
+ create trigger tr3 after insert on t3
+ for each row insert into t4 (f4) values (new.f3+1);
+ create trigger tr4 after insert on t4
+ for each row insert into t1 (f1) values (new.f4+1);
+
+ # Bug#11896 Partial locking in case of recursive trigger definittions
+ --error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG
+ insert into t1 values (1);
+ select * from t1 order by f1;
+ select * from t2 order by f2;
+ select * from t3 order by f3;
+ select * from t4 order by f4;
+
+#Cleanup
+ --disable_warnings
+ drop trigger tr1;
+ drop trigger tr2;
+ drop trigger tr3;
+ drop trigger tr4;
+ drop table t1;
+ drop table t2;
+ drop table t3;
+ drop table t4;
+ --enable_warnings
+
+
+#Section y.y.y.4
+# 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 = 'NO_ENGINE_SUBSTITUTION';
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1_sp (
+ count integer,
+ var136 tinyint,
+ var151 decimal) engine = $engine_type;
+
+ delimiter //;
+ create procedure trig_sp()
+ begin
+ declare done int default 0;
+ declare var151 decimal;
+ declare var136 tinyint;
+ declare cur1 cursor for select f136, f151 from tb3;
+ declare continue handler for sqlstate '01000' set done = 1;
+ set @counter= @counter+1;
+ open cur1;
+ fetch cur1 into var136, var151;
+ wl_loop: WHILE NOT done DO
+ insert into t1_sp values (@counter, var136, var151);
+ fetch cur1 into var136, var151;
+ END WHILE wl_loop;
+ close cur1;
+ end//
+ delimiter ;//
+
+ create trigger trg before insert on t1_sp
+ for each row call trig_sp();
+
+ set @counter=0;
+ select @counter;
+ --error ER_SP_RECURSION_LIMIT
+ call trig_sp();
+ select @counter;
+ select count(*) from tb3;
+ select count(*) from t1_sp;
+
+ # check recursion will not work here:
+ set @@max_sp_recursion_depth= 10;
+ set @counter=0;
+ select @counter;
+ --error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG
+ call trig_sp();
+ select @counter;
+ select count(*) from tb3;
+ select count(*) from t1_sp;
+
+#Cleanup
+ --disable_warnings
+ drop procedure trig_sp;
+ drop trigger trg;
+ drop table t1_sp;
+ --enable_warnings
+ set sql_mode = default;
+
+
+# Testcase: y.y.y.5:
+# Checking rollback of nested trigger definitions
+let $message= Testcase y.y.y.5: Rollback of nested trigger references;
+--source include/show_msg.inc
+
+ set @@sql_mode='traditional';
+ use test;
+ --disable_warnings
+ drop table if exists t1;
+ drop table if exists t2;
+ drop table if exists t3;
+ drop table if exists t4;
+ --enable_warnings
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t1 (f1 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t2 (f2 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t3 (f3 integer) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ eval create table t4 (f4 tinyint) engine = $engine_type;
+ --replace_result $engine_type <engine_to_be_used>
+ show create table t1;
+ insert into t1 values (1);
+ create trigger tr1 after insert on t1
+ for each row insert into t2 (f2) values (new.f1+1);
+ create trigger tr2 after insert on t2
+ for each row insert into t3 (f3) values (new.f2+1);
+ create trigger tr3 after insert on t3
+ for each row insert into t4 (f4) values (new.f3+1000);
+
+ set autocommit=0;
+ start transaction;
+ --error ER_WARN_DATA_OUT_OF_RANGE
+ insert into t1 values (1);
+ commit;
+ select * from t1 order by f1;
+ select * from t2 order by f2;
+ select * from t3 order by f3;
+
+#Cleanup
+ drop trigger tr1;
+ drop trigger tr2;
+ drop trigger tr3;
+ drop table t1;
+ drop table t2;
+ drop table t3;
+ drop table t4;
+
+DROP TABLE test.tb3;
diff --git a/mysql-test/suite/funcs_1/views/func_view.inc b/mysql-test/suite/funcs_1/views/func_view.inc
new file mode 100644
index 00000000..64ba69a0
--- /dev/null
+++ b/mysql-test/suite/funcs_1/views/func_view.inc
@@ -0,0 +1,1365 @@
+###################################################
+# #
+# Functions within VIEWs #
+# #
+###################################################
+# 2007-11-09 HHunger enabled all disabled parts belonging to fixed bugs.
+# 2006-12-08 mleich Maintenance + refinements
+# 2005-09-14 mleich Create this test
+#
+# 0. Some notes about this test:
+# #################################################################
+#
+# 0.1 This test is unfinished and incomplete, but already useful.
+# -----------------------------------------------------------------
+# 0.1.1 There will be architectural changes in future.
+# The long sequences with
+# let $col_type= <column to use>;
+# --source suite/funcs_1/views/<file containing the
+# select with function>
+# per every column type do not look very smart.
+#
+# Ugly combinations of functions and data types must be also checked,
+# because an accidental typo like assigning a string column to an
+# numeric parameter could happen and should not result in a server crash.
+#
+# Maybe it is better to change the architecture of this test in such
+# a way:
+# 1. A generator script (this one or written in Perl or SP language)
+# generates an prototype of the the final testscript.
+# 2. Some manual adjustments because of open bugs (depending on
+# storage engine or function) might be needed (I hope not :)
+# 3. The final testscript is pushed to the other regression testscripts.
+# Advantage: The analysis of bugs, extension and maintenance of this
+# test will be much easier.
+# Disadvantage: Much redundant code within the final testscript,
+# but the maintenance of the redundant code will be done
+# by the script generator.
+#
+# 0.1.2 The behaviour of SELECTs on VIEWs could be affected by the SQL mode
+# which was valid during VIEW creation time. This means some variations
+# of the SQL mode are needed.
+# 0.1.3 There are much more functions to be tested.
+# 0.1.4 The result sets of some CAST sub testcases with ugly function parameter
+# column data type combinations must be discussed.
+#
+#
+# 0.2 How to valuate the test results:
+# ---------------------------------------------------------------------------
+# Due to the extreme "greedy bug hunting" architecture (combinatorics
+# + heavy use of sourced scripts) of the following tests, there will be
+# - no abort of the test execution, when one statements gets an return
+# code != 0 (The sub testcases are independend.)
+# But statements, which do not make sense like SELECT on non existent
+# VIEW will be omitted. This decreases the amount of useless output.
+# - a file with expected results, which might contain incorrect server
+# responses
+# There are open bugs and I cannot omit statements which reveal these
+# bugs.
+# But there will be a special messages within the protocol files.
+# Example:
+# "Attention: CAST --> SIGNED INTEGER
+# The file with expected results suffers from Bug 5913";
+# means, the file with expected results contains result sets which
+# are known to be wrong.
+# "Attention: The last <whatever> failed"
+# means, a statement which should be successful (bugfree MySQL)
+# failed.
+#
+# "Passed" : The behaviour of your MySQL version does not differ from the
+# version used to generate the files with expected results.
+# Known bugs affecting these tests could be retrieved by
+# grep "Attention" r/<testcase>.result .
+#
+# "Failed" : The behaviour of your MySQL version differs from the version
+# used to generate the files with expected results.
+# These differences could be result of bug fixes or new bugs.
+# Please compare r/<testcase>.reject and r/<testcase>.result .
+#
+# The test will abort if one of the basic preparation statement fails
+# (except ALTER TABLE ADD ...).
+#
+#
+# 0.3 How to debug sub testcases with "unexpected" results:
+# ---------------------------------------------------------------------------
+# 1. Please execute this test and copy the "reject" file to a save place.
+# Search within the "reject" file for the sub testcase (the SELECT)
+# with the suspicious result set or server response.
+# Now all t1_values records are preloaded.
+# 2. Start the server without the initial cleanup of databases etc.
+# This preserves the content of the table t1_values, which
+# might be needed for replaying the situation.
+# Example:
+# ./mysql-test-run.pl --socket=var/tmp/master.sock --start-dirty
+# 3. Issue the statements needed by using "mysql" or "mysqltest".
+#
+# Maybe an internal routine of this test fails. Please ask me (mleich) or
+# enable the logging of auxiliary queries and try to analyze the
+# problem.
+#
+#
+# 0.4 How to extend the number of functions to be checked:
+# ---------------------------------------------------------------------------
+# Please jump to the paragraphs of the basic preparations
+# 1. Extend t1_values with the columns you need
+# 2. Insert some predefinded rows
+# 3. Add the SELECTs with function which should be used within VIEWs
+# and
+# records which should be used dedicated to the SELECT above
+#
+#
+# 0.5 How to alter the internal routines of this test:
+# ---------------------------------------------------------------------------
+# Please try to achieve a state where the protocol
+# - contains ALL statements, which are needed to replay a problem within
+# the field of functions within VIEWs
+# - does not contain too much auxiliary statements, which are not needed
+# to replay a problem (--> "--disable_query_log")
+# Example:
+# Needed for replay:
+# - DROP/CREATE TABLE t1_values
+# - INSERT of records into t1_values
+# - DROP/CREATE/SELECT/SHOW VIEW v1
+# - SELECT direct on base table
+# Not needed for replay:
+# - SET @<uservariable> = <value>
+# - DROP/CREATE/INSERT/SELECT TABLE t1_selects, t1_modes
+#
+#
+# 0.6 A trick for checking results
+# ---------------------------------------------------------------------------
+# Standard setting for common execution of this test:
+ let $simple_select_result= 1;
+ let $view_select_result= 1;
+# The implementation of some additional function tests may lead to
+# masses of result sets, which have to be checked. The result sets of
+# the simple selects on the base table must equal the result sets of the
+# queries on the VIEWs. This step could be made more comfortable by
+# 1. Edit this file to
+# let $simple_select_result= 1;
+# let $view_select_result= 0;
+# Please execute this test.
+# The script will omit CREATE/DROP/SHOW/SELECT on VIEW.
+# The "reject" file contains only the simple select result sets.
+# 2. Edit this file to
+# let $simple_select_result= 0;
+# let $view_select_result= 1;
+# Please execute this test.
+# The script will work with the VIEWs, but omit the simple selects.
+# The "reject" file contains the view select result sets.
+# 3. Compare the "reject" files of 1. and 2. within a graphical diff tool.
+#
+#
+
+SET timestamp=unix_timestamp('2001-02-03 10:20:30');
+
+--disable_warnings
+DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values;
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+
+--disable_query_log
+# Storage for the SELECTs to be used for the VIEW definition
+# Attention: my_select must be no too small because a statement like
+# SELECT LOAD_FILE(< file in MYSQLTEST_VARDIR >)
+# AS my_col,
+# id FROM t1_values';
+# might be a very long
+# Bug#38427 "Data too long" ... tests "<ENGINE>_func_view" fail
+CREATE TABLE t1_selects
+(
+ id BIGINT AUTO_INCREMENT,
+ my_select VARCHAR(1000) NOT NULL,
+ disable_result ENUM('Yes','No') NOT NULL default 'No',
+ PRIMARY KEY(id),
+ UNIQUE (my_select)
+) ENGINE=MyISAM;
+
+# MODES to be checked
+CREATE TABLE t1_modes
+(
+ id BIGINT AUTO_INCREMENT,
+ my_mode VARCHAR(200) NOT NULL,
+ PRIMARY KEY(id),
+ UNIQUE (my_mode)
+) ENGINE=MyISAM;
+--enable_query_log
+
+# The table to be used in the FROM parts of the SELECTs
+--replace_result $type <engine_to_be_tested>
+eval CREATE TABLE t1_values
+(
+ id BIGINT AUTO_INCREMENT,
+ select_id BIGINT,
+ PRIMARY KEY(id)
+) ENGINE = $type;
+
+##### BEGIN Basic preparations #######################################
+#
+# 1. Extend t1_values with the columns you need
+# - the column name must show the data type
+# - do not add NOT NULL columns
+# - do not worry if the intended column data type is not
+# available for some storage engines
+# Please do not forget to assign values for the new columns (paragraph 2.).
+--disable_abort_on_error
+ALTER TABLE t1_values ADD my_char_30 CHAR(30);
+ALTER TABLE t1_values ADD my_varchar_1000 VARCHAR(1000);
+ALTER TABLE t1_values ADD my_binary_30 BINARY(30);
+ALTER TABLE t1_values ADD my_varbinary_1000 VARBINARY(1000);
+ALTER TABLE t1_values ADD my_datetime DATETIME;
+ALTER TABLE t1_values ADD my_date DATE;
+ALTER TABLE t1_values ADD ts_dummy TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
+ALTER TABLE t1_values ADD my_timestamp TIMESTAMP NOT NULL DEFAULT '2001-01-01 10:20:30';
+ALTER TABLE t1_values ADD my_time TIME;
+ALTER TABLE t1_values ADD my_year YEAR;
+ALTER TABLE t1_values ADD my_bigint BIGINT;
+ALTER TABLE t1_values ADD my_double DOUBLE;
+ALTER TABLE t1_values ADD my_decimal DECIMAL(64,30);
+--enable_abort_on_error
+
+#-------------------------------------------------------------------------------
+
+#
+# 2. Insert some predefinded rows
+# Predefined rows
+# - t1_values.select_id IS NULL
+# - will be selected by every SELECT with function to be tested
+# - have to be inserted when sql_mode = 'traditional' is valid, because
+# we do not want to start with "illegal/unexpected/..." values.
+# Such experiments should be done in other testcases.
+# Please be careful
+# - modifying column values of predefined rows they might change many
+# result sets
+# - additional predefined rows should be really useful for the majority of
+# all sub testcases, since they blow up all result sets.
+SET sql_mode = 'traditional';
+#
+# 2.1 record -- everything to NULL
+INSERT INTO t1_values SET id = 0;
+#
+# 2.2 record -- everything to "minimum"
+# numbers, date/time types -> minimum of range
+# strings, blobs, binaries -> ''
+# FIXME enum, set ??
+INSERT INTO t1_values SET
+ my_char_30 = '',
+ my_varchar_1000 = '',
+ my_binary_30 = '',
+ my_varbinary_1000 = '',
+ my_datetime = '0001-01-01 00:00:00',
+ my_date = '0001-01-01',
+ my_timestamp = '1970-01-01 14:00:01',
+ my_time = '-838:59:59',
+ my_year = '1901',
+ my_bigint = -9223372036854775808,
+ my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 ,
+ my_double = -1.7976931348623E+308;
+# shortened due to bug#32285
+# my_double = -1.7976931348623157E+308;
+#
+# 2.3 record -- everything to "maximum"
+# numbers, date/time types -> maximum of range
+# strings, blobs, binaries -> '<- full length of used data type>'
+# FIXME enum, set ??
+INSERT INTO t1_values SET
+ my_char_30 = '<--------30 characters------->',
+ my_varchar_1000 = CONCAT('<---------1000 characters',
+ RPAD('',965,'-'),'--------->'),
+ my_binary_30 = '<--------30 characters------->',
+ my_varbinary_1000 = CONCAT('<---------1000 characters',
+ RPAD('',965,'-'),'--------->'),
+ my_datetime = '9999-12-31 23:59:59',
+ my_date = '9999-12-31',
+ my_timestamp = '2038-01-01 02:59:59',
+ my_time = '838:59:59',
+ my_year = 2155,
+ my_bigint = 9223372036854775807,
+ my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 ,
+ my_double = 1.7976931348623E+308;
+# shortened due to bug#32285
+# my_double = -1.7976931348623157E+308;
+#
+# 2.4 record -- everything to "magic" value if available or
+# other interesting value
+# numbers -> 0
+# strings, blobs, binaries -> not full length of used data type, "exotic"
+# characters and preceding and trailing spaces
+# FIXME enum, set ??
+INSERT INTO t1_values SET
+ my_char_30 = ' ---äÖüß@µ*$-- ',
+ my_varchar_1000 = ' ---äÖüß@µ*$-- ',
+ my_binary_30 = ' ---äÖüß@µ*$-- ',
+ my_varbinary_1000 = ' ---äÖüß@µ*$-- ',
+ my_datetime = '2004-02-29 23:59:59',
+ my_date = '2004-02-29',
+ my_timestamp = '2004-02-29 23:59:59',
+ my_time = '13:00:00',
+ my_year = 2000,
+ my_bigint = 0,
+ my_decimal = 0.0,
+ my_double = 0;
+#
+# 2.5 record -- everything to "harmless" value if available
+# numbers -> -1 (logical)
+# strings, blobs, binaries -> '-1' useful for numeric functions
+# FIXME enum, set ??
+INSERT INTO t1_values SET
+ my_char_30 = '-1',
+ my_varchar_1000 = '-1',
+ my_binary_30 = '-1',
+ my_varbinary_1000 = '-1',
+ my_datetime = '2005-06-28 10:00:00',
+ my_date = '2005-06-28',
+ my_timestamp = '2005-06-28 10:00:00',
+ my_time = '10:00:00',
+ my_year = 2005,
+ my_bigint = -1,
+ my_decimal = -1.000000000000000000000000000000,
+ my_double = -0.1E+1;
+
+#-------------------------------------------------------------------------------
+
+#
+# 3. Add the SELECTs with function which should be used within VIEWs
+# and
+# records which should be used dedicated to the SELECT above
+# - Please avoid WHERE clauses
+# - Include the PRIMARY KEY ("id") of the base table t1_values into the
+# select column list
+# - Include the base table column used as function parameter into the
+# select column list, because it is much easier to check the results
+# - Do not forget to escape single quotes
+# Example:
+# SET @my_select = 'SELECT sqrt(my_bigint), my_bigint, id FROM t1_values'
+# SET @my_select = 'SELECT CONCAT(\'A\',my_char_30), id FROM t1_values';
+# - Statements, which reveal open crashing bugs MUST be disabled.
+# - Result sets must not contain data, which might differ between boxes
+# executing this test.
+# Example: current time, absolute path to some files ...
+# - Please derive the functions to be checked from the MySQL manual
+# and use the same order. This means copy the the function names as
+# comment into this test and start to implement a testcase for your
+# most preferred function.
+# This method avoids that we forget a function and gives a better
+# overview.
+#
+# If you have the time to check the result sets do the insert of the
+# SELECT with function via:
+# eval SET @my_select =
+# '<your SELECT>';
+# --source suite/funcs_1/views/fv1.inc
+# fv1.inc sets t1_selects.disable_result to 'No' and the effect will be,
+# that the result set will be logged.
+#
+# If you do not have the time to check the result sets do the insert of the
+# SELECT with function via:
+# eval SET @my_select =
+# '<your SELECT>';
+# --source suite/funcs_1/views/fv2.inc
+# fv2.inc sets t1_selects.disable_result to 'Yes' and the effect will be,
+# that the result set will be not logged.
+# This should be only a temporary solution and it does not remove the
+# need to check the server return codes.
+# That means even when we do not have the time to check the correctness of
+# the result sets, we check if
+# - SELECT <function> or
+# - SELECT * FROM <VIEW with function>
+# crash the server or get suspicious server responses.
+#
+# - the SELECTs will be applied to the rows defined here (3.) +
+# all predefined rows (2.)
+# - the rows dedicated to the SELECT should contain especially interesting
+# column values or combinations of column values, which are not covered
+# by the predefined records
+# - The records have to be inserted when sql_mode = 'traditional' is valid.
+# - Please do not insert records with column values where the allowed
+# range is exceeded. The SQL mode 'traditional' will prevent such
+# inserts. Such experiments should be done in other tests, because
+# they inflate the current test without giving an appropriate value.
+#
+# Example:
+# The function to be tested is "sqrt".
+# The minimum, maximum, default and NULL value are covered by the
+# predefined rows.
+# A value where sqrt(<value>) = <integer value> in strict mathematics
+# would be of interest.
+# --> Add a record with my_bigint = 4
+# --> Just for fun my_bigint = -25 .
+#
+# Some internal stuff
+PREPARE ins_sel_with_result FROM "INSERT INTO t1_selects SET my_select = @my_select,
+disable_result = 'No'" ;
+PREPARE ins_sel_no_result FROM "INSERT INTO t1_selects SET my_select = @my_select,
+disable_result = 'Yes'" ;
+SET sql_mode = 'traditional';
+# --disable_query_log
+
+let $col_type= my_bigint;
+# Example:
+# eval SET @my_select = 'SELECT CONCAT(''A'', $col_type), $col_type, id';
+eval SET @my_select = 'SELECT sqrt($col_type), $col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+# Content of suite/funcs_1/views/fv1.inc :
+# --disable_query_log
+# EXECUTE ins_sel_with_result;
+# SET @select_id = LAST_INSERT_ID();
+# --enable_query_log
+
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = 4;
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = -25;
+# SELECT * FROM t1_values;
+
+# 1. Cast Functions and Operators
+# 1.1 CAST
+#
+# Note(mleich): I guess the CAST routines are used in many other functions.
+# Therefore check also nearly all "ugly" variants like
+# CAST(<string composed of non digits> AS DECIMAL) here.
+#
+# suite/funcs_1/views/fv_cast.inc contains
+# SELECT CAST($col_type AS $target_type), ...
+#
+#
+# 1.1.1. CAST --> BINARY
+--echo ##### 1.1.1. CAST --> BINARY
+let $target_type= BINARY;
+#
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_decimal;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_cast.inc
+
+
+# 1.1.2. CAST --> CHAR
+--echo ##### 1.1.2. CAST --> CHAR
+let $target_type= CHAR;
+#
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_decimal;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_cast.inc
+
+
+# 1.1.3. CAST --> DATE
+--echo ##### 1.1.3. CAST --> DATE
+let $target_type= DATE;
+#
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '2005-06-27';
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '2005-06-27';
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '2005-06-27';
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '2005-06-27';
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = 20050627;
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = +20.050627E+6;
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_cast.inc
+
+
+# 1.1.4. CAST --> DATETIME
+--echo ##### 1.1.4. CAST --> DATETIME
+let $target_type= DATETIME;
+#
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '2005-06-27 17:58';
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '2005-06-27 17:58';
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '2005-06-27 17:58';
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '2005-06-27 17:58';
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = 200506271758;
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = +0.0200506271758E+13;
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_cast.inc
+
+
+# 1.1.5. CAST --> TIME
+--echo ##### 1.1.5. CAST --> TIME
+let $target_type= TIME;
+#
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '1 17:58';
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '1 17:58';
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '1 17:58';
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '1 17:58';
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = 1758;
+let $col_type= my_double;
+# Bug#12440: CAST(data type DOUBLE AS TIME) strange results;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = +1.758E+3;
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_cast.inc
+
+
+# 1.1.6. CAST --> DECIMAL
+--echo ##### 1.1.6. CAST --> DECIMAL
+# Set the following to (37,2) since the default was changed to (10,0) - OBN
+let $target_type= DECIMAL(37,2);
+#
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '-3333.3333';
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '-3333.3333';
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '-3333.3333';
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = '-3333.3333';
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_decimal;
+--source suite/funcs_1/views/fv_cast.inc
+# Bug#13349: CAST(1.0E+300 TO DECIMAL) returns wrong result + diff little/big endian;
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_cast.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ $col_type = -0.33333333E+4;
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_cast.inc
+
+
+# 1.1.7. CAST --> SIGNED INTEGER
+--echo ##### 1.1.7. CAST --> SIGNED INTEGER
+let $target_type= SIGNED INTEGER;
+#
+let $message=
+"Attention: CAST --> SIGNED INTEGER
+ Bug#5913 Traditional mode: BIGINT range not correctly delimited
+ Status: To be fixed later";
+--source include/show_msg80.inc
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_decimal;
+--source suite/funcs_1/views/fv_cast.inc
+# Bug #13344: CAST(1E+300 TO signed int) on little endian CPU, wrong result;
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_cast.inc
+
+
+# 1.1.8. CAST --> UNSIGNED INTEGER
+--echo ##### 1.1.8. CAST --> UNSIGNED INTEGER
+let $target_type= UNSIGNED INTEGER;
+#
+let $message=
+"Attention: CAST --> UNSIGNED INTEGER
+ The file with expected results suffers from Bug 5913";
+--source include/show_msg80.inc
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_decimal;
+--source suite/funcs_1/views/fv_cast.inc
+let $message= some statements disabled because of
+Bug#5913 Traditional mode: BIGINT range not correctly delimited;
+--source include/show_msg80.inc
+# Bug#8663 cant use bgint unsigned as input to cast
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_cast.inc
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_cast.inc
+
+
+# 1.2. BINARY
+# Manual: BINARY str is a shorthand for CAST(str AS BINARY).
+# Therefore we do not test it here in the moment.
+# FIXME: Add testcases for str in CHAR and VARCHAR only.
+
+
+# 1.3 CONVERT(expr USING transcoding_name)
+#
+# 1.3.1 CONVERT(expr USING utf8)
+let $target_charset= utf8;
+#
+let $col_type= my_char_30;
+eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_varchar_1000;
+eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_binary_30;
+eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_varbinary_1000;
+eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+#
+# 1.3.2 CONVERT(expr USING koi8r)
+let $target_charset= koi8r;
+let $col_type= my_char_30;
+eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_varchar_1000;
+eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_binary_30;
+eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_varbinary_1000;
+eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+
+
+# 2. Control Flow Functions
+# 2.1. CASE value WHEN [compare-value] THEN result [WHEN ...] [ELSE result]
+# END or
+# CASE WHEN [condition] THEN result [WHEN ...] [ELSE result] END
+#
+# FIXME: to be implemented
+#
+# 2.2. IF(expr1,expr2,expr3)
+# expr1 is TRUE when (expr1 <> 0 and expr1 <> NULL) is fulfilled
+#
+# 2.2.1 IF(expr1,expr2,expr3) with expr1 = <column>
+#
+# Note(mleich): Strings, which do not contain a number -> FALSE
+#
+# suite/funcs_1/views/fv_if1.inc contains
+# SELECT IF($col_type, 'IS TRUE', 'IS NOT TRUE'), ...
+#
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_decimal;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_if1.inc
+#
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_if1.inc
+
+
+# 2.2.2 IF(expr1,expr2,expr3) with expr1 != <column>
+#
+# suite/funcs_1/views/fv_if2.inc contains
+# SELECT IF($col_type IS NULL, 'IS NULL', 'IS NOT NULL'), ...
+#
+# Note(mleich): July 2005
+# IF($col_type IS NULL, ...) is mapped to a VIEW definition
+# create ... view ... as
+# select if(isnull(`test`.`t1`.`f1`),_latin1'IS NULL',
+# _latin1'IS NOT NULL'),...
+#
+# Bug#11689 success on Create view .. IF(col1 IS NULL,...), col2 ; but SELECT fails
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_decimal;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_if2.inc
+#
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_if2.inc
+
+
+# 2.3. IFNULL(expr1,expr2)
+# If expr1 is not NULL, IFNULL() returns expr1, else it returns expr2.
+#
+# suite/funcs_1/views/fv_ifnull.inc contains
+# SELECT IFNULL($col_type, 'IS_NULL'), ....
+# FIXME: The mixup of non string column values
+# and the string 'IS NULL' within the first column of the
+# result table is extreme ugly.
+# CAST(IFNULL($col_type, 'IS_NULL') AS CHAR) looks better, but
+# it has the disadvantage, that it involves CAST as additional
+# function.
+#
+let $col_type= my_char_30;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_varchar_1000;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_binary_30;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_varbinary_1000;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_bigint;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_decimal;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_double;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_datetime;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_date;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_timestamp;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_time;
+--source suite/funcs_1/views/fv_ifnull.inc
+#
+let $col_type= my_year;
+--source suite/funcs_1/views/fv_ifnull.inc
+
+
+# 2.4. NULLIF(expr1,expr2)
+# Returns NULL if expr1 = expr2 is true, else returns expr1.
+# This is the same as
+# CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.
+#
+# FIXME: to be implemented
+#
+
+
+# 3. String Functions
+# 3.1. ASCII(str)
+# 3.2. BIN(N)
+# FIXME: to be implemented
+#
+# 3.3. BIT_LENGTH(str)
+# Returns the length of the string str in bits.
+#
+let $col_type= my_char_30;
+eval SET @my_select = 'SELECT BIT_LENGTH($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_varchar_1000;
+eval SET @my_select = 'SELECT BIT_LENGTH($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_binary_30;
+eval SET @my_select = 'SELECT BIT_LENGTH($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_varbinary_1000;
+eval SET @my_select = 'SELECT BIT_LENGTH($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+
+
+# 3.4. CHAR(N,...)
+# 3.5. CHAR_LENGTH(str)
+# 3.6 CHARACTER_LENGTH(str)
+# CHARACTER_LENGTH() is a synonym for CHAR_LENGTH().
+# 3.7. COMPRESS(string_to_compress)
+# 3.8. CONCAT(str1,str2,...)
+# 3.9. CONCAT_WS(separator,str1,str2,...)
+# 3.10. CONV(N,from_base,to_base)
+# 3.11. ELT(N,str1,str2,str3,...)
+# 3.12. EXPORT_SET(bits,on,off[,separator[,number_of_bits]])
+# 3.13. FIELD(str,str1,str2,str3,...)
+# 3.14. FIND_IN_SET(str,strlist)
+# 3.15. HEX(N_or_S
+# 3.16. INSERT(str,pos,len,newstr)
+# 3.17. INSTR(str,substr)
+# This is the same as the two-argument form of LOCATE(),
+# except that the arguments are swapped.
+# The majority of the testcases should be made with LOCATE().
+# Therefore test only one example here.
+let $col_type= my_char_30;
+eval SET @my_select = 'SELECT INSTR($col_type, ''char''),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+
+
+# 3.18. LCASE(str)
+# LCASE() is a synonym for LOWER().
+# The majority of the testcases should be made with LOWER().
+# Therefore test only one example here.
+let $col_type= my_varchar_1000;
+eval SET @my_select = 'SELECT LCASE($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+
+
+# 3.19. LEFT(str,len)
+# Returns the leftmost len characters from the string str.
+let $col_type= my_char_30;
+eval SET @my_select =
+'SELECT LEFT($col_type, 2), $col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_varchar_1000;
+eval SET @my_select =
+'SELECT LEFT($col_type, 2), $col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_binary_30;
+eval SET @my_select =
+'SELECT LEFT($col_type, 2), $col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_varbinary_1000;
+eval SET @my_select =
+'SELECT LEFT($col_type, 2), $col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+# Bug#11728 string function LEFT, strange undocumented behaviour, strict mode
+# Bug#10963 LEFT string function returns wrong result with large length
+let $col_type= my_bigint;
+eval SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', $col_type), $col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+let $col_type= my_decimal;
+eval SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', $col_type), $col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+# Bug#10963 LEFT string function returns wrong result with large length
+let $col_type= my_double;
+eval SET @my_select =
+'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', $col_type), $col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+
+# 3.20. LENGTH(str)
+let $col_type= my_char_30;
+eval SET @my_select = 'SELECT LENGTH($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varchar_1000;
+eval SET @my_select = 'SELECT LENGTH($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_binary_30;
+eval SET @my_select = 'SELECT LENGTH($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varbinary_1000;
+eval SET @my_select = 'SELECT LENGTH($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+
+
+# 3.21. LOAD_FILE(file_name)
+# Reads the file and returns the file contents as a string.
+# If the file doesn't exist or cannot be read ... ,
+# the function returns NULL.
+# SELECT LOADFILE
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval SET @my_select =
+'SELECT LOAD_FILE(''$MYSQLTEST_VARDIR/std_data/funcs_1/load_file.txt'')
+ AS my_col,
+ id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
+
+
+# 3.22. LOCATE(substr,str) , LOCATE(substr,str,pos)
+let $col_type= my_char_30;
+eval SET @my_select = 'SELECT LOCATE(''char'', $col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varchar_1000;
+eval SET @my_select = 'SELECT LOCATE(''char'', $col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_binary_30;
+eval SET @my_select = 'SELECT LOCATE(''char'', $col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varbinary_1000;
+eval SET @my_select = 'SELECT LOCATE(''char'', $col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+#------------------------------------------------------
+let $col_type1= my_char_30;
+# against all other
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type1 ),
+$col_type1, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_varchar_1000;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_binary_30;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_varbinary_1000;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+#------------------------------------------------------
+let $col_type1= my_varchar_1000;
+# against all other
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type1 ),
+$col_type1, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_char_30;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_binary_30;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_varbinary_1000;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+#------------------------------------------------------
+let $col_type1= my_binary_30;
+# against all other
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type1 ),
+$col_type1, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_char_30;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_varchar_1000;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_varbinary_1000;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+#------------------------------------------------------
+let $col_type1= my_varbinary_1000;
+# against all other
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type1 ),
+$col_type1, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_char_30;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_varchar_1000;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type2= my_binary_30;
+eval SET @my_select = 'SELECT LOCATE($col_type1, $col_type2 ),
+$col_type1, $col_type2 id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+
+# FIXME How to test exotic or interesting substr values like NULL, '', ' '
+# without getting too much result rows
+# FIXME Testcases with LOCATE(substr,str,pos)
+let $col_type= my_char_30;
+eval SET @my_select = 'SELECT LOCATE(''-'', $col_type, 3),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varchar_1000;
+eval SET @my_select = 'SELECT LOCATE(''-'', $col_type, 3),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_binary_30;
+eval SET @my_select = 'SELECT LOCATE(''-'', $col_type, 3),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varbinary_1000;
+eval SET @my_select = 'SELECT LOCATE(''-'', $col_type, 3),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+#--------------------------------------------------------
+let $col_type= my_bigint;
+eval SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', $col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_double;
+eval SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', $col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_decimal;
+eval SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', $col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+
+
+# 3.23. LOWER(str)
+let $col_type= my_char_30;
+eval SET @my_select = 'SELECT LOWER($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varchar_1000;
+eval SET @my_select = 'SELECT LOWER($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_binary_30;
+eval SET @my_select = 'SELECT LOWER($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varbinary_1000;
+eval SET @my_select = 'SELECT LOWER($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+
+
+# 3.24. LPAD(str,len,padstr)
+# 3.25. LTRIM(str)
+let $col_type= my_char_30;
+eval SET @my_select = 'SELECT LTRIM($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varchar_1000;
+eval SET @my_select = 'SELECT LTRIM($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_binary_30;
+eval SET @my_select = 'SELECT LTRIM($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+let $col_type= my_varbinary_1000;
+eval SET @my_select = 'SELECT LTRIM($col_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv2.inc
+
+
+# 3.26. MAKE_SET(bits,str1,str2,...)
+# .....
+# FIXME: to be implemented
+
+################################################################################
+# Please do not add SELECTs and interesting records after this line. #
+# These last SELECTs are mostly for checking the testcase code itself. #
+################################################################################
+eval SET @my_select =
+ 'SELECT CONCAT(''A'',my_char_30), my_char_30, id FROM t1_values'; #
+--source suite/funcs_1/views/fv1.inc
+#
+eval SET @my_select = 'SELECT my_char_30, id FROM t1_values'; #
+--source suite/funcs_1/views/fv2.inc
+eval INSERT INTO t1_values SET select_id = @select_id,
+ my_char_30 = 'Viana do Castelo';
+################################################################################
+SET sql_mode = ''; #
+
+##### END Basic preparations #######################################
+
+
+let $message= "# The basic preparations end and the main test starts here";
+--source include/show_msg80.inc
+
+--disable_ps_protocol
+
+##### The tests start here #####################################################
+
+# Determine the number of different SELECTs to be checked
+--disable_query_log
+SELECT COUNT(*) INTO @num_selects FROM t1_selects;
+--enable_query_log
+# Debug statement
+# SELECT @num_selects AS "number of SELECTS:";
+
+--disable_abort_on_error
+let $select_id= `SELECT @num_selects`;
+while ($select_id)
+{
+ # Determine the SELECT
+ --disable_query_log
+ eval SELECT my_select, disable_result INTO @my_select, @disable_result
+ FROM t1_selects WHERE id = $select_id;
+ let $run_no_result= `SELECT @disable_result = 'Yes'`;
+ --enable_query_log
+ # Debug statement
+ # SELECT @my_select AS "SELECT:";
+ let $my_select= `SELECT @my_select`;
+
+ let $run0= 0;
+ if ($view_select_result)
+ {
+ # Create the VIEW
+ --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+ eval CREATE VIEW v1 AS $my_select;
+ --disable_query_log
+ eval set @got_errno= $mysql_errno ;
+ let $run0= `SELECT @got_errno = 0`;
+ --enable_query_log
+ if (!$run0)
+ {
+ --echo
+ --echo Attention: The last CREATE VIEW failed
+ --echo
+ }
+ }
+
+ # FIXME The loop over the modes will start here.
+
+ if ($simple_select_result)
+ {
+ # Simple SELECT on the base table of the VIEW for comparison
+
+ if ($run_no_result)
+ {
+ --disable_result_log
+ }
+ --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+ eval $my_select
+ WHERE select_id = $select_id OR select_id IS NULL order by id;
+ if ($run_no_result)
+ {
+ --enable_result_log
+ }
+ if ($mysql_errno)
+ {
+ --echo
+ --echo Attention: The last SELECT on the base table failed
+ --echo
+ }
+ }
+
+ # $run0 is 1, if CREATE VIEW was successful.
+ # That means SHOW CREATE VIEW/SELECT/DROP should be executed.
+ if ($run0)
+ {
+ # Check the CREATE VIEW statement
+ --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+ SHOW CREATE VIEW v1;
+ if ($mysql_errno)
+ {
+ --echo
+ --echo Attention: The last SHOW CREATE VIEW failed
+ --echo
+ }
+
+ # Maybe a Join is faster
+ if ($run_no_result)
+ {
+ --disable_result_log
+ }
+ eval SELECT v1.* FROM v1
+ WHERE v1.id IN (SELECT id FROM t1_values
+ WHERE select_id = $select_id OR select_id IS NULL) order by id;
+ if ($run_no_result)
+ {
+ --enable_result_log
+ }
+ if ($mysql_errno)
+ {
+ --echo
+ --echo Attention: The last SELECT from VIEW failed
+ --echo
+ }
+
+ DROP VIEW v1;
+ }
+
+ # FIXME The loop over the modes will end here.
+
+ # Produce two empty lines as separator between different SELECTS
+ # to be tested.
+ --echo
+ --echo
+
+ dec $select_id ;
+}
+
+--enable_ps_protocol
+
+DROP TABLE t1_selects, t1_modes, t1_values;
+
+SET timestamp=DEFAULT;
diff --git a/mysql-test/suite/funcs_1/views/fv1.inc b/mysql-test/suite/funcs_1/views/fv1.inc
new file mode 100644
index 00000000..3befbdde
--- /dev/null
+++ b/mysql-test/suite/funcs_1/views/fv1.inc
@@ -0,0 +1,5 @@
+--disable_query_log
+EXECUTE ins_sel_with_result;
+SET @select_id = LAST_INSERT_ID();
+--enable_query_log
+
diff --git a/mysql-test/suite/funcs_1/views/fv2.inc b/mysql-test/suite/funcs_1/views/fv2.inc
new file mode 100644
index 00000000..3bdddc64
--- /dev/null
+++ b/mysql-test/suite/funcs_1/views/fv2.inc
@@ -0,0 +1,5 @@
+--disable_query_log
+EXECUTE ins_sel_no_result;
+SET @select_id = LAST_INSERT_ID();
+--enable_query_log
+
diff --git a/mysql-test/suite/funcs_1/views/fv_cast.inc b/mysql-test/suite/funcs_1/views/fv_cast.inc
new file mode 100644
index 00000000..8a878b8f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/views/fv_cast.inc
@@ -0,0 +1,4 @@
+--disable_query_log
+eval SET @my_select = 'SELECT CAST($col_type AS $target_type),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
diff --git a/mysql-test/suite/funcs_1/views/fv_if1.inc b/mysql-test/suite/funcs_1/views/fv_if1.inc
new file mode 100644
index 00000000..39d83203
--- /dev/null
+++ b/mysql-test/suite/funcs_1/views/fv_if1.inc
@@ -0,0 +1,4 @@
+--disable_query_log
+eval SET @my_select = 'SELECT IF($col_type, ''IS TRUE'', ''IS NOT TRUE''),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
diff --git a/mysql-test/suite/funcs_1/views/fv_if2.inc b/mysql-test/suite/funcs_1/views/fv_if2.inc
new file mode 100644
index 00000000..72a3c0a6
--- /dev/null
+++ b/mysql-test/suite/funcs_1/views/fv_if2.inc
@@ -0,0 +1,4 @@
+--disable_query_log
+eval SET @my_select = 'SELECT IF($col_type IS NULL, ''IS NULL'',
+''IS NOT NULL''), $col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
diff --git a/mysql-test/suite/funcs_1/views/fv_ifnull.inc b/mysql-test/suite/funcs_1/views/fv_ifnull.inc
new file mode 100644
index 00000000..60fc066f
--- /dev/null
+++ b/mysql-test/suite/funcs_1/views/fv_ifnull.inc
@@ -0,0 +1,4 @@
+--disable_query_log
+eval SET @my_select = 'SELECT IFNULL($col_type,''IS_NULL''),
+$col_type, id FROM t1_values';
+--source suite/funcs_1/views/fv1.inc
diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc
new file mode 100644
index 00000000..526e9e34
--- /dev/null
+++ b/mysql-test/suite/funcs_1/views/views_master.inc
@@ -0,0 +1,4089 @@
+#### suite/funcs_1/views/views_master.test
+#
+# Last Change:
+# 2007-11-15 hhunger WL#4084: Review and fix all disabled tests ...
+
+let $message= ! Attention: The file with the expected results is not
+ | thoroughly checked.
+ ! The server return codes are correct, but
+ | most result sets where the table tb2 is
+ ! involved are not checked.;
+--source include/show_msg80.inc
+
+# As long as
+# Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
+# is not fixed, we must switch the ps-protocol for some statements off (formerly bug#11589).
+# If this bug is fixed, please
+# 1. set the following variable to 0
+# 2. check, if the test passes
+# 3. remove the workarounds
+let $have_bug_32285= 1;
+if ($have_bug_32285)
+{
+ let $message= There are some statements where the ps-protocol is switched off.
+ Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill;
+ --source include/show_msg80.inc
+}
+
+# The sub testcases are nearly independend. That is the reason why
+# we do not want to abort after the first error.
+--disable_abort_on_error
+
+
+# 3.3 Views
+# MySQL views are based on a subset of the view requirements described in
+# the following standard SQL document:
+#
+# * ISO/IEC 9075-2:2003 Information technology -- Database languages --
+# SQL -- Part 2: Foundation (SQL/Foundation)
+#
+# MySQL has also added some vendor-specific enhancements to the standard
+# SQL requirements.
+
+# FIXME (mleich)
+# - Alter all object names so that they follow the v/t/..<number> scheme or
+# apply another method which prevents that customer data might be
+# accidently modified
+# - Remove any reference to the preloaded tables tb1 - tb4, if they could
+# be replaced without loss of value.
+# Example: failing CREATE VIEW statements
+# The goal is to split this script into two, where the first one does
+# not need the possibly huge tables.
+
+# Load records needed within the testcases.
+# We load them here and not within the testcases itself, because the
+# removal of any unneeded testcase during bug analysis should not alter
+# result sets.
+# Testcase 3.3.1.1
+insert into test.tb2 (f59,f60) values (76710,226546);
+insert into test.tb2 (f59,f60) values(2760,985654);
+insert into test.tb2 (f59,f60) values(569300,9114376);
+insert into test.tb2 (f59,f60) values(660,876546);
+insert into test.tb2 (f59,f60) values(250,87895654);
+insert into test.tb2 (f59,f60) values(340,9984376);
+insert into test.tb2 (f59,f60) values(3410,996546);
+insert into test.tb2 (f59,f60) values(2550,775654);
+insert into test.tb2 (f59,f60) values(3330,764376);
+insert into test.tb2 (f59,f60) values(441,16546);
+insert into test.tb2 (f59,f60) values(24,51654);
+insert into test.tb2 (f59,f60) values(323,14376);
+# Testcase 3.3.1.45
+insert into test.tb2 (f59,f60) values(34,41);
+insert into test.tb2 (f59,f60) values(04,74);
+insert into test.tb2 (f59,f60) values(15,87);
+insert into test.tb2 (f59,f60) values(22,93);
+# Testcase 3.3.1.46
+insert into test.tb2 (f59,f60) values(394,41);
+insert into test.tb2 (f59,f60) values(094,74);
+insert into test.tb2 (f59,f60) values(195,87);
+insert into test.tb2 (f59,f60) values(292,93);
+# Testcase 3.3.1.47
+insert into test.tb2 (f59,f60) values(0987,41) ;
+insert into test.tb2 (f59,f60) values(7876,74) ;
+# Testcase 3.3.1.52
+INSERT INTO tb2 (f59,f61) VALUES(321,765 );
+INSERT INTO tb2 (f59,f61) VALUES(9112,8771);
+# Testcase 3.3.1.53
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
+# Testcase 3.3.1.A1
+Insert into tb2 (f59,f60,f61) values (107,105,106) ;
+Insert into tb2 (f59,f60,f61) values (109,108,104) ;
+# Testcase 3.3.1.A2
+Insert into tb2 (f59,f60,f61) values (207,205,206) ;
+Insert into tb2 (f59,f60,f61) values (209,208,204) ;
+# Testcase 3.3.1.A3
+Insert into tb2 (f59,f60,f61) values (27,25,26) ;
+Insert into tb2 (f59,f60,f61) values (29,28,24) ;
+# Testcase 3.3.1.63
+Insert into tb2 (f59,f60,f61) values (17,15,16) ;
+Insert into tb2 (f59,f60,f61) values (19,18,14) ;
+insert into tb2 (f59,f60,f61) values (107,105,106);
+insert into tb2 (f59,f60,f61) values (109,108,104);
+# Testcase 3.3.1.64
+INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
+INSERT INTO tb2 (f59,f60) VALUES( 242,79 );
+INSERT INTO tb2 (f59,f60) VALUES( 424,89 );
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+SELECT * FROM tb2 ORDER BY f59, f60, f61;
+--enable_ps_protocol
+#
+#
+Use test;
+#
+# End of basic preparations.
+#
+##############################################################################
+
+
+
+#==============================================================================
+# 3.3.1 Syntax checks for CREATE VIEW, CREATE OR REPLACE VIEW, ALTER VIEW,
+# and DROP VIEW:
+#==============================================================================
+
+let $message= Testcase 3.3.1.1 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.1: Ensure that all clauses that should be supported
+# are supported.
+###############################################################################
+--disable_warnings
+Drop table if exists t1;
+--enable_warnings
+Create table t1 (f59 INT, f60 INT) ;
+Insert into t1 values (100,4234);
+Insert into t1 values (990,6624);
+Insert into t1 values (710,765);
+Insert into t1 values (300,433334);
+Insert into t1 values (800,9788);
+Insert into t1 values (500,9866);
+
+#(01)
+ --disable_warnings
+ Drop view if exists v1 ;
+ --enable_warnings
+ CREATE VIEW v1 AS select f59,f60,f61
+ FROM test.tb2 where f59=250;
+ select * FROM v1 order by f60,f61 limit 0,10;
+
+#(02)
+ Drop view if exists v1 ;
+ CREATE VIEW v1 AS select f59,f60,f61
+ FROM test.tb2 limit 100;
+ select * FROM v1 order by f59,f60,f61 limit 0,10;
+
+#(03)
+ CREATE or REPLACE VIEW v1 AS select f59,f60,f61
+ FROM test.tb2;
+ select * FROM v1 order by f59,f60,f61 limit 4,3;
+
+#(04)
+ CREATE or REPLACE VIEW v1 AS select distinct f59
+ FROM test.tb2;
+ select * FROM v1 order by f59 limit 4,3;
+
+#(05)
+ ALTER VIEW v1 AS select f59
+ FROM test.tb2;
+ select * FROM v1 order by f59 limit 6,2;
+
+#(06)
+ CREATE or REPLACE VIEW v1 AS select f59
+ from tb2 order by f59;
+ select * FROM v1 order by f59 limit 0,10;
+
+#(07)
+ CREATE or REPLACE VIEW v1 AS select f59
+ from tb2 order by f59 asc;
+ select * FROM v1 limit 0,10;
+
+#(08)
+ CREATE or REPLACE VIEW v1 AS select f59
+ from tb2 order by f59 desc;
+ select * FROM v1 limit 0,10;
+
+#(09)
+ CREATE or REPLACE VIEW v1 AS select f59
+ from tb2 group by f59;
+ select * FROM v1 order by f59 limit 0,10;
+
+#(10)
+ CREATE or REPLACE VIEW v1 AS select f59
+ from tb2 group by f59 asc;
+ select * FROM v1 order by f59 limit 0,10;
+
+#(11)
+ CREATE or REPLACE VIEW v1 AS select f59
+ from tb2 group by f59 desc;
+ select * FROM v1 order by f59 limit 0,10;
+
+#(12)
+ CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
+ union (select f59 from t1);
+ select * FROM v1 order by f59 limit 0,10;
+
+#(13)
+ CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
+ UNION DISTINCT(select f59 FROM t1) ;
+ select * FROM v1 order by f59 limit 0,10;
+
+#(14)
+ CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
+ UNION ALL(select f59 FROM t1) ;
+ select * FROM v1 order by f59 limit 0,10;
+
+#(15)
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+ CREATE or REPLACE VIEW v1 AS select *
+ FROM test.tb2 WITH LOCAL CHECK OPTION ;
+ select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50;
+
+ #(16)
+CREATE or REPLACE VIEW v1 AS select *
+ FROM test.tb2 WITH CASCADED CHECK OPTION ;
+ select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10;
+--horizontal_results
+--enable_ps_protocol
+
+#(17)
+ CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+ FROM test.tb2 WITH CASCADED CHECK OPTION;
+ SELECT * FROM v1 order by f59,f60 limit 0,10;
+
+
+#(18)
+ CREATE or REPLACE VIEW v1 AS select f59, f60
+ from test.tb2 where f59=3330 ;
+ select * FROM v1 order by f60 limit 0,10;
+
+ DROP VIEW v1 ;
+ DROP TABLE t1 ;
+
+
+let $message= Testcase 3.3.1.2 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.2: Ensure that all clauses that should not be supported are
+# disallowed with an appropriate error message.
+###############################################################################
+--disable_warnings
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS v2 ;
+--enable_warnings
+CREATE TABLE t1 (f1 BIGINT) ;
+
+# User variables and parameters are not supported in VIEWs -> 3.3.1.40
+
+# SELECT INTO is illegal
+SET @x=0;
+--error ER_PARSE_ERROR
+CREATE or REPLACE VIEW v1 AS Select 1 INTO @x;
+Select @x;
+
+# Subquery in the FROM clause is illegal
+CREATE or REPLACE VIEW v1 AS Select 1
+FROM (SELECT 1 FROM t1) my_table;
+DROP VIEW v1;
+
+# Triggers cannot be associated with VIEWs
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+# Show that 1. The trigger code basically works and the VIEW is updatable
+# 2. The VIEW is updatable
+# 3. Insert into view causes that the trigger is executed
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ;
+SET @a:=0 ;
+SELECT @a ;
+INSERT INTO v1 VALUES (1) ;
+SELECT @a ;
+SELECT * FROM t1;
+DROP TRIGGER tr1 ;
+SET @a:=0 ;
+--error ER_WRONG_OBJECT
+CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ;
+
+RENAME TABLE v1 TO v2;
+# RENAME VIEW is not available even when we try it via rename table.
+--error ER_PARSE_ERROR
+RENAME VIEW v2 TO v1;
+--error ER_WRONG_OBJECT
+ALTER TABLE v2 RENAME AS v1;
+--error ER_PARSE_ERROR
+ALTER VIEW v1 RENAME AS v2;
+
+# VIEWs cannot contain a PRIMARY KEY or have an Index.
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS v2 ;
+--enable_warnings
+CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE );
+CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
+ALTER TABLE t1 ADD PRIMARY KEY(f1);
+--error ER_WRONG_OBJECT
+ALTER TABLE v1 ADD PRIMARY KEY(f1);
+--error ER_PARSE_ERROR
+ALTER VIEW v1 ADD PRIMARY KEY(f1);
+CREATE INDEX t1_idx ON t1(f3);
+--error ER_WRONG_OBJECT
+CREATE INDEX v1_idx ON v1(f3);
+DROP TABLE t1;
+DROP VIEW v1;
+
+
+let $message= Testcase 3.3.1.3 + 3.1.1.4 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.1.1.3: Ensure that all supported clauses are supported only in
+# the correct order.
+# Testcase 3.1.1.4: Ensure that an appropriate error message is returned if
+# a clause is out-of-order in an SQL statement.
+###############################################################################
+--disable_warnings
+DROP VIEW IF EXISTS v1 ;
+--enable_warnings
+# REPLACE after VIEW name
+--error ER_PARSE_ERROR
+CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
+# CHECK OPTION before AS SELECT
+--error ER_PARSE_ERROR
+CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
+from tb2 my_table limit 50;
+# CHECK OPTION before AS SELECT
+--error ER_PARSE_ERROR
+CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
+from tb2 my_table limit 50;
+# CREATE after SELECT
+--error ER_PARSE_ERROR
+SELECT * FROM tb2 my_table CREATE VIEW As v1;
+# AS forgotten
+--error ER_PARSE_ERROR
+CREATE or REPLACE VIEW v1 Select f59, f60
+from test.tb2 my_table where f59 = 250 ;
+# positive case
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+DROP VIEW v1;
+# REPLACE OR CREATE instead of CREATE OR REPLACE
+--error ER_PARSE_ERROR
+REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+# AS after SELECT
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CASCADED WITH CHECK OPTION;
+# OPTION CHECK instead of CHECK OPTION
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED OPTION CHECK;
+# CHECK OPTION before WITH
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CHECK OPTION WITH CASCADED;
+# CHECK OPTION before AS SELECT
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table;
+# VIEW <viewname> after AS SELECT
+--error ER_PARSE_ERROR
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION;
+# VIEW <viewname> after CHECK OPTION
+--error ER_PARSE_ERROR
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1;
+
+# Variants with LOCAL CHECK OPTION
+--error ER_PARSE_ERROR
+REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table LOCAL WITH CHECK OPTION;
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL OPTION CHECK;
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
+FROM test.tb2 my_table CHECK OPTION WITH LOCAL;
+--error ER_PARSE_ERROR
+CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
+AS SELECT F59, F60 FROM test.tb2 my_table;
+--error ER_PARSE_ERROR
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION;
+--error ER_PARSE_ERROR
+CREATE OR REPLACE AS SELECT F59, F60
+FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1;
+
+--disable_warnings
+Drop table if exists t1 ;
+--enable_warnings
+CREATE table t1 (f1 int ,f2 int) ;
+INSERT INTO t1 values (235, 22);
+INSERT INTO t1 values (554, 11);
+# SELECTs of UNION in braces
+--error ER_PARSE_ERROR
+CREATE or REPLACE view v1 as (Select from f59 tb2)
+Union ALL (Select from f1 t1);
+# by before order
+--error ER_PARSE_ERROR
+CREATE or REPLACE view v1 as Select f59, f60
+from tb2 by order f59;
+# by before group
+--error ER_PARSE_ERROR
+CREATE or REPLACE view v1 as Select f59, f60
+from tb2 by group f59 ;
+
+
+let $message= Testcase 3.3.1.5 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.5: Ensure that all clauses that are defined to be mandatory
+# are indeed required to be mandatory by the MySQL server
+# and tools.
+###############################################################################
+--disable_warnings
+DROP VIEW IF EXISTS v1 ;
+--enable_warnings
+--error ER_PARSE_ERROR
+CREATE VIEW v1 SELECT * FROM tb2;
+--error ER_PARSE_ERROR
+CREATE v1 AS SELECT * FROM tb2;
+--error ER_PARSE_ERROR
+VIEW v1 AS SELECT * FROM tb2;
+# positive case
+CREATE VIEW v1 AS SELECT 1;
+DROP VIEW v1;
+--error ER_PARSE_ERROR
+ VIEW v1 AS SELECT 1;
+--error ER_PARSE_ERROR
+CREATE v1 AS SELECT 1;
+--error ER_PARSE_ERROR
+CREATE VIEW AS SELECT 1;
+--error ER_PARSE_ERROR
+CREATE VIEW v1 SELECT 1;
+--error ER_PARSE_ERROR
+CREATE VIEW v1 AS ;
+
+
+let $message= Testcase 3.3.1.6 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.6: Ensure that any clauses that are defined to be optional
+# are indeed treated as optional by the MySQL server
+# and tools.
+###############################################################################
+# Note: The positive test in 3.3.1.5 shows, that ALGORITHM ..., CHECK OPTION
+# and any column_list after the VIEW name are optional.
+# Therefore check here:
+# - ALGORITHM = <all possible algorithms>
+# - all possible CHECK OPTIONs
+# - some incomplete or wrong stuff
+--disable_warnings
+DROP VIEW IF EXISTS v1 ;
+--enable_warnings
+CREATE or REPLACE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = MERGE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+# negative test cases
+--error ER_PARSE_ERROR
+CREATE or REPLACE = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
+CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
+CREATE or REPLACE ALGORITHM = VIEW v1
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
+CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
+CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
+CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
+CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
+as SELECT * from tb2;
+Drop view if exists v1 ;
+
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION;
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH LOCAL CHECK OPTION;
+# negative test cases
+--error ER_PARSE_ERROR
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH NO CHECK OPTION;
+--error ER_PARSE_ERROR
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 CASCADED CHECK OPTION;
+--error ER_PARSE_ERROR
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED OPTION;
+--error ER_PARSE_ERROR
+CREATE or REPLACE VIEW v1
+AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK ;
+
+
+let $message= Testcase 3.3.1.7 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.7: Ensure that all valid, fully-qualified, and non-qualified,
+# view names are accepted, at creation time, alteration time,
+# and drop time.
+###############################################################################
+# Note(mleich): non-qualified view name means a view name without preceding
+# database name
+--disable_warnings
+DROP VIEW IF EXISTS v1 ;
+--enable_warnings
+Create view test.v1 AS Select * from test.tb2;
+Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
+Drop view test.v1 ;
+Create view v1 AS Select * from test.tb2 limit 100 ;
+Alter view v1 AS Select F59 from test.tb2 limit 100 ;
+Drop view v1 ;
+
+
+let $message= Testcase 3.3.1.A0 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.A0: Ensure that view names are treated case sensitive.
+###############################################################################
+# Note(mleich): Maybe this test produces portability problems on Windows.
+# FIXME There should be a test outside this one checking the
+# creation of objects with cases sensitive names.
+# If we have this test the following sub testcase should
+# be deleted.
+--disable_warnings
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS V1 ;
+--enable_warnings
+eval CREATE TABLE t1 (f1 NUMERIC(4)) ENGINE = $engine_type;
+INSERT INTO t1 VALUES(1111), (2222);
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111;
+# We get here the sql code
+# - 0 on OS with cases sensitive view names (Example: UNIX)
+# - ER_TABLE_EXISTS_ERROR on OS without cases sensitive view names (Example: WINDOWS)
+--error 0,ER_TABLE_EXISTS_ERROR
+CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222;
+SELECT * FROM v1;
+# SELECT * FROM V1;
+--disable_warnings
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+DROP VIEW IF EXISTS V1 ;
+--enable_warnings
+
+
+let $message= Testcase 3.3.1.8 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.8: Ensure that any invalid view name is never accepted, and
+# that an appropriate error message is returned when the name
+# is rejected.
+###############################################################################
+# Note(mleich): There could be more negative tests here, but I assume that the
+# server routines checking if a table or view name is acceptable
+# are heavily tested in tests checking the creation of tables.
+--error ER_PARSE_ERROR
+Create view select AS Select * from test.tb2 limit 100;
+--error ER_PARSE_ERROR
+Create view as AS Select * from test.tb2 limit 100;
+--error ER_PARSE_ERROR
+Create view where AS Select * from test.tb2 limit 100;
+--error ER_PARSE_ERROR
+Create view from AS Select * from test.tb2 limit 100;
+--error ER_PARSE_ERROR
+Create view while AS Select * from test.tb2 limit 100;
+--error ER_PARSE_ERROR
+Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ;
+--disable_warnings
+Drop view if exists test.procedure ;
+--enable_warnings
+Create view test.procedure as Select * from test.tb2 limit 100 ;
+Drop view if exists test.procedure ;
+
+
+let $message= Testcase 3.3.1.9 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.9: Ensure that a reference to a non-existent view is rejected
+# with an appropriate error message
+###############################################################################
+# Note(mleich): The SELECT statement syntax does not contain any functionality
+# to claim, that the object after FROM must be a VIEW. SHOW's will
+# be checked in
+# 3.3.11 Checks on SHOW, EXPLAIN, and DESCRIBE statements.
+# Let's check here a view based on a dropped view or table.
+--disable_warnings
+Drop TABLE IF EXISTS t1 ;
+Drop VIEW IF EXISTS v1;
+Drop VIEW IF EXISTS v2;
+Drop VIEW IF EXISTS v3;
+--enable_warnings
+CREATE TABLE t1 ( f1 char(5));
+INSERT INTO t1 SET f1 = 'abcde';
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+CREATE VIEW v2 AS SELECT * FROM v1;
+
+# Only negative cases, positive cases will be checked later:
+DROP TABLE t1;
+--error ER_VIEW_INVALID
+SELECT * FROM v1;
+--error ER_VIEW_INVALID
+DELETE FROM v1;
+--error ER_VIEW_INVALID
+UPDATE v1 SET f1 = 'aaaaa';
+--error ER_VIEW_INVALID
+INSERT INTO v1 SET f1 = "fffff";
+# v2 is based on v1, which is now invalid
+--error ER_VIEW_INVALID
+SELECT * FROM v2;
+--error ER_VIEW_INVALID
+DELETE FROM v2;
+--error ER_VIEW_INVALID
+UPDATE v2 SET f1 = 'aaaaa';
+--error ER_VIEW_INVALID
+INSERT INTO v2 SET f1 = "fffff";
+DROP VIEW v1;
+# v2 is based on v1, which is now dropped
+--error ER_VIEW_INVALID
+SELECT * FROM v2;
+--error ER_VIEW_INVALID
+DELETE FROM v2;
+--error ER_VIEW_INVALID
+UPDATE v2 SET f1 = 'aaaaa';
+--error ER_VIEW_INVALID
+INSERT INTO v2 SET f1 = "fffff";
+
+DROP VIEW v2;
+
+# A VIEW based on itself is non sense.
+--disable_warnings
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+--enable_warnings
+CREATE TABLE t1 (f1 FLOAT);
+# Create a new VIEW based on itself
+--error ER_NO_SUCH_TABLE
+CREATE VIEW v1 AS SELECT * FROM v1;
+# Replace a valid VIEW with one new based on itself
+CREATE VIEW v1 AS SELECT * FROM t1;
+--error ER_NO_SUCH_TABLE
+CREATE or REPLACE VIEW v1 AS SELECT * FROM v1;
+
+DROP VIEW v1;
+DROP TABLE t1;
+
+let $message= Testcase 3.3.1.10 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.10: Ensure that it is not possible to create two views with
+# the same name in the same database.
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+Create view test.v1 AS Select * from test.tb2 ;
+--error ER_TABLE_EXISTS_ERROR
+Create view test.v1 AS Select F59 from test.tb2 ;
+--error ER_TABLE_EXISTS_ERROR
+Create view v1 AS Select F59 from test.tb2 ;
+
+
+let $message= Testcase 3.3.1.11 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.11: Ensure that it is not possible to create a view and a base
+# table with the same name in the same database.
+###############################################################################
+# The VIEW should get the same name like an already existing TABLE.
+--error ER_TABLE_EXISTS_ERROR
+Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ;
+--error ER_TABLE_EXISTS_ERROR
+Create view tb2 AS Select f59,f60 from test.tb2 limit 100 ;
+# The TABLE should get the same name like an already existing VIEW.
+--disable_warnings
+Drop view if exists test.v111 ;
+--enable_warnings
+Create view test.v111 as select * from tb2 limit 50;
+--error ER_TABLE_EXISTS_ERROR
+Create table test.v111(f1 int );
+--error ER_TABLE_EXISTS_ERROR
+Create table v111(f1 int );
+DROP VIEW test.v111;
+
+
+let $message= Testcase 3.3.1.12 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.12: Ensure that it is possible to create two or more views and
+# base tables with the same name, providing each resides in
+# a different database.
+###############################################################################
+USE test;
+--disable_warnings
+Drop database if exists test2 ;
+--enable_warnings
+Create database test2 ;
+# Plan of sub tests
+# Object name object type in object type in
+# database test database test2
+# t1 TABLE TABLE
+# t2 TABLE VIEW
+# v1 VIEW TABLE
+# v2 VIEW VIEW
+--disable_warnings
+DROP TABLE IF EXISTS test.t0, test.t1, test.t2;
+DROP VIEW IF EXISTS test.v1;
+DROP VIEW IF EXISTS test.v2;
+--enable_warnings
+CREATE TABLE test.t1 ( f1 VARCHAR(20));
+CREATE TABLE test2.t1 ( f1 VARCHAR(20));
+CREATE TABLE test.t2 ( f1 VARCHAR(20));
+CREATE TABLE test2.v1 ( f1 VARCHAR(20));
+# t0 is an auxiliary table needed for the VIEWs
+CREATE TABLE test.t0 ( f1 VARCHAR(20));
+CREATE TABLE test2.t0 ( f1 VARCHAR(20));
+
+CREATE VIEW test2.t2 AS SELECT * FROM test2.t0;
+CREATE VIEW test.v1 AS SELECT * FROM test.t0;
+CREATE VIEW test.v2 AS SELECT * FROM test.t0;
+CREATE VIEW test2.v2 AS SELECT * FROM test2.t0;
+
+# Some additional tests on the just created objects to show that they are
+# accessible and do have the expected content.
+# INSERTs with full qualified table
+INSERT INTO test.t1 VALUES('test.t1 - 1');
+INSERT INTO test2.t1 VALUES('test2.t1 - 1');
+INSERT INTO test.t2 VALUES('test.t2 - 1');
+INSERT INTO test2.v1 VALUES('test2.v1 - 1');
+INSERT INTO test.t0 VALUES('test.t0 - 1');
+INSERT INTO test2.t0 VALUES('test2.t0 - 1');
+# INSERTs with not full qualified table name.
+USE test;
+INSERT INTO t1 VALUES('test.t1 - 2');
+INSERT INTO t2 VALUES('test.t2 - 2');
+INSERT INTO t0 VALUES('test.t0 - 2');
+USE test2;
+INSERT INTO t1 VALUES('test2.t1 - 2');
+INSERT INTO v1 VALUES('test2.v1 - 2');
+INSERT INTO t0 VALUES('test2.t0 - 2');
+# SELECTs with full qualified table
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM v1;
+SELECT * FROM v2;
+USE test;
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM v1;
+SELECT * FROM v2;
+
+
+let $message= Testcase 3.3.1.13 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.13: Ensure that, if the CREATE OR REPLACE VIEW statement is
+# used to create a view using the name of an existing view,
+# it first cleanly drops the existing view and then creates
+# the new view.
+###############################################################################
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+CREATE TABLE t1 (f1 BIGINT);
+INSERT INTO t1 VALUES(1);
+CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2;
+SHOW CREATE VIEW test.v1;
+--sorted_result
+SELECT * FROM test.v1;
+# Switch the algorithm
+CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1
+AS SELECT * FROM t1 limit 2;
+SHOW CREATE VIEW test.v1;
+--sorted_result
+SELECT * FROM test.v1;
+# Switch the base table
+CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2;
+SHOW CREATE VIEW test.v1;
+if ($have_bug_11589)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
+--horizontal_results
+--enable_ps_protocol
+# Switch the SELECT but not the base table
+CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2;
+SHOW CREATE VIEW test.v1;
+SELECT * FROM test.v1 order by F59 limit 10,100;
+Drop table test.t1 ;
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.1.14 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.14: Ensure that, if the CREATE OR REPLACE VIEW statement is
+# used to create a view using the name of an existing base
+# table, it fails with an appropriate error message.
+###############################################################################
+--error ER_WRONG_OBJECT
+CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2;
+--error ER_WRONG_OBJECT
+CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2;
+
+
+let $message= Testcase 3.3.1.15 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.15: Ensure that, if the CREATE OR REPLACE VIEW statement is
+# used to create a view using a name that does not already
+# belong to an existing view or base table, it cleanly
+# creates the view.
+###############################################################################
+--disable_warnings
+Drop table if exists test.v1 ;
+--enable_warnings
+CREATE OR REPLACE view test.v1 as select * from tb2;
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--sorted_result
+SELECT * FROM test.v1;
+--enable_ps_protocol
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.1.16 + 3.3.1.17 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.16: Ensure that a view with a definition that does not include
+# an explicit column-name list takes its column names from
+# the underlying base table(s).
+# Testcase 3.3.1.17: Ensure that a view with a definition that does include an
+# explicit column-name list uses the explicit names and not
+# the name of the columns from the underlying base tables(s)
+###############################################################################
+--disable_warnings
+Drop table if exists test.v1 ;
+--enable_warnings
+CREATE OR REPLACE VIEW v1 AS SELECT * From tb2;
+# Note(mleich): The empty result is intended, because I want to compare
+# column names only.
+SELECT * FROM tb2 WHERE 1 = 2;
+SELECT * FROM v1 WHERE 1 = 2;
+Drop view v1;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+CREATE TABLE t1 (f1 NUMERIC(15,3));
+INSERT INTO t1 VALUES(8.8);
+# 1. no explicit column in VIEW definition or SELECT
+CREATE VIEW v1 AS SELECT * FROM t1;
+SHOW CREATE VIEW v1;
+SELECT * FROM v1;
+# 2. no explicit column in VIEW definition, but in SELECT column_list
+CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1;
+SHOW CREATE VIEW v1;
+SELECT * FROM v1;
+# 3. no explicit column in VIEW definition, but alias from SELECT column_list
+CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1;
+SHOW CREATE VIEW v1;
+SELECT * FROM v1;
+# 4. Finally the requirement: explicit column_list in VIEW definition
+CREATE OR REPLACE VIEW v1(column1,column2)
+AS SELECT f1 As my_column, f1 FROM t1;
+SHOW CREATE VIEW v1;
+SELECT * FROM v1;
+CREATE OR REPLACE VIEW test.v1(column1,column2)
+AS SELECT f1 As my_column, f1 FROM test.t1;
+SHOW CREATE VIEW v1;
+SELECT * FROM v1;
+
+
+let $message= Testcase 3.3.1.18 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.18: Ensure that a reference to a view with a definition that
+# includes an explicit column-name fails, with an appropriate
+# error message, if the reference includes columns names
+# from the underlying base table(s) rather than the view
+# column names.
+###############################################################################
+# Note(mleich): The goal is to check the merge algorithm.
+--disable_warnings
+Drop view if exists v1 ;
+Drop view if exists v1_1 ;
+--enable_warnings
+Create view v1
+as Select test.tb2.f59 as NewNameF1, test.tb2.f60
+from test.tb2 limit 0,100 ;
+Create view v1_1
+as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
+from tb2 limit 0,100 ;
+--error ER_BAD_FIELD_ERROR
+SELECT NewNameF1,f60 FROM test.v1_1 ;
+--error ER_BAD_FIELD_ERROR
+SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
+--error ER_BAD_FIELD_ERROR
+SELECT f59, f60 FROM test.v1 ;
+Use test ;
+--error ER_BAD_FIELD_ERROR
+SELECT F59 FROM v1 ;
+
+
+let $message= Testcase 3.3.1.19 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.19: Ensure that every column of a view must have a
+# distinct name
+###############################################################################
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
+INSERT INTO t1 VALUES(7, 7.7);
+CREATE TABLE t2( f1 BIGINT, f2 DECIMAL(5,2));
+INSERT INTO t2 VALUES(6, 6.6);
+# positive testcases
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1;
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1;
+SELECT * FROM v1;
+CREATE OR REPLACE VIEW v1 AS SELECT f1 AS my_f1, f2 AS my_f2 FROM t1;
+SELECT * FROM v1;
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
+SELECT * FROM v1;
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT t1.f1, t2.f2 FROM t1, t2;
+SELECT * FROM v1;
+# negative testcases (sometimes including the underlying SELECT)
+# duplicate via alias in SELECT
+SELECT f1, f2 AS f1 FROM t1;
+--error ER_DUP_FIELDNAME
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1;
+# duplicate via JOIN SELECT
+SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
+--error ER_DUP_FIELDNAME
+CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
+# duplicate via VIEW definition
+--error ER_DUP_FIELDNAME
+CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1;
+
+
+let $message= Testcase 3.3.1.20 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.20: Ensure that, if a column-name list is provided for a
+# view definition, the list contains a name for every column
+# in the view
+###############################################################################
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
+# positive case
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT * FROM t1;
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
+# negative cases, where we assign a wrong number of column names
+--error ER_VIEW_WRONG_LIST
+CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT * FROM t1;
+--error ER_VIEW_WRONG_LIST
+CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT f1, f2 FROM t1;
+--error ER_VIEW_WRONG_LIST
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT * FROM t1;
+--error ER_VIEW_WRONG_LIST
+CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1;
+
+
+let $message= Testcase 3.3.1.21 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.21: Ensure that a view column can be a direct copy of a
+# column from an underlying table.
+###############################################################################
+--disable_warnings
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2;
+SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2;
+Drop view if exists test.v1 ;
+
+
+let $message= Testcase 3.3.1.22 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.22: Ensure that a view column can be based on any valid
+# expression, whether or not the expression includes a
+# reference of the column of an underlying table.
+###############################################################################
+--disable_warnings
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 WHERE f59 < 3;
+--sorted_result
+SELECT * FROM test.v1;
+CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
+--sorted_result
+SELECT * FROM test.v1;
+CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
+--sorted_result
+SELECT * FROM test.v1;
+Drop view if exists test.v1 ;
+
+
+let $message= Testcase 3.3.1.23 + 3.3.1.24 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.23: Ensure that a view definition that includes a reference to
+# a non-existent table fails, with an appropriate error
+# message, at creation time.
+# Testcase 3.3.1.24: Ensure that a view definition that includes a reference to
+# a non-existent view fails, with an appropriate error
+# message, at creation time.
+###############################################################################
+# Note(mleich): The SELECT statement syntax does not contain any functionality
+# to claim, that the object after FROM must be a VIEW.
+# Testcase 3.3.1.24 should be deleted.
+USE test;
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+--enable_warnings
+--error ER_NO_SUCH_TABLE
+CREATE VIEW test.v2 AS SELECT * FROM test.t1;
+--error ER_NO_SUCH_TABLE
+CREATE VIEW v2 AS Select * from test.v1;
+DROP VIEW IF EXISTS v2;
+
+
+let $message= Testcase 3.3.1.25 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.25: Ensure that a view cannot be based on one or more
+# temporary tables.
+###############################################################################
+# Note(mleich): A temporary table hides permanent tables which have the same
+# name. So do not forget to drop the temporary table.
+--disable_warnings
+DROP TABLE IF EXISTS t1_temp;
+DROP TABLE IF EXISTS t2_temp;
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+Create table t1_temp(f59 char(10),f60 int) ;
+Create temporary table t1_temp(f59 char(10),f60 int) ;
+Insert into t1_temp values('FER',90);
+Insert into t1_temp values('CAR',27);
+--error ER_VIEW_SELECT_TMPTABLE
+Create view v1 as select * from t1_temp ;
+
+Create temporary table t2_temp(f59 char(10),f60 int) ;
+Insert into t2_temp values('AAA',11);
+Insert into t2_temp values('BBB',22);
+--error ER_VIEW_SELECT_TMPTABLE
+Create or replace view v1
+as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ;
+DROP temporary table t1_temp;
+DROP table t1_temp;
+DROP temporary table t2_temp;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+CREATE TABLE t1 (f1 char(10));
+CREATE TEMPORARY TABLE t2 (f2 char(10));
+INSERT INTO t1 VALUES('t1');
+INSERT INTO t1 VALUES('A');
+INSERT INTO t2 VALUES('t2');
+INSERT INTO t2 VALUES('B');
+# simple SELECT
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2;
+# JOIN - temporary table first
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2, t1;
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1;
+# JOIN - temporary table last
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1, t2;
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2;
+# UNION - temporary table first
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2 UNION SELECT * FROM t1;
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1;
+# UNION - temporary table last
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2;
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2;
+# SUBQUERY - temporary table first
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
+WHERE f2 = ( SELECT f1 FROM t1 );
+# SUBQUERY - temporary table last
+--error ER_VIEW_SELECT_TMPTABLE
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1
+WHERE f1 = ( SELECT f2 FROM t2 );
+DROP TABLE t1;
+DROP TEMPORARY TABLE t2;
+
+
+let $message= Testcase 3.3.1.26 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.26: Ensure that a view can be based on an underlying table
+# within the same database
+###############################################################################
+--disable_warnings
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+Create view test.v1 AS Select * from test.tb2;
+if ($have_bug_11589)
+{
+--disable_ps_protocol
+}
+--sorted_result
+Select * from test.v1;
+--enable_ps_protocol
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.1.27 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.27: Ensure that a view can be based on an underlying view
+# within the same database.
+###############################################################################
+--disable_warnings
+DROP VIEW IF EXISTS test.v1;
+Drop VIEW IF EXISTS test.v1_1 ;
+--enable_warnings
+Create view test.v1 AS Select * from test.tb2;
+Create view test.v1_1 AS Select F59 from test.v1 ;
+Select * from test.v1_1 order by F59 limit 2;
+Drop view test.v1 ;
+Drop view test.v1_1 ;
+
+
+let $message= Testcase 3.3.1.28 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.28: Ensure that a view can be based on an underlying table
+# from another database.
+###############################################################################
+--disable_warnings
+Drop database if exists test2 ;
+--enable_warnings
+create database test2 ;
+Create view test2.v2 AS Select * from test.tb2 limit 50,50;
+use test2 ;
+Create view v1 AS Select * from test.tb2 limit 50 ;
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+Select * from v1 order by f59,f60,f61,f62,f63,f64,f65;
+--horizontal_results
+--enable_ps_protocol
+--sorted_result
+Select * from test2.v2 ;
+Drop view if exists test2.v1 ;
+Drop view if exists test2.v2 ;
+Drop database test2 ;
+
+
+let $message= Testcase 3.3.1.29 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.29: Ensure that a view can be based on an underlying view from
+# another database.
+###############################################################################
+--disable_warnings
+Drop database if exists test2 ;
+Drop view if exists test.v1 ;
+--enable_warnings
+create database test2 ;
+
+use test2;
+Create view test.v1 AS Select * from test.tb2 limit 50 ;
+Create view test2.v2 AS Select F59 from test.v1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test2.v2 ;
+
+# Note(mleich): Testcase 3.3.1.30 (identical requirements like 3.3.1.26)
+# --> omitted
+
+let $message= Testcase 3.3.1.31 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.31: Ensure that a view can be based on a join of multiple
+# tables within the same database.
+###############################################################################
+--disable_warnings
+Drop table if exists test.t1 ;
+--enable_warnings
+CREATE TABLE test.t1 ( f59 int, f60 int );
+INSERT INTO test.t1 VALUES( 34, 654 );
+INSERT INTO test.t1 VALUES( 906, 434 );
+INSERT INTO test.t1 VALUES( 445, 765 );
+Create or replace view test.v1
+AS SELECT test.t1.F59, test.tb2.F60
+FROM test.tb2 JOIN test.t1 ON test.tb2.F59 = test.t1.F59 ;
+--sorted_result
+Select * from test.v1;
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.1.32 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.32: Ensure that a view can be based on a join of multiple
+# tables from another database.
+###############################################################################
+--disable_warnings
+Drop table if exists test.t1 ;
+Drop database if exists test2 ;
+Drop view if exists test.v1 ;
+--enable_warnings
+create database test2 ;
+use test2 ;
+CREATE TABLE t1 ( f59 int, f60 int );
+INSERT INTO t1 VALUES( 34, 654 );
+INSERT INTO t1 VALUES( 906, 434 );
+INSERT INTO t1 VALUES( 445, 765 );
+CREATE VIEW test2.v1
+AS SELECT test.tb2.F59, test.tb2.F60
+FROM test.tb2 INNER JOIN test2.t1 ON tb2.f59 = t1.f59;
+--sorted_result
+Select * from test2.v1;
+
+Use test;
+
+
+let $message= Testcase 3.3.1.33 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.33: Ensure that a view can be based on a join of multiple
+# views within the same database.
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+Drop view if exists test.v1 ;
+--enable_warnings
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2;
+CREATE VIEW test.v1
+AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
+FROM test.v1_firstview INNER JOIN test.v1_secondview
+ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
+SELECT * FROM test.v1 order by f59,f60 limit 0,10;
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+Drop view if exists test.v1 ;
+
+
+let $message= Testcase 3.3.1.34 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.34: Ensure that a view can be based on a join of multiple
+# views from another database.
+###############################################################################
+--disable_warnings
+Drop database if exists test2 ;
+Drop view if exists test.v1_firstview ;
+Drop view if exists test.v1_secondview ;
+--enable_warnings
+
+create database test2 ;
+use test2 ;
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2 ;
+CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2 ;
+
+CREATE VIEW v1
+AS SELECT test.v1_firstview.F59, test.v1_firstview.F60
+FROM test.v1_firstview INNER JOIN test.v1_secondview
+ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+Drop view v1 ;
+Drop view test.v1_firstview ;
+Drop view test.v1_secondview ;
+
+
+let $message= Testcase 3.3.1.35 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.35: Ensure that a view can be based on a join of multiple
+# tables and/or views within the same database.
+###############################################################################
+use test;
+
+--disable_warnings
+Drop view if exists test.v1;
+Drop view if exists test.v1_firstview;
+--enable_warnings
+
+CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
+
+CREATE VIEW test.v1
+AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
+FROM test.v1_firstview INNER JOIN test.tb2
+ON test.v1_firstview.f59 = test.tb2.f59;
+SELECT * FROM test.v1 order by f59,f60 limit 0,10;
+Drop view test.v1 ;
+Drop view test.v1_firstview;
+
+
+let $message= Testcase 3.3.1.36 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.36: Ensure that a view can be based on a join of multiple
+# tables and/or views from another database.
+###############################################################################
+--disable_warnings
+Drop database if exists test2 ;
+--enable_warnings
+create database test2 ;
+use test2 ;
+
+CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ;
+CREATE VIEW v1
+AS SELECT v1_firstview.f59, v1_firstview.f60
+FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ;
+SELECT * FROM v1 order by f59,f60 limit 0,10;
+
+Drop database test2 ;
+
+
+let $message= Testcase 3.3.1.37 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.37: Ensure that a view can be based on a join of multiple
+# tables and/or views, some of which reside in the same
+# database and some of which reside in one other database.
+###############################################################################
+use test;
+--disable_warnings
+Drop table if exists t1;
+Drop view if exists test.v1 ;
+Drop view if exists test.v1_1 ;
+Drop view if exists test.v1_1 ;
+Drop view if exists test.v1_main ;
+--enable_warnings
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 0,10;
+
+Create table t1(f59 int, f60 int);
+Insert into t1 values (90,507) ;
+
+Create view v1_1 as Select f59,f60 from t1 ;
+Select * from v1_1 ;
+
+Create view v1_main
+as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1
+ON test.tb2.f59 = test.v1.f59;
+Select * from v1_main order by f59 limit 0,10;
+
+Drop table t1;
+Drop view test.v1 ;
+Drop view test.v1_1 ;
+Drop view test.v1_main ;
+
+
+let $message= Testcase 3.3.1.31 - 3.3.1.37 New Implementation ;
+--source include/show_msg80.inc
+###############################################################################
+# mleich: The testcases 3.3.1.31 - 3.3.1.37 should be tested more systematic.
+# Ensure that a view can be based on a join of multiple
+# Testcase 3.3.1.31: tables within the same database
+# Testcase 3.3.1.32: tables from another database.
+# Testcase 3.3.1.33: views within the same database
+# Testcase 3.3.1.34: views from another database
+# Testcase 3.3.1.35: tables and/or views within the same database
+# Testcase 3.3.1.36: tables and/or views from another database
+# Testcase 3.3.1.37: tables and/or views, some of which reside in
+# the same database and some of which reside in
+# one other database.
+###############################################################################
+USE test;
+--disable_warnings
+DROP DATABASE IF EXISTS test2;
+DROP TABLE IF EXISTS t0,t1;
+DROP VIEW IF EXISTS t3,t4;
+--enable_warnings
+CREATE DATABASE test2;
+
+--disable_warnings
+CREATE TABLE test1.t0 (f1 VARCHAR(20));
+CREATE TABLE test1.t1 (f1 VARCHAR(20));
+--enable_warnings
+CREATE TABLE test2.t0 (f1 VARCHAR(20));
+CREATE TABLE test2.t1 (f1 VARCHAR(20));
+--disable_warnings
+CREATE VIEW test1.t2 AS SELECT * FROM test1.t0;
+CREATE VIEW test1.t3 AS SELECT * FROM test2.t0;
+--enable_warnings
+CREATE VIEW test2.t2 AS SELECT * FROM test2.t0;
+CREATE VIEW test2.t3 AS SELECT * FROM test1.t0;
+INSERT INTO test1.t0 VALUES('test1.t0');
+INSERT INTO test1.t1 VALUES('test1.t1');
+INSERT INTO test2.t0 VALUES('test2.t0');
+INSERT INTO test2.t1 VALUES('test2.t1');
+
+# The extreme simple standard JOIN VIEW is:
+# CREATE OR REPLACE VIEW <database>.v1
+# AS SELECT * FROM <table or view 1>,<table or view 2>
+let $view= test.v1;
+let $tab1= test.t0;
+let $tab2= test.t1;
+# eval CREATE OR REPLACE VIEW $view AS SELECT * FROM $tab1, $tab2;
+# Produce at least all testcases via simple combinatorics, because it is better
+# to check some useless combinations than to forget an important one.
+let $view= test.v1;
+let $num_tab1= 3;
+while ($num_tab1)
+{
+ let $num_tab2= 3;
+ while ($num_tab2)
+ {
+ let $num_db1= 2;
+ while ($num_db1)
+ {
+ let $num_db2= 2;
+ while ($num_db2)
+ {
+ # Maybe somebody needs to check the generated values
+ # --disable_query_log
+ # eval SELECT '$num_db1.$num_tab1,$num_db2.$num_tab2';
+ # --enable_query_log
+ eval CREATE OR REPLACE VIEW $view AS
+ SELECT ta.f1 AS col1,
+ tb.f1 AS col2
+ FROM test$num_db1.t$num_tab1 ta, test$num_db2.t$num_tab2 tb;
+ eval SELECT * FROM $view;
+
+ dec $num_db2;
+ }
+
+ dec $num_db1;
+ }
+
+ dec $num_tab2;
+ }
+
+ dec $num_tab1;
+}
+
+
+let $message= Testcase 3.3.1.38 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.38: Ensure that a view can be based on a join of multiple
+# tables and/or views, some of which reside in the same
+# database and some of which reside two or more other
+# databases.
+###############################################################################
+--disable_warnings
+Drop table if exists test1.t1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test.v1_main;
+Drop view if exists test1.v1_1 ;
+Drop database if exists test3 ;
+--enable_warnings
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 20;
+
+Create table test1.t1 (f59 int,f60 int) ;
+Insert into test1.t1 values (199,507) ;
+Create view test1.v1_1 as Select f59,f60 from test1.t1 ;
+Select * from test1.v1_1 ;
+
+--disable_warnings
+--enable_warnings
+Create database test3 ;
+
+Create table test3.t1(f59 int,f60 int) ;
+Insert into test3.t1 values (1023,7670) ;
+Create view test3.v1_2 as Select f59,f60 from test3.t1 ;
+Select * from test3.v1_2 ;
+use test ;
+
+# mleich: FIXME The SELECT should deliver at least one row.
+Create view v1_main
+as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2,
+ test3.v1_2.f59 as f3
+FROM (test.tb2,test1.v1_1,test.v1) JOIN test3.v1_2
+ON (test.v1.f59 = test1.v1_1.f59) ;
+Select * from v1_main ;
+
+DROP VIEW test.v1 ;
+DROP VIEW test1.v1_1 ;
+DROP VIEW test.v1_main ;
+DROP DATABASE test3;
+
+
+let $message= Testcase 3.3.1.39 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.39: Ensure that a view definition that includes a subquery in
+# a FROM clause is rejected with an appropriate error
+# message at create time.
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+CREATE VIEW test.v1
+AS Select f59 from (Select * FROM tb2 limit 20) tx ;
+DROP VIEW test.v1;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM test.v1 order by f59 ;
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+
+
+let $message= Testcase 3.3.1.40 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.40: Ensure that a view definition that includes references to
+# one or more user variables is rejected with an appropriate
+# error message at create time.
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+Set @var1 = 'ABC' ;
+Set @var2 = 'XYZ' ;
+--error ER_VIEW_SELECT_VARIABLE
+CREATE VIEW test.v1 AS SELECT @var1, @var2 ;
+# System variables (name starts with '@@') are also not allowed
+--error ER_VIEW_SELECT_VARIABLE
+CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size;
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+
+
+let $message= Testcase 3.3.1.41 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.41: Ensure that a view definition within a stored procedure
+# definition cannot include references to any of the stored
+# procedures parameters.
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+Drop procedure if exists sp1 ;
+--enable_warnings
+
+delimiter //;
+Create procedure sp1() DETERMINISTIC
+ Begin
+ DECLARE x char;
+ Set x = 200 ;
+ Create view test.v1 as SELECT * FROM tb2 WHERE f59 = x ;
+ End //
+delimiter ;//
+--error ER_SP_DOES_NOT_EXIST
+Call sp1() ;
+Drop view if exists test.v1 ;
+Drop procedure sp1 ;
+
+
+let $message= Testcase 3.3.1.42 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.42: Ensure that a view definition that attempts to create a
+# temporary view (e.g. CREATE TEMPORARY VIEW or CREATE OR
+# REPLACE TEMPORARY VIEW) fails, with an appropriate
+# error message.
+###############################################################################
+#(01)
+--disable_warnings
+Drop VIEW if exists test.v1 ;
+--enable_warnings
+--error ER_PARSE_ERROR
+CREATE TEMPORARY VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2 ;
+#(02)
+--error ER_PARSE_ERROR
+CREATE OR REPLACE TEMPORARY VIEW test.v1 AS
+SELECT * FROM test.tb2 limit 2 ;
+
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+
+Use test;
+
+
+let $message= Testcase 3.3.1.43 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.43: Ensure that all valid changes (i.e. INSERT, UPDATE, DELETE
+# statements) to a view are shown in the view and are
+# accepted as changes by the underlying table(s).
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+
+CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2;
+
+INSERT INTO test.v1 values(122,432);
+
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20;
+--horizontal_results
+--enable_ps_protocol
+
+UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ;
+
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM test.tb2 where f59 = 3000 limit 0,20;
+--horizontal_results
+--enable_ps_protocol
+
+DELETE FROM test.v1
+where test.v1.f59 = 3000 and test.v1.f60 = 432;
+
+SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432;
+
+drop view test.v1 ;
+
+
+let $message= Testcase 3.3.1.44 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.44: Ensure that all invalid changes to a view are rejected
+# with an appropriate error message and do not affect the
+# data in the underlying tables(s).
+###############################################################################
+# mleich: Maybe we need some more tests here.
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+
+# Note(mleich): The modification will fail, because the VIEW contains 'limit'
+CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100;
+
+--error ER_NON_INSERTABLE_TABLE
+INSERT INTO test.v1 values(31, 32, 33) ;
+
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.1.45 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.45: Ensure that, for a view with a definition that does not
+# include WITH CHECK OPTION, all changes to the view which
+# violate the view definition do not show in the view but
+# are accepted as changes by the underlying table(s) unless
+# a constraint on an underlying table also makes the change
+# invalid.
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04;
+
+--enable_info
+UPDATE test.v1 SET f59 = 30 where F59 = 04 ;
+--disable_info
+SELECT * FROM test.v1 where f59 = 30 order by f59;
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM test.tb2 where f59 = 30 ;
+--horizontal_results
+--enable_ps_protocol
+
+--enable_info
+UPDATE tb2 SET f59 = 100 where f59 = 30 ;
+--disable_info
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM tb2 where f59 = 100 ;
+--horizontal_results
+--enable_ps_protocol
+SELECT * FROM test.v1 order by f59 ;
+
+drop view if exists test.v1 ;
+
+--disable_warnings
+Drop TABLE IF EXISTS test.t1 ;
+Drop VIEW IF EXISTS test.v1 ;
+--enable_warnings
+eval CREATE TABLE t1 (f1 BIGINT, f2 VARCHAR(20), PRIMARY KEY(f1))
+ ENGINE = $engine_type;
+INSERT INTO t1 VALUES(1,'one');
+INSERT INTO t1 VALUES(2,'two');
+INSERT INTO t1 VALUES(3,'three');
+INSERT INTO t1 VALUES(5,'five');
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 BETWEEN 2 AND 4;
+
+### SELECTs
+# 1. Searched record is within the scope of the view
+# 1.1 + exists within the base table
+SELECT COUNT(*) FROM v1 WHERE f1 = 2;
+# 1.2 + does not exists within the base table
+SELECT COUNT(*) FROM v1 WHERE f1 = 4;
+# 2. Searched record is outside of the scope of the view
+# 2.1 + exists within the base table
+SELECT COUNT(*) FROM v1 WHERE f1 = 5;
+# 2.2 + does not exists within the base table
+SELECT COUNT(*) FROM v1 WHERE f1 = 10;
+
+INSERT INTO t1 VALUES(4,'four');
+
+### DELETEs
+--enable_info
+# 1. Searched record is within the scope of the view
+# + exists within the base table
+DELETE FROM v1 WHERE f1 = 3;
+# 2. Searched record is outside of the scope of the view
+# + exists within the base table
+DELETE FROM v1 WHERE f1 = 5;
+--disable_info
+SELECT * FROM t1 ORDER BY f1;
+SELECT * FROM v1 ORDER BY f1;
+
+### INSERTs
+--enable_info
+# 1. The record to be inserted will be within the scope of the view.
+# But there is already a record with the PRIMARY KEY f1 = 2 .
+# OBN change for 5.1.21 --error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
+INSERT INTO v1 VALUES(2,'two');
+# 2. The record to be inserted will be within the scope of the view.
+# There is no already existing record with the PRIMARY KEY f1 = 3 .
+INSERT INTO v1 VALUES(3,'three');
+# 3. The record to be inserted will be outside of the scope of the view.
+# There is no already existing record with the PRIMARY KEY f1 = 6 .
+INSERT INTO v1 VALUES(6,'six');
+--disable_info
+SELECT * FROM t1 ORDER BY f1;
+SELECT * FROM v1 ORDER BY f1;
+
+### UPDATEs
+--enable_info
+# 1. The record to be updated is within the scope of the view
+# and will stay inside the scope.
+# But there is already a record with the PRIMARY KEY f1 = 2 .
+# OBN change for 5.1.21 --error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
+UPDATE v1 SET f1 = 2 WHERE f1 = 3;
+# 2. The record to be updated is within the scope of the view
+# and will stay inside the scope.
+UPDATE v1 SET f2 = 'number' WHERE f1 = 3;
+# 3. The record to be updated is within the scope of the view
+# and will leave the scope.
+UPDATE v1 SET f1 = 10 WHERE f1 = 3;
+# 4. The record to be updated is outside of the scope of the view.
+UPDATE v1 SET f2 = 'number' WHERE f1 = 1;
+--disable_info
+
+
+let $message= Testcase 3.3.1.46 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.46: Ensure that, for a view with a definition that does
+# include WITH CHECK OPTION, all changes to the view which
+# violate the view definition are rejected with an
+# appropriate error message and are not accepted as changes
+# by the underlying table(s).
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+CREATE VIEW test.v1 AS SELECT f59,f60
+FROM test.tb2 where f59 = 195 WITH CHECK OPTION ;
+
+--error ER_VIEW_CHECK_FAILED
+UPDATE test.v1 SET f59 = 198 where f59=195 ;
+SELECT * FROM test.v1 order by f59 ;
+
+drop view if exists test.v1 ;
+
+
+let $message= Testcase 3.3.1.47 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.47: Ensure that, for a view with a definition that does
+# include WITH LOCAL CHECK OPTION, all changes to the view
+# which violate the view definition are rejected with an
+# appropriate error message and are not accepted as changes
+# by the underlying table(s).
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+Drop view if exists test.v2 ;
+--enable_warnings
+CREATE VIEW test.v1 AS SELECT f59,f60
+FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ;
+CREATE VIEW test.v2 as SELECT * FROM test.v1 ;
+
+# This UPDATE violates the definition of VIEW test.v1.
+--error ER_VIEW_CHECK_FAILED
+UPDATE test.v1 SET F59 = 919 where f59 = 0987 ;
+SELECT * FROM test.v1 order by f59 ;
+
+# mleich: This UPDATE violates the definition of VIEW test.v1, but this
+# does not count, because the UPDATE runs on test.v2, which
+# is defined without any CHECK OPTION.
+# FIXME Does this testcase fit to 3.3.1.47 ?
+UPDATE test.v2 SET F59 = 9879 where f59 = 919 ;
+SELECT * FROM tb2 where f59 = 9879 ;
+
+drop view if exists v1 ;
+drop view if exists v2 ;
+
+
+let $message= Testcase 3.3.1.48 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.48: Ensure that, for a view with a definition that does
+# include WITH CASCADED CHECK OPTION, all changes to the
+# view which violate the view definition are rejected with
+# an appropriate error message and are not accepted as
+# changes by the underlying table(s).
+###############################################################################
+--disable_warnings
+DROP TABLE IF EXISTS test.t1;
+DROP VIEW IF EXISTS test.v1;
+--enable_warnings
+eval CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER)
+ ENGINE = $engine_type;
+INSERT INTO t1 VALUES ('A', 1);
+SELECT * FROM t1 order by f1, f2;
+
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2
+WITH CASCADED CHECK OPTION ;
+SELECT * FROM v1 order by f1, f2;
+--enable_info
+# positive cases
+UPDATE v1 SET f2 = 2 WHERE f2 = 1;
+INSERT INTO v1 VALUES('B',2);
+--disable_info
+# Bug#11771: View over InnoDB table, wrong result SELECT on VIEW,
+# field->query_id wrong
+SELECT * FROM v1 order by f1, f2;
+# negative cases
+--enable_info
+--error ER_VIEW_CHECK_FAILED
+UPDATE v1 SET f2 = 4;
+--error ER_VIEW_CHECK_FAILED
+INSERT INTO v1 VALUES('B',3);
+--disable_info
+# Bug#11771: View over InnoDB table, wrong result SELECT on VIEW,
+# field->query_id wrong
+SELECT * FROM v1 order by f1, f2;
+
+
+let $message= Testcase 3.3.1.49 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.49: Ensure that the WITH [LOCAL | CASCADED] CHECK OPTION
+# constraint is always correctly performed within the
+# correct scope, including in cases where a view is based
+# upon multiple other views whose definitions include every
+# possible combination of the WITH CHECK OPTION variants.
+###############################################################################
+--disable_warnings
+Drop table if exists test.t1 ;
+Drop view if exists test.v1 ;
+Drop view if exists test.v2 ;
+Drop view if exists test.v3 ;
+--enable_warnings
+Create table test.t1 (f59 INT, f60 INT) ;
+
+Insert into test.t1 values (100,4234);
+Insert into test.t1 values (290,6624);
+Insert into test.t1 values (410,765);
+Insert into test.t1 values (300,433334);
+Insert into test.t1 values (800,9788);
+Insert into test.t1 values (501,9866);
+
+Create view test.v1 as select f59
+FROM test.t1 where f59<500 with check option ;
+
+Create view test.v2 as select *
+from test.v1 where f59>0 with local check option ;
+
+--disable_warnings
+--enable_warnings
+
+Create view test.v3 as select *
+from test.v1 where f59>0 with cascaded check option ;
+
+Insert into test.v2 values(23) ;
+Insert into test.v3 values(24) ;
+
+drop view if exists test.v1 ;
+drop view if exists test.v2 ;
+drop view if exists test.v3 ;
+
+let $message= Testcase 3.3.1.49A ;
+--source include/show_msg80.inc
+# Testplan:
+# -----------------------------------------------------------
+# VIEW v1 is based on table t1 (*)
+# VIEW v2 is based on view v1 (*)
+# VIEW v3 is based on view v2 (*)
+#
+# (*) All variants like
+# - without check option
+# - WITH CASCADED CHECK OPTION
+# - WITH CHECK OPTION (default = CASCADED)
+# - WITH LOCAL CHECK OPTION
+#
+# The rules for updating and inserting column values:
+# 1. Top VIEW WITH CASCADED CHECK OPTION
+# --> The WHERE qualifications of all nested VIEWs have to be fulfilled.
+# The CHECK OPTIONS of underlying VIEWs have no effect.
+# 2. Top VIEW WITH LOCAL CHECK OPTION
+# --> Only the WHERE qualification of this VIEW has to be fulfilled.
+# The CHECK OPTIONS of underlying VIEWs have no effect.
+# 3. Top VIEW without any CHECK OPTION
+# --> The WHERE qualifications of all nested VIEWs need not to be fulfilled.
+# The CHECK OPTIONS of underlying VIEWs have no effect.
+#
+# v3 | v2 | v1 | Qualifications to be checked
+# ------------------------------------------------------------------------
+# CASCADED | <any> | <any> | qual_v3 + qual_v2 + qual_v3
+# <default> | <any> | <any> | qual_v3 + qual_v2 + qual_v3
+# LOCAL | <any> | <any> | qual_v3
+# <without> | <any> | <any> |
+#
+# Note: The CHECK OPTION does not influence the retrieval of rows
+# (SELECT/DELETE/UPDATE). All WHERE qualifications will be applied
+# for the retrieval of rows.
+#
+# The annoying redundant
+# eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement,
+# @v3_to_v1_violation,$mysql_errno);
+# could not be put into a file to be sourced because of the closed
+# Bug#10267 mysqltest, wrong number of loops when a script is sourced
+# within a loop
+# To be implemented later.
+
+USE test;
+--disable_warnings
+DROP TABLE IF EXISTS test.t1 ;
+DROP TABLE IF EXISTS test.t1_results ;
+DROP VIEW IF EXISTS test.v1;
+DROP VIEW IF EXISTS test.v2;
+DROP VIEW IF EXISTS test.v3;
+--enable_warnings
+CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20));
+CREATE TABLE t1_results (v3_to_v1_options VARCHAR(100), statement VARCHAR(10),
+ v3_to_v1_violation VARCHAR(20), errno CHAR(10));
+--disable_query_log
+SET @part1= '';
+SET @part2= 'WITH CHECK OPTION';
+SET @part3= 'WITH CASCADED CHECK OPTION';
+SET @part4= 'WITH LOCAL CHECK OPTION';
+--enable_query_log
+
+let $num1= 4;
+while ($num1)
+{
+ --disable_query_log
+ eval SET @v1_part= @part$num1;
+ let $aux= `SELECT CONCAT('CREATE VIEW v1 AS SELECT f1, f2
+ FROM t1 WHERE f1 BETWEEN 0 AND 10 ', @v1_part)` ;
+ --enable_query_log
+ eval $aux ;
+
+ let $num2= 4;
+ while ($num2)
+ {
+ --disable_query_log
+ eval SET @v2_part= @part$num2;
+ let $aux= `SELECT CONCAT('CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
+ FROM v1 WHERE f1 BETWEEN 6 AND 16 ', @v2_part)` ;
+ --enable_query_log
+ eval $aux ;
+
+ let $num3= 4;
+ while ($num3)
+ {
+ --disable_query_log
+ eval SET @v3_part= @part$num3;
+ let $aux= `SELECT CONCAT('CREATE VIEW v3 (my_col1,my_col2) AS SELECT *
+ FROM v2 WHERE col1 MOD 2 = 0 ', @v3_part)` ;
+ eval $aux ;
+ --vertical_results
+ SELECT CONCAT(IF(@v3_part = '',' <nothing> ',
+ @v3_part), ' - ',
+ IF(@v2_part = '',' <nothing> ',
+ @v2_part), ' - ',
+ IF(@v1_part = '',' <nothing> ',
+ @v1_part))
+ AS "option_variant"
+ UNION SELECT RPAD('', 80, '-');
+ SET @v3_to_v1_options = CONCAT(IF(@v3_part = '',' <nothing> ',
+ @v3_part), ' - ',
+ IF(@v2_part = '',' <nothing> ',
+ @v2_part), ' - ',
+ IF(@v1_part = '',' <nothing> ',
+ @v1_part));
+ --horizontal_results
+ --enable_query_log
+ # 1. Visibility of records of t1 via SELECT on the VIEWs
+ # Outside v1 (0 to 10)
+ INSERT INTO t1 VALUES(16, 'sixteen');
+ # Inside v1 (0 to 10), Outside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ INSERT INTO t1 VALUES(0, 'zero');
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Outside v3 ( value MOD 2 = 0 )
+ INSERT INTO t1 VALUES(7, 'seven');
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Inside v3 ( value MOD 2 = 0 )
+ INSERT INTO t1 VALUES(8, 'eight');
+ SELECT * FROM v1;
+ SELECT * FROM v2;
+ SELECT * FROM v3;
+ SELECT * FROM t1;
+ DELETE FROM t1;
+ # 2. DELETEs within v3
+ # Outside v1 (0 to 10)
+ INSERT INTO t1 VALUES(16, 'sixteen');
+ # Inside v1 (0 to 10), Outside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ INSERT INTO t1 VALUES(0, 'zero');
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Outside v3 ( value MOD 2 = 0 )
+ INSERT INTO t1 VALUES(7, 'seven');
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Inside v3 ( value MOD 2 = 0 )
+ INSERT INTO t1 VALUES(8, 'eight');
+ --enable_info
+ # Outside v1 (0 to 10)
+ DELETE FROM v3 WHERE my_col1 = 16;
+ # Inside v1 (0 to 10), Outside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ DELETE FROM v3 WHERE my_col1 = 0;
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Outside v3 ( value MOD 2 = 0 )
+ DELETE FROM v3 WHERE my_col1 = 7;
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Inside v3 ( value MOD 2 = 0 )
+ DELETE FROM v3 WHERE my_col1 = 8;
+ --disable_info
+ SELECT * FROM t1;
+ DELETE FROM t1;
+ # 3. UPDATEs within v3 (modify my_col2, which is not part of any
+ # WHERE qualification)
+ # The behaviour should be similar to 3. DELETE.
+ # Outside v1 (0 to 10)
+ INSERT INTO t1 VALUES(16, 'sixteen');
+ # Inside v1 (0 to 10), Outside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ INSERT INTO t1 VALUES(0, 'zero');
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Outside v3 ( value MOD 2 = 0 )
+ INSERT INTO t1 VALUES(7, 'seven');
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Inside v3 ( value MOD 2 = 0 )
+ INSERT INTO t1 VALUES(8, 'eight');
+ --enable_info
+ # Outside v1 (0 to 10)
+ UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
+ # Inside v1 (0 to 10), Outside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Outside v3 ( value MOD 2 = 0 )
+ UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Inside v3 ( value MOD 2 = 0 )
+ UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
+ --disable_info
+ SELECT * FROM t1;
+ DELETE FROM t1;
+ # 4. UPDATEs within v3 (modify my_col1 to values inside and outside
+ # of the WHERE qualifications)
+ --disable_query_log
+ SET @statement = 'UPDATE';
+ --enable_query_log
+ INSERT INTO t1 VALUES(8, 'eight');
+ # Alter to value outside of v3
+ --disable_query_log
+ SET @v3_to_v1_violation = 'v3_ _ ';
+ --enable_query_log
+ --enable_info
+ UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
+ --disable_info
+ --disable_query_log
+ eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement,
+ @v3_to_v1_violation,$mysql_errno);
+ --enable_query_log
+ SELECT * FROM t1;
+ DELETE FROM t1;
+ INSERT INTO t1 VALUES(8, 'eight');
+ # Alter to value outside of v2
+ --disable_query_log
+ SET @v3_to_v1_violation = ' _v2_ ';
+ --enable_query_log
+ --enable_info
+ UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
+ --disable_info
+ --disable_query_log
+ eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement,
+ @v3_to_v1_violation,$mysql_errno);
+ --enable_query_log
+ SELECT * FROM t1;
+ DELETE FROM t1;
+ INSERT INTO t1 VALUES(8, 'eight');
+ # Alter to value outside of v1
+ --disable_query_log
+ SET @v3_to_v1_violation = ' _ _v1';
+ --enable_query_log
+ --enable_info
+ UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
+ --disable_info
+ --disable_query_log
+ eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement,
+ @v3_to_v1_violation,$mysql_errno);
+ --enable_query_log
+ SELECT * FROM t1;
+ DELETE FROM t1;
+ INSERT INTO t1 VALUES(8, 'eight');
+ # Alter to value inside of v1
+ --disable_query_log
+ SET @v3_to_v1_violation = ' _ _ ';
+ --enable_query_log
+ --enable_info
+ UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
+ --disable_info
+ --disable_query_log
+ eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement,
+ @v3_to_v1_violation,$mysql_errno);
+ --enable_query_log
+ SELECT * FROM t1;
+ DELETE FROM t1;
+ # 5. INSERTs into v3
+ --disable_query_log
+ SET @statement = 'INSERT';
+ --enable_query_log
+ # Outside v1 (0 to 10)
+ --disable_query_log
+ SET @v3_to_v1_violation = ' _ _v1';
+ --enable_query_log
+ --enable_info
+ INSERT INTO v3 VALUES(16, 'sixteen');
+ --disable_info
+ --disable_query_log
+ eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement,
+ @v3_to_v1_violation,$mysql_errno);
+ --enable_query_log
+ # Inside v1 (0 to 10), Outside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ --disable_query_log
+ SET @v3_to_v1_violation = ' _v2_ ';
+ --enable_query_log
+ --enable_info
+ INSERT INTO v3 VALUES(0, 'zero');
+ --disable_info
+ --disable_query_log
+ eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement,
+ @v3_to_v1_violation,$mysql_errno);
+ --enable_query_log
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Outside v3 ( value MOD 2 = 0 )
+ --disable_query_log
+ SET @v3_to_v1_violation = 'v3_ _ ';
+ --enable_query_log
+ --enable_info
+ INSERT INTO v3 VALUES(7, 'seven');
+ --disable_info
+ # Inside v1 (0 to 10), Inside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
+ # Inside v3 ( value MOD 2 = 0 )
+ --disable_query_log
+ SET @v3_to_v1_violation = ' _ _ ';
+ --enable_query_log
+ --enable_info
+ INSERT INTO v3 VALUES(8, 'eight');
+ --disable_info
+ --disable_query_log
+ eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement,
+ @v3_to_v1_violation,$mysql_errno);
+ --enable_query_log
+ SELECT * FROM t1;
+ DELETE FROM t1;
+
+ DROP VIEW v3;
+ dec $num3;
+ }
+
+ DROP VIEW v2;
+ dec $num2;
+ }
+
+ DROP VIEW v1;
+ dec $num1;
+}
+
+SELECT * FROM t1_results ORDER BY v3_to_v1_options;
+
+let $message=
+Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above).
+All following SELECTs must give ROW NOT FOUND ;
+--source include/show_msg80.inc
+
+# Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above):
+# 1. There must be NO denied INSERT/UPDATE, when no WHERE qualification
+# is violated. Expect ROW NOT FUND
+SELECT * FROM t1_results
+WHERE v3_to_v1_violation = ' _ _ ' AND errno <> 0
+ORDER BY v3_to_v1_options;
+# 2. There must be NO denied INSERT/UPDATE, when the toplevel VIEW v3 is
+# defined without any CHECK OPTION. Expect ROW NOT FUND
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE ' %' AND errno <> 0
+ORDER BY v3_to_v1_options;
+# 3. There must be NO successful INSERT/UPDATE, when the toplevel VIEW v3 is
+# defined with any CHECK OPTION and the WHERE qualification of this VIEW is
+# violated. Expect ROW NOT FUND
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE 'WITH %'
+ AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
+ORDER BY v3_to_v1_options;
+# 4. There must be NO successful INSERT/UPDATE, when the toplevel VIEW v3 is
+# defined with any CHECK OPTION and the CHECK OPTION does not contain LOCAL
+# and the WHERE qualification of any VIEW is violated. Expect ROW NOT FUND
+SELECT * FROM t1_results
+WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %'
+ AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0
+ORDER BY v3_to_v1_options;
+# 5. There must be NO failing INSERT/UPDATE getting a
+# sql_errno <> 1369 (ER_VIEW_CHECK_FAILED).
+SELECT * FROM t1_results
+WHERE errno <> 0 AND errno <> 1369
+ORDER BY v3_to_v1_options;
+let $message= End of plausibility checks;
+--source include/show_msg80.inc
+
+DROP TABLE t1_results;
+
+
+let $message= Testcase 3.3.1.50 - 3.3.1.53;
+--source include/show_msg80.inc
+--disable_warnings
+DROP VIEW IF EXISTS test.v1;
+--enable_warnings
+###############################################################################
+# Testcase 3.3.1.50: Ensure that a view that is a subset of every column and
+# every row of a single underlying table, contains the
+# correct row-and-column data; such a view has a definition
+# that is semantically equivalent to CREATE VIEW <view name>
+# AS SELECT * FROM <table name>.
+###############################################################################
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2;
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM test.v1 order by f59,f60,f61 ;
+--horizontal_results
+--enable_ps_protocol
+drop view test.v1 ;
+###############################################################################
+# Testcase 3.3.1.51: Ensure that a view that is a subset of only some columns
+# and every row of a single underlying table, contains the
+# correct row-and-column data; such a view has a definition
+# that is semantically equivalent to CREATE VIEW <view name>
+# AS SELECT col1, col3 FROM <table name>.
+###############################################################################
+CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2;
+SELECT * FROM test.v1 order by F59, F61 limit 50;
+drop view test.v1 ;
+###############################################################################
+# Testcase 3.3.1.52: Ensure that a view that is a subset of every column and
+# some rows of a single underlying table, contains the
+# correct row-and-column data; such a view has a definition
+# that is semantically equivalent to CREATE VIEW <view name>
+# AS SELECT * FROM <table name> WHERE ....
+###############################################################################
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61;
+if ($have_bug_11589)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM test.v1 order by f59,f60,f61 ;
+--horizontal_results
+--enable_ps_protocol
+drop view test.v1 ;
+###############################################################################
+# Testcase 3.3.1.53: Ensure that a view that is a subset of only some columns
+# and some rows of a single underlying table, contains
+# the correct row-and-column data; such a view has a
+# definition that is semantically equivalent to CREATE VIEW
+# <view name> AS SELECT col1, col3 FROM <table name> WHERE ..
+###############################################################################
+CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f61 desc limit 20;
+drop view test.v1 ;
+
+
+let $message= Testcase 3.3.1.54 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.54: Ensure that a view that is a subset of some or all columns
+# and/or column expressions and some or all rows of a single
+# underlying table contains the correct row-and-column data.
+###############################################################################
+USE test;
+--disable_warnings
+drop table if exists test.t1 ;
+drop table if exists test.t2 ;
+drop view if exists test.v1 ;
+--enable_warnings
+Create table t1 (f59 int, f60 int) ;
+Create table t2 (f59 int, f60 int) ;
+
+Insert into t1 values (1,10) ;
+Insert into t1 values (2,20) ;
+Insert into t1 values (47,80) ;
+Insert into t2 values (1,1000) ;
+Insert into t2 values (2,2000) ;
+Insert into t2 values (31,97) ;
+Create view test.v1 as select t1.f59, t1.f60
+from t1,t2 where t1.f59=t2.f59 ;
+Select * from test.v1 order by f59 limit 50 ;
+
+drop table test.t1 ;
+drop table test.t2 ;
+drop view test.v1 ;
+
+
+# FIXME(mleich): Implement an automatic check for 3.3.1.50 - 3.3.1.54
+# CREATE VIEW ... AS <SELECT ... FROM tb2 ...>
+# CREATE TEMPORARY TABLE ... AS <SELECT ... FROM tb2 ...>
+# Comparison of the VIEW with the temporary table
+
+let $message= Testcase 3.3.1.50 - 3.3.1.54 additional implementation;
+--source include/show_msg80.inc
+--disable_warnings
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+--enable_warnings
+#
+#
+# Testplan
+# ------------------------
+#
+# Testcase | all columns | all rows | column expressions
+# ---------------------------------------------------
+# 3.3.1.50 | yes | yes | no
+# 3.3.1.51 | no | yes | no
+# 3.3.1.52 | yes | no | no
+# 3.3.1.53 | no | no | no
+# 3.3.1.54 | no | no | yes
+CREATE TABLE t1 ( f1 BIGINT, f2 char(10), f3 DECIMAL(10,5) );
+INSERT INTO t1 VALUES(1, 'one', 1.1);
+INSERT INTO t1 VALUES(2, 'two', 2.2);
+INSERT INTO t1 VALUES(3, 'three', 3.3);
+# 3.3.1.50
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1;
+# 3.3.1.51
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1;
+SELECT * FROM v1;
+# 3.3.1.52
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE f3 = 2.2;
+SELECT * FROM v1;
+# 3.3.1.53
+CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1 WHERE f3 = 2.2;
+SELECT * FROM v1;
+# 3.3.1.54
+--vertical_results
+SET sql_mode = 'traditional,ansi';
+# due to bug#32496 "no trailing blanks in identifier".
+CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
+ 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
+ '->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
+FROM t1 WHERE f1 = 2;
+# This error is not conformant with ansi (see bug#32496). hhunger
+--error ER_WRONG_COLUMN_NAME
+CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
+ 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
+ '->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
+FROM t1 WHERE f1 = 2;
+SELECT * FROM v1;
+SET sql_mode = '';
+--horizontal_results
+
+
+let $message= Testcases 3.3.1.55 - 3.3.1.62 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase: Ensure that a view that is a subset of some or all columns and
+# some or all rows of multiple tables joined with an
+# 3.3.1.55 INNER JOIN
+# 3.3.1.56 CROSS JOIN
+# 3.3.1.57 STRAIGHT JOIN
+# 3.3.1.58 NATURAL JOIN
+# 3.3.1.59 LEFT OUTER JOIN
+# 3.3.1.60 NATURAL LEFT OUTER JOIN
+# 3.3.1.61 RIGHT OUTER
+# 3.3.1.62 NATURAL RIGHT OUTER
+# condition contains the correct row-and-column data.
+###############################################################################
+--disable_warnings
+Drop table if exists t1, t2 ;
+Drop view if exists v1 ;
+--enable_warnings
+Create table t1 (f59 int, f60 char(10), f61 int, a char(1)) ;
+Insert into t1 values (1, 'single', 3, '1') ;
+Insert into t1 values (2, 'double', 6, '2') ;
+Insert into t1 values (3, 'single-f3', 4, '3') ;
+
+Create table t2 (f59 int, f60 char(10), f61 int, b char(1)) ;
+Insert into t2 values (2, 'double', 6, '2') ;
+Insert into t2 values (3, 'single-f3', 6, '3') ;
+Insert into t2 values (4, 'single', 4, '4') ;
+
+# Testcase 3.3.1.55 ;
+create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+ t1.f61 t1_f61, t2.f61 t2_f61
+from t1 inner join t2 where t1.f59 = t2.f59 ;
+select * from test.v1 order by t1_f59 ;
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+ t1.f61 t1_f61, t2.f61 t2_f61
+from t1 inner join t2 where t1.f59 = t2.f59;
+
+# Testcase 3.3.1.56 ;
+Create or replace view test.v1 as
+Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2 cross join t1;
+Select * from v1 order by t1_f59,t2_f59;
+Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2 cross join t1;
+
+# Testcase 3.3.1.57 ;
+Create or replace view test.v1 as
+Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2,t1;
+Select * from v1 order by t1_f59,t2_f59;
+Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
+FROM t2,t1;
+
+# Testcase 3.3.1.58 ;
+Create or replace view test.v1 as
+Select f59, f60, f61, a, b
+FROM t2 natural join t1;
+Select * from v1 order by f59;
+Select f59, f60, f61, a, b
+FROM t2 natural join t1;
+
+# Testcase 3.3.1.59 ;
+Create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+ t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 left outer join t1 on t2.f59=t1.f59;
+Select * from v1 order by t1_f59;
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+ t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 left outer join t1 on t2.f59=t1.f59;
+
+# Testcase 3.3.1.60 ;
+Create or replace view test.v1 as
+Select f59, f60, f61, t1.a, t2.b
+FROM t2 natural left outer join t1;
+Select * from v1 order by f59;
+Select f59, f60, f61, t1.a, t2.b
+FROM t2 natural left outer join t1;
+
+# Testcase 3.3.1.61 ;
+
+set @save_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='outer_join_with_cache=off';
+
+Create or replace view test.v1 as
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+ t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 right outer join t1 on t2.f59=t1.f59;
+Select * from v1 order by t1_f59;
+Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
+ t1.f61 t1_f61, t2.f61 t2_f61
+FROM t2 right outer join t1 on t2.f59=t1.f59;
+
+# Testcase 3.3.1.62 ;
+Create or replace view test.v1 as
+Select f59, f60, a, b
+FROM t2 natural right outer join t1;
+Select * from v1 order by f59 desc;
+Select f59, f60, a, b
+FROM t2 natural right outer join t1;
+
+set optimizer_switch=@save_optimizer_switch;
+
+drop table t1, t2;
+drop view v1 ;
+
+Use test;
+
+
+let $message= Testcase 3.3.1.A1 - 3.3.1.A3 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase: Ensure that a view that is a subset of some or all columns and/or
+# column expressions and some or all rows of multiple tables joined
+# with the combination of
+# 3.3.1.A1 LEFT JOIN
+# 3.3.1.A2 INNER JOIN
+# 3.3.1.A3 CROSS JOIN
+# condition contains the correct row-and-column data
+###############################################################################
+# Testcase 3.3.1.A1 ;
+--disable_warnings
+Drop table if exists t1 ;
+Drop view if exists v1;
+--enable_warnings
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (101,201,301) ;
+Insert into t1 values (107,501,601) ;
+Insert into t1 values (901,801,401) ;
+
+Create or replace view test.v1 as
+Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+Drop view if exists test.v1 ;
+
+# Testcase 3.3.1.A2 ;
+--disable_warnings
+Drop table if exists t1 ;
+Drop view if exists v1;
+--enable_warnings
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (201,201,201) ;
+Insert into t1 values (207,201,201) ;
+Insert into t1 values (201,201,201) ;
+
+Create or replace view test.v1
+as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+Drop view if exists test.v1 ;
+
+# Testcase 3.3.1.A3 ;
+--disable_warnings
+Drop table if exists t1 ;
+Drop view if exists v1;
+--enable_warnings
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (21,21,21) ;
+Insert into t1 values (27,21,21) ;
+Insert into t1 values (21,21,21) ;
+
+Create or replace view test.v1
+as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ;
+Select * from test.v1 order by f59 limit 0,10;
+
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.1.63 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.63: Ensure that a view that is a subset of some or all columns
+# and/or column expressions and some or all rows of multiple
+# tables joined with every possible combination of JOIN
+# conditions, UNION, UNION ALL and UNION DISTINCT, nested at
+# multiple levels, contains the correct row-and-column data.
+###############################################################################
+--disable_warnings
+Drop table if exists t1 ;
+Drop view if exists test.v1 ;
+--enable_warnings
+
+Create table t1 (f59 int, f60 int, f61 int) ;
+Insert into t1 values (11,21,31) ;
+Insert into t1 values (17,51,61) ;
+Insert into t1 values (91,81,41) ;
+
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union ALL (Select f59 from t1 where f59=17 );
+Select * from test.v1 order by f59 limit 0,10;
+
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union (Select f59 from t1 where f59=17 );
+Select * from test.v1 order by f59 limit 0,10;
+
+Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
+Union Distinct (Select f59 from t1 where f60=17 );
+Select * from test.v1 order by f59 limit 0,10;
+
+Drop view test.v1 ;
+
+--disable_warnings
+drop table if exists t1;
+drop view if exists test.v1;
+--enable_warnings
+create table t1 (f59 int, f60 int, f61 int);
+
+insert into t1 values (101,201,301);
+insert into t1 values (107,501,601);
+insert into t1 values (901,801,401);
+
+create or replace view test.v1 as
+select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59;
+select * from test.v1 order by f59 limit 0,10;
+
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union all
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+
+create or replace view test.v1 as
+(select f59 from tb2 where f59=107 )
+union distinct
+(select f59 from t1 where f59=107 );
+select * from test.v1 order by f59 limit 0,10;
+
+drop view if exists test.v1 ;
+drop table t1;
+
+
+let $message= Testcase 3.3.1.64 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.64: Ensure that all changes to a view definition, executed by
+# the ALTER VIEW statement, are correctly recorded and have
+# the correct effect on the data shown by the view.
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+CREATE VIEW test.v1 AS SELECT F59
+FROM test.tb2 where test.tb2.F59 = 109;
+
+SELECT * FROM test.v1 order by f59 limit 0,10;
+
+ALTER VIEW test.v1 AS SELECT *
+FROM test.tb2 WHERE test.tb2.f59 = 242 ;
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM test.v1 order by f59 limit 0,10;
+--horizontal_results
+--enable_ps_protocol
+
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.65: Ensure that the DROP VIEW statement cleanly drops its
+# target view.
+# Testcase 3.3.1.A4: Ensure that the DROP VIEW IF EXISTS statement cleanly
+# drops its target view.
+# Testcase 3.3.1.66: Ensure that DROP VIEW <view name> fails, with an appro-
+# priate error message, if the view named does not exist.
+# Testcase 3.3.1.67: Ensure that DROP VIEW IF EXISTS <view name> does not fail,
+# but merely returns an appropriate warning, if the view
+# named does not exist.
+###############################################################################
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS test.v1 ;
+--enable_warnings
+eval CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = $engine_type ;
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+
+# DROP VIEW
+DROP VIEW v1;
+--error ER_UNKNOWN_VIEW
+DROP VIEW v1;
+
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+# DROP VIEW IF EXISTS
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v1;
+
+
+let $message= Testcase 3.3.1.68 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.1.68: Ensure that DROP VIEW <view name>, DROP VIEW <view name>
+# RESTRICT, and DROP VIEW <view name> CASCADE all take
+# exactly the same action, until such time as the RESTRICT
+# and CASCADE keyword actions are implemented by MySQL.
+###############################################################################
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1_base ;
+DROP VIEW IF EXISTS v1_top ;
+--enable_warnings
+CREATE TABLE t1 ( f1 DOUBLE);
+
+--disable_query_log
+SET @part1= '';
+SET @part2= 'RESTRICT';
+SET @part3= 'CASCADE';
+--enable_query_log
+
+let $num1= 3;
+while ($num1)
+{
+
+ CREATE VIEW v1_base AS SELECT * FROM t1;
+ CREATE VIEW v1_top AS SELECT * FROM v1_base;
+ --disable_query_log
+ let $aux1= `SELECT CONCAT('DROP VIEW v1_top ', @v1_part)` ;
+ let $aux2= `SELECT CONCAT('DROP VIEW v1_base ', @v1_part)` ;
+ eval SET @v1_part= @part$num1;
+ --enable_query_log
+
+ # 1. more non important sub testcase, where the view (v1_top) is not the base of
+ # another object
+ # DROP VIEW v1_top < |RESTRICD|CASCADE> must be successful.
+ eval $aux1 ;
+ # Check, that v1_top really no more exists + cleanup for the second sub test
+ --error ER_UNKNOWN_VIEW
+ DROP VIEW v1_top;
+
+ CREATE VIEW v1_top AS SELECT * FROM v1_base;
+ # 2. more important sub testcase, where the view (v1_base) is the base of
+ # another object (v1_top)
+ # DROP VIEW v1_base < |RESTRICT|CASCADE>
+ # If the RESTRICT and CASCADE keyword actions are implemented by MySQL,
+ # CASCADE will remove v1_base and the dependend view v1_top and
+ # RESTRICT will fail, because there exists the dependend view v1_top
+ eval $aux2 ;
+ # Check, if v1_base and v1_top exist + cleanup for next loop
+ DROP VIEW v1_base;
+ DROP VIEW v1_top;
+
+ dec $num1;
+}
+
+
+let $message= Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcases : Ensure that, when a view is dropped, its definition no longer
+# appears when a
+# 3.3.1.69 SHOW CREATE VIEW, SHOW CREATE TABLE, SHOW TABLE STATUS,
+# SHOW TABLE
+# 3.3.1.70 CHECK TABLE statement is executed
+# 3.3.1.A5 SHOW COLUMNS, SHOW FIELDS, DESCRIBE, EXPLAIN
+# statement is executed
+###############################################################################
+# Note(mleich): There will be no non failing sub testcases with SHOW here.
+# They will be done in 3.3.11 ff.
+--disable_warnings
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+--enable_warnings
+eval CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ENGINE = $engine_type;
+CREATE VIEW v1 AS SELECT * FROM t1;
+DROP VIEW v1 ;
+
+# The negative tests:
+# SELECT
+--error ER_NO_SUCH_TABLE
+SELECT * FROM v1 ;
+#
+--error ER_NO_SUCH_TABLE
+SHOW CREATE VIEW v1 ;
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE v1 ;
+# Attention: Like is a filter. So we will get an empty result set here.
+SHOW TABLE STATUS like 'v1' ;
+SHOW TABLES LIKE 'v1';
+--error ER_NO_SUCH_TABLE
+SHOW COLUMNS FROM v1;
+--error ER_NO_SUCH_TABLE
+SHOW FIELDS FROM v1;
+CHECK TABLE v1;
+--error ER_NO_SUCH_TABLE
+DESCRIBE v1;
+--error ER_NO_SUCH_TABLE
+EXPLAIN SELECT * FROM v1;
+
+Use test;
+
+let $message= Testcase 3.3.1.A6 ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcases 3.3.1.A6 : Ensure that nested views up to level @max_level work.
+###############################################################################
+# 1. Simple nested VIEWs
+# Configurable parameter @max_level = nesting level
+# 128 must be good enough, it is already a pathologic value.
+# We currently set it to 32, because of performance issues.
+--disable_query_log
+SET @max_level= 32;
+--enable_query_log
+--disable_warnings
+DROP DATABASE IF EXISTS test3;
+--enable_warnings
+CREATE DATABASE test3;
+eval CREATE TABLE test3.t1 (f1 DECIMAL(5,3)) ENGINE = $engine_type;
+INSERT INTO test3.t1 SET f1 = 1.0;
+CREATE VIEW test3.v0 AS SELECT * FROM test3.t1;
+
+let $level= 1;
+let $run= 1;
+while ($run)
+{
+ --disable_query_log
+ eval SET @aux = $level - 1;
+ --enable_query_log
+ let $sublevel= `SELECT @aux`;
+
+ eval CREATE VIEW test3.v$level AS SELECT * FROM test3.v$sublevel;
+
+ # DEBUG Please set $debug to 1, if the statements on the toplevel VIEW
+ # (direct after the while loop) show suspicious results.
+ let $debug= 0;
+ if ($debug)
+ {
+ eval SHOW CREATE VIEW test3.v$level;
+ eval SELECT * FROM test3.v$level;
+ eval EXPLAIN SELECT * FROM test3.v$level;
+ }
+
+ --disable_query_log
+ eval SET @aux = @max_level > $level;
+ --enable_query_log
+ inc $level;
+ # DEBUG
+ # eval SELECT @aux AS "@aux", $level AS "next level";
+
+ let $run= `SELECT @aux`;
+}
+#--------------------------------------------------------------------------
+# Attention: If the following statements get suspicious/unexpected results
+# and you assume that something with the non toplevel VIEWs might
+# be wrong, please edit the while loop above and set $debug to 1.
+#--------------------------------------------------------------------------
+# 1.1 Check of top level VIEW
+--disable_ps2_protocol
+let $toplevel= `SELECT @max_level`;
+eval SHOW CREATE VIEW test3.v$toplevel;
+eval SELECT * FROM test3.v$toplevel;
+eval EXPLAIN SELECT * FROM test3.v$toplevel;
+
+# 1.2 Check the top level view when a base VIEW is dropped
+DROP VIEW test3.v0;
+eval SHOW CREATE VIEW test3.v$toplevel;
+--error ER_VIEW_INVALID
+eval SELECT * FROM test3.v$toplevel;
+--error ER_VIEW_INVALID
+eval EXPLAIN SELECT * FROM test3.v$toplevel;
+--enable_ps2_protocol
+
+# 2. Complicated nested VIEWs
+# parameter @max_level = nesting level
+# There is a limit(@join_limit = 61) for the number of tables which
+# could be joined. This limit will be reached, when we set
+# @max_level = @join_limit - 1 .
+--disable_query_log
+#++++++++++++++++++++++++++++++++++++++++++++++
+# OBN - Reduced the value of join limit to 30
+# Above seems to hang - FIXME
+# mleich - Reason unclear why it hangs for OBN on innodb and memory.
+# Hypothesis: Maybe the consumption of virtual memory is high
+# and OBN's box performs excessive paging.
+# (RAM: OBN ~384MB RAM, mleich 1 GB)
+#++++++++++++++++++++++++++++++++++++++++++++++
+let $message= FIXME - Setting join_limit to 28 - hangs for higher values;
+--source include/show_msg.inc
+#SET @join_limit = 61;
+SET @join_limit = 28; # OBN - see above
+SET @max_level = @join_limit - 1;
+--enable_query_log
+
+--disable_warnings
+DROP DATABASE IF EXISTS test3;
+DROP TABLE IF EXISTS test1.t1;
+DROP TABLE IF EXISTS test2.t1;
+let $level= `SELECT @max_level + 1`;
+while ($level)
+{
+ dec $level;
+
+ eval DROP VIEW IF EXISTS test1.v$level;
+}
+--enable_warnings
+CREATE DATABASE test3;
+
+# Testplan for the content of the tables:
+# ---------------------------------------------------------
+# Records test1.t1 test2.t1 test3.t1
+# NULL, 'numeric column is NULL' yes yes yes
+# 0 , NULL yes yes yes
+# 5 , 'five' yes yes yes
+# 1 , 'one' yes yes no
+# 2 , 'two' yes no yes
+# 3 , 'three' no yes yes
+
+USE test1;
+eval CREATE TABLE t1 (f1 BIGINT, f2 CHAR(50)) ENGINE = $engine_type ;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (0, NULL);
+INSERT INTO t1 VALUES (5, 'five');
+
+INSERT INTO t1 VALUES (1, 'one');
+INSERT INTO t1 VALUES (2, 'two');
+
+USE test2;
+eval CREATE TABLE t1 (f1 DECIMAL(64,30), f2 VARCHAR(50)) ENGINE = $engine_type;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (0.000000000000000000000000000000, NULL);
+INSERT INTO t1 VALUES (5.000000000000000000000000000000, 'five');
+
+INSERT INTO t1 VALUES (+1.000000000000000000000000000000, 'one');
+INSERT INTO t1 VALUES (3.000000000000000, 'three');
+
+USE test3;
+eval CREATE TABLE t1 (f1 DOUBLE, f2 VARBINARY(50)) ENGINE = $engine_type;
+INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
+INSERT INTO t1 VALUES (+0.0E-35, NULL);
+INSERT INTO t1 VALUES (+0.5E+1, 'five');
+
+INSERT INTO t1 VALUES (20.0E-1, 'two');
+INSERT INTO t1 VALUES (0.0300E2, 'three');
+
+USE test;
+
+CREATE OR REPLACE VIEW test1.v0 AS SELECT * FROM test2.t1;
+
+--disable_query_log
+SET @max_level = IFNULL(@limit1,@max_level);
+--enable_query_log
+let $level= 1;
+let $run= 1;
+while ($run)
+{
+ --disable_query_log
+ eval SET @aux = $level - 1;
+ let $sublevel= `SELECT @aux`;
+ eval SET @AUX = $level MOD 3 + 1;
+ let $dbnum= `SELECT @AUX`;
+ --enable_query_log
+
+ eval CREATE OR REPLACE VIEW test1.v$level AS SELECT f1, f2
+ FROM test$dbnum.t1 tab1 NATURAL JOIN test1.v$sublevel tab2;
+
+ # DEBUG Please set $debug to 1, if the statements on the toplevel VIEW
+ # (direct after the while loop) show suspicious results.
+ let $debug= 0;
+ if ($debug)
+ {
+ eval SHOW CREATE VIEW test1.v$level;
+ eval SELECT * FROM test1.v$level;
+ eval SELECT f1, f2
+ FROM test$dbnum.t1 tab1 NATURAL JOIN test1.v$sublevel tab2;
+ eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$level;
+ eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$level;
+ }
+
+ --disable_query_log
+ eval SET @aux = @max_level > $level;
+ --enable_query_log
+ inc $level;
+ # DEBUG
+ # eval SELECT @aux AS "@aux", $level AS "next level";
+
+ let $run= `SELECT @aux`;
+}
+
+#--------------------------------------------------------------------------
+# Atention: If the following statements get suspicious/unexpected results
+# and you assume that something with the non toplevel VIEWs might
+# be wrong, please edit the while loop above and set $debug to 1.
+#--------------------------------------------------------------------------
+# 2.1 Check of top level VIEW
+let $toplevel= `SELECT @max_level`;
+# Show should be easy
+eval SHOW CREATE VIEW test1.v$toplevel;
+# SELECT is much more complicated
+--disable_ps2_protocol
+eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+--enable_ps2_protocol
+let $message= The output of following EXPLAIN is deactivated, because the result
+ differs on some platforms
+ FIXME Is this a bug ? ;
+--source include/show_msg80.inc
+if (1)
+{
+--disable_result_log
+}
+# EXPLAIN might be the hell
+eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+if (1)
+{
+--enable_result_log
+}
+
+# 2.2 Check of top level VIEW when join limit is exceeded
+# Exceed the limit for the number of tables which could be joined.
+let $level= `SELECT @max_level + 1`;
+let $sublevel= `SELECT @max_level`;
+eval CREATE VIEW test1.v$level AS SELECT f1, f2
+ FROM test3.t1 tab1 NATURAL JOIN test1.v$sublevel tab2;
+eval SHOW CREATE VIEW test1.v$level;
+# the following line as written as '--eror ER_TOO_MANY_TABLES' and the command
+# is successful so assuming no expected error was intended
+# --error ER_TOO_MANY_TABLES
+eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$level;
+let $message= The output of following EXPLAIN is deactivated, because the result
+ differs on some platforms
+ FIXME Is this a bug ? ;
+--source include/show_msg80.inc
+if (1)
+{
+--disable_result_log
+}
+# the following line as written as '--eror ER_TOO_MANY_TABLES' and the command
+# is successful so assuming no expected error was intended
+# --error ER_TOO_MANY_TABLES
+eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$level;
+if (1)
+{
+--enable_result_log
+}
+eval DROP VIEW IF EXISTS test1.v$level;
+
+# 2.3 Create a logical wrong (data type "garbage") base for the upper views
+# and check the behaviour of the top level view.
+# 2.3.1 Exchange numeric and string column
+--disable_result_log
+CREATE OR REPLACE VIEW test1.v0 AS
+SELECT f1 as f2, f2 as f1 FROM test2.t1;
+# 2.3.2 DATE instead of numeric
+CREATE OR REPLACE VIEW test2.v0 AS
+SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
+eval SHOW CREATE VIEW test1.v$toplevel;
+eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+# 2.3.3 UCS2 string instead of common string
+CREATE OR REPLACE VIEW test3.v0 AS
+SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1;
+eval SHOW CREATE VIEW test1.v$toplevel;
+eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+
+# 2.3.4 UCS2 string instead of numeric
+CREATE OR REPLACE VIEW test3.v0 AS
+SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1;
+eval SHOW CREATE VIEW test1.v$toplevel;
+eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
+ CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+--enable_result_log
+
+# Cleanup
+let $level= `SELECT @max_level + 1`;
+while ($level)
+{
+ dec $level;
+
+eval DROP VIEW IF EXISTS test1.v$level;
+
+}
+DROP DATABASE test3;
+DROP TABLE test1.t1;
+DROP TABLE test2.t1;
+
+#==============================================================================
+# 3.3.2 Updatable and Insertable-into views:
+#==============================================================================
+Use test;
+
+let $message= Testcase 3.3.2.1;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.2.1: Ensure that every view which may theoretically accept new
+# rows via the INSERT statement does, in fact, do so.
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+
+Create View test.v1 AS SELECT f59,f60 FROM tb2 where f59 = 1995 ;
+--enable_info
+INSERT INTO test.v1 (f59,f60) values (879,700) ;
+--disable_info
+SELECT f59,f60 FROM test.v1 where f59 = 879 and f60 = 700 ;
+DELETE FROM tb2 where f59 = 879 and f60 = 700 ;
+
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.2.2;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.2.2: Ensure that, for every row inserted into a view,
+# the correct new data also appears in every relevant
+# underlying table.
+###############################################################################
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+
+Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+--enable_info
+INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ;
+--disable_info
+
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ;
+--horizontal_results
+--enable_ps_protocol
+SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ;
+DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ;
+
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.2.3;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.2.3: Ensure that every view which may theoretically accept data
+# changes via the UPDATE statement does, in fact, do so.
+###############################################################################
+Insert into tb2 (f59,f60,f61) values (780,105,106) ;
+
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+--enable_info
+UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105;
+--disable_info
+
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM tb2 where f59 = 8 and f60 = 105;
+--horizontal_results
+--enable_ps_protocol
+SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ;
+
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.2.4;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.2.4: Ensure that, for data values updated within a view, the
+# correct new data also appears in every relevant
+# underlying table.
+###############################################################################
+Insert into tb2 (f59,f60,f61) values (781,105,106) ;
+
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
+--enable_info
+UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ;
+--disable_info
+
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM tb2 where f59 = 891 and f60 = 105;
+--horizontal_results
+--enable_ps_protocol
+SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ;
+
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.2.5;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.2.5: Ensure that every view which may theoretically accept data
+# deletions via the DELETE statement does, in fact, do so.
+###############################################################################
+Insert into tb2 (f59,f60,f61) values (789,105,106) ;
+
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ;
+--enable_info
+DELETE FROM test.v1 where f59 = 789 ;
+--disable_info
+SELECT * FROM tb2 where f59 = 789 ;
+SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ;
+
+Drop view test.v1 ;
+
+
+let $message= Testcase 3.3.2.6;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.2.6: Ensure that, for data rows deleted from a view, the correct
+# rows have also been deleted from every relevant
+# underlying table.
+###############################################################################
+Insert into tb2 (f59,f60,f61) values (711,105,106) ;
+
+--disable_warnings
+Drop view if exists test.v1 ;
+--enable_warnings
+CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 711 ;
+--enable_info
+DELETE FROM test.v1 where f59 = 711 ;
+--disable_info
+
+SELECT * FROM tb2 where f59 = 711 ;
+SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ;
+
+Drop view test.v1 ;
+
+let $message= Testcase 3.3.2.1 - 3.3.2.6 alternative implementation;
+--source include/show_msg80.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+
+CREATE TABLE t1 ( f1 BIGINT DEFAULT 0, f2 CHAR(20), f3 NUMERIC(7,4),
+ f4 CHAR, PRIMARY KEY(f1));
+
+# VIEW including the base table PRIMARY KEY, but not all base table columns (f4)
+# no additional columns
+CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
+
+# Incomplete INSERT 1
+# - f2 missing
+# - PRIMARY KEY f1 included
+# f2 gets the default NULL
+INSERT INTO v1 SET f1 = 1;
+SELECT * from t1;
+DELETE FROM t1;
+
+# Incomplete INSERT 2
+# - f2 included
+# - PRIMARY KEY f1 missing
+# f1 gets the default 0, because we are in the native sql_mode
+INSERT INTO v1 SET f2 = 'ABC';
+# f1 gets the default 0, but this value is already exists
+# OBN change for 5.1.21 --error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
+INSERT INTO v1 SET f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+
+# Testplan for DELETE:
+#
+# Column within WHERE qualification
+# f1 (PK)
+# f2 (non PK)
+# none
+#
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE f1
+DELETE FROM v1 WHERE f1 = 1;
+SELECT * from t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE f2
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE none
+DELETE FROM v1;
+SELECT * from t1;
+
+# Testplan for UPDATE:
+# Column to modify Column within WHERE qualification
+# f1 (PK) f1(PK + same column to modify)
+# f1 (PK) f2
+# f1 (PK) none
+# f2 (non PK) f1(PK)
+# f2 (non PK) f2(non PK + same column to modify)
+# f2 (non PK) f3(non PK)
+# f2 (non PK) none
+# f1,f2 f1,f2
+#
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1 - f1
+UPDATE v1 SET f1 = 2 WHERE f1 = 1;
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1 - f2
+UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1 - none
+UPDATE v1 SET f1 = 2;
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - f1
+UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - f2
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - f3
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - none
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1,f2 - f1,f2
+UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+
+
+DROP VIEW v1;
+# VIEW without the PRIMARY KEY f1 of the base table
+# no additional columns
+CREATE VIEW v1 AS SELECT f2, f3 FROM t1;
+
+# INSERT
+# - PRIMARY KEY f1 missing in VIEW definition
+# f1 gets the default 0, because we are in the native sql_mode
+INSERT INTO v1 SET f2 = 'ABC';
+# f1 gets the default 0 and this value is already exists
+# OBN change for 5.1.21 --error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
+INSERT INTO v1 SET f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+
+# Testplan for DELETE:
+#
+# Column within WHERE qualification
+# f2 (non PK)
+# none
+#
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE f2
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE none
+DELETE FROM v1;
+SELECT * from t1;
+
+# Testplan for UPDATE:
+#
+# Column to modify Column within WHERE qualification
+# f2 (non PK) f2(non PK + same column to modify)
+# f2 (non PK) f3(non PK)
+# f2 (non PK) none
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - f2
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - f3
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - none
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+DELETE FROM t1;
+
+
+DROP VIEW v1;
+# VIEW with the PRIMARY KEY f1 of the base table
+# but additional constant column
+CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1;
+
+# Maybe the SQL standard allows the following INSERT.
+# But it would be a very sophisticated DBMS.
+--error ER_NON_INSERTABLE_TABLE
+INSERT INTO v1 SET f1 = 1;
+SELECT * from t1;
+DELETE FROM t1;
+# The next INSERTs should never work, because my_greeting is a constant.
+--error ER_NON_INSERTABLE_TABLE
+INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO';
+SELECT * from t1;
+DELETE FROM t1;
+
+# Testplan for DELETE:
+#
+# Column within WHERE qualification
+# f1 (PK)
+# f2 (non PK)
+# my_greeting(non base table column)
+# none
+#
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE f1
+DELETE FROM v1 WHERE f1 = 1;
+SELECT * from t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE f2
+DELETE FROM v1 WHERE f2 = 'ABC';
+SELECT * from t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE my_greeting
+DELETE FROM v1 WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE none
+DELETE FROM v1;
+SELECT * from t1;
+
+
+# Testplan for UPDATE:
+#
+# Column to modify Column within WHERE qualification
+# f1 (PK) f1(PK + same column to modify)
+# f1 (PK) f2
+# f1 (PK) my_greeting(non base table column)
+# f1 (PK) none
+# f2 (non PK) f1(PK)
+# f2 (non PK) f2(non PK + same column to modify)
+# f2 (non PK) f3(non PK)
+# f2 (non PK) my_greeting(non base table column)
+# f2 (non PK) none
+# my_greeting(non base table column) f1(PK)
+# my_greeting(non base table column) f2(non PK)
+# my_greeting(non base table column) my_greeting(same non base table column)
+# my_greeting(non base table column) none
+# f1,f2 f1,f2
+#
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1 - f1
+UPDATE v1 SET f1 = 2 WHERE f1 = 1;
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1 - f2
+UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1 - my_greeting
+UPDATE v1 SET f1 = 2 WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1 - none
+UPDATE v1 SET f1 = 2;
+SELECT * from t1;
+DELETE FROM t1;
+#------------------------------------------------
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - f1
+UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - f2
+UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - f3
+UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - my_greeting
+UPDATE v1 SET f2 = 'NNN' WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f2 - none
+UPDATE v1 SET f2 = 'NNN';
+SELECT * from t1;
+DELETE FROM t1;
+#------------------------------------------------
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE my_greeting - f1
+--error ER_NONUPDATEABLE_COLUMN
+UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1;
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE my_greeting - f2
+--error ER_NONUPDATEABLE_COLUMN
+UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE my_greeting - my_greeting
+--error ER_NONUPDATEABLE_COLUMN
+UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO';
+SELECT * from t1;
+DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE my_greeting - none
+--error ER_NONUPDATEABLE_COLUMN
+UPDATE v1 SET my_greeting = 'Hej';
+SELECT * from t1;
+DELETE FROM t1;
+#------------------------------------------------
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1, f2 - f1, f2
+UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+
+
+DROP TABLE t1;
+SET sql_mode = 'traditional';
+CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4) NOT NULL,
+ f4 CHAR, PRIMARY KEY(f1));
+# VIEW including the base table PRIMARY KEY, but not the NOT NULL
+# base table column (f3)
+# no additional columns
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1;
+
+# This INSERT must fail
+--error ER_NO_DEFAULT_FOR_VIEW_FIELD
+INSERT INTO v1 SET f1 = 1;
+SELECT * from t1;
+DELETE FROM t1;
+
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# DELETE f1
+DELETE FROM v1 WHERE f1 = 1;
+
+INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
+# UPDATE f1 - f2
+UPDATE v1 SET f4 = 'Y' WHERE f2 = 'ABC';
+SELECT * from t1;
+DELETE FROM t1;
+
+# Switch back to the native SQL mode
+SET sql_mode = '';
+
+
+
+let $message= Testcases 3.3.2.7 - 3.3.2.9,
+ 3.3.2.10 - 3.3.2.11 omitted because of missing
+ features EXCEPT and INTERSECT ;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.2.7: Ensure that a view with a definition that includes
+# UNION
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.8: Ensure that a view with a definition that includes
+# UNION DISTINCT
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.9: Ensure that a view with a definition that includes
+# UNION ALL
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.10: Ensure that a view with a definition that includes
+# EXCEPT
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# (Note: MySQL does not support EXCEPT at this time;
+# this test is for the future.)
+# Testcase 3.3.2.11: Ensure that a view with a definition that includes
+# INTERSECT
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# (Note: MySQL does not support INTERSECT at this time;
+# this test is for the future.)
+#
+# Summary of 3.3.2.7 - 3.3.2.11
+# Ensure that a view with a definition that includes
+# UNION or UNION DISTINCT or UNION ALL or EXCEPT or INTERSECT
+# rejects any INSERT or UPDATE or DELETE statement with an
+# appropriate error message
+#
+# mleich: I assume the type of the storage engine does not play any role.
+###############################################################################
+INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ;
+INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1 ;
+DROP VIEW IF EXISTS v1 ;
+--enable_warnings
+CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ;
+INSERT INTO t1 VALUES (19,41,32) ;
+INSERT INTO t1 VALUES (59,54,71) ;
+INSERT INTO t1 VALUES (21,91,99) ;
+
+SET @variant1 = 'UNION ';
+SET @variant2 = 'UNION ALL ';
+SET @variant3 = 'UNION DISTINCT ';
+SET @variant4 = 'EXCEPT ';
+SET @variant5 = 'INTERSECT ';
+
+# Attention: Set $num to 5, when EXCEPT and INTERSECT is supported
+let $num= 3;
+while ($num)
+{
+ --disable_query_log
+ eval SET @variant= @variant$num;
+ let $aux= `SELECT CONCAT('CREATE VIEW v1 AS ',
+ 'SELECT f61 FROM tb2 WHERE f59=59 ',
+ @variant,
+ 'SELECT f61 FROM t1 WHERE f59=19')`;
+ --enable_query_log
+ # $aux contains the CREATE VIEW statement
+ eval $aux;
+ --error ER_NON_INSERTABLE_TABLE
+ INSERT INTO v1 VALUES (3000);
+ --error ER_NON_UPDATABLE_TABLE
+ UPDATE v1 SET f61 = 100 WHERE f61 = 32;
+ --error ER_NON_UPDATABLE_TABLE
+ DELETE FROM v1;
+ DROP VIEW v1 ;
+
+ dec $num;
+}
+
+
+let $message= Testcases 3.3.2.12 - 3.3.2.20;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.2.12: Ensure that a view with a definition that includes
+# DISTINCT
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.13: Ensure that a view with a definition that includes
+# DISTINCTROW
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.14: Ensure that a view with a definition that includes
+# a set function
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.15: Ensure that a view with a definition that includes
+# GROUP BY
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.16: Ensure that a view with a definition that includes
+# HAVING
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.17: Ensure that a view with a definition that includes
+# a subquery in the select list
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.18: Ensure that a view with a definition that includes
+# a reference to a non-updatable view
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.19: Ensure that a view with a definition that includes
+# a WHERE clause subquery that refers to a table also
+# referenced in a FROM clause
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+# Testcase 3.3.2.20: Ensure that a view with a definition that includes
+# ALGORITHM = TEMPTABLE
+# rejects all INSERT, UPDATE, or DELETE attempts
+# with an appropriate error message.
+#
+# Summary of 3.3.2.12 - 3.3.2.20:
+# Ensure that a view with a definition that includes
+# DISTINCT 3.3.2.12
+# DISTINCTROW 3.3.2.13
+# SET 3.3.2.14
+# GROUP BY 3.3.2.15
+# HAVING 3.3.2.16
+# a sub query in the select list 3.3.2.17
+# a reference to a non-updateable view 3.3.2.18
+# a WHERE clause sub query that refers to a table also referenced in a
+# FROM clause 3.3.2.19
+# ALGORITHM = TEMPTABLE 3.3.2.20
+# rejects
+# any INSERT or UPDATE or DELETE statement
+# with an appropriate error message.
+#
+###############################################################################
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2 ;
+DROP VIEW IF EXISTS test.v1 ;
+Drop view if exists v2 ;
+--enable_warnings
+
+CREATE TABLE t1 (f59 int, f60 int, f61 int) ;
+INSERT INTO t1 VALUES (19,41,32) ;
+INSERT INTO t1 VALUES (59,54,71) ;
+INSERT INTO t1 VALUES (21,91,99) ;
+CREATE TABLE t2 (f59 int, f60 int, f61 int) ;
+INSERT INTO t2 VALUES (19,41,32) ;
+INSERT INTO t2 VALUES (59,54,71) ;
+INSERT INTO t2 VALUES (21,91,99) ;
+CREATE VIEW v2 AS SELECT f59, f60, f61 FROM t2 LIMIT 5;
+
+# For DISTINCT 3.3.2.12
+SET @variant1= 'CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1';
+# For DISTINCTROW 3.3.2.13
+SET @variant2= 'CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1';
+# For SET 3.3.2.14
+SET @variant3= 'CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1';
+# For GROUP BY 3.3.2.15
+SET @variant4= 'CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61';
+# For HAVING 3.3.2.16
+SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0';
+# For a WHERE clause sub query that refers to a table also referenced in a
+# FROM clause 3.3.2.18
+SET @variant6= 'CREATE VIEW v1 AS SELECT f61 FROM v2';
+SET @variant7= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
+# For ALGORITHM = TEMPTABLE 3.3.2.20
+SET @variant8= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1';
+
+let $num= 8;
+while ($num)
+{
+ --disable_abort_on_error
+ --disable_query_log
+ eval SET @variant= @variant$num;
+ let $aux= `SELECT @variant`;
+ --enable_query_log
+
+ # CREATE VIEW v1 ...
+ eval $aux;
+
+ --error ER_NON_INSERTABLE_TABLE
+ INSERT INTO v1 VALUES (1002);
+ # --error ER_NON_UPDATABLE_TABLE, ER_UPDATE_TABLE_USED
+
+ --error ER_NON_UPDATABLE_TABLE
+ UPDATE v1 SET f61=1007;
+ --error ER_NON_UPDATABLE_TABLE
+ DELETE FROM v1;
+ DROP VIEW v1;
+ dec $num;
+}
+# For a sub query in the select list 3.3.2.17
+CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
+--error ER_NON_INSERTABLE_TABLE
+INSERT INTO v1 VALUES (1002);
+--error ER_NONUPDATEABLE_COLUMN
+UPDATE v1 SET f61=1007;
+# no error ER_NON_UPDATABLE_TABLE, because we can find columns for deleting
+DELETE FROM v1;
+DROP VIEW v1;
+
+Drop TABLE t1, t2 ;
+Drop VIEW v2 ;
+
+
+let $message= Testcases 3.3.A1;
+--source include/show_msg80.inc
+###############################################################################
+# Testcase 3.3.A1: Check the effects of base table modifications on an already
+# existing VIEW
+#
+# Attention: Many modifications are logical non sense.
+# The consequence is in many cases a "garbage in garbage out" effect.
+#
+# There is no specification of the intended behaviour within
+# the MySQL manual. That means I assume the observed effects are
+# no bug as long we do not get a crash or obviously non
+# reasonable results.
+###############################################################################
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+--enable_warnings
+
+eval CREATE TABLE t1 (f1 BIGINT, f2 DATE DEFAULT NULL, f4 CHAR(5),
+ report char(10)) ENGINE = $engine_type;
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 SET f1 = -1, f4 = 'ABC', report = 't1 0';
+INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0';
+
+# 0. Initial state
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+SELECT * FROM v1 order by f1, report;
+#
+# 1. Name of one base table column is altered
+ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5);
+INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
+--error ER_VIEW_INVALID
+INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
+--error ER_BAD_FIELD_ERROR
+INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
+--error ER_VIEW_INVALID
+INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
+DESCRIBE t1;
+# Bug#12533 crash on DESCRIBE <view> after renaming base table column;
+--error ER_VIEW_INVALID
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+--error ER_VIEW_INVALID
+SELECT * FROM v1 order by f1, report;
+ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5);
+#
+# 2. Length of one base table column is increased
+ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10);
+INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2';
+INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2';
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+SELECT * FROM v1 order by f1, report;
+#
+# 3. Length of one base table column is reduced
+# We have to mangle within warnings the row numbers, because they are not
+# always deterministic in engines
+--replace_regex /at row [0-9]/at row <some number>/
+ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8);
+INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3';
+INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3';
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+SELECT * FROM v1 order by f1, report;
+#
+# 4. Type of one base table column is altered string -> string
+ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20);
+INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4';
+INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4';
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+SELECT * FROM v1 order by f1, report;
+#
+# 5. Type of one base table column altered numeric -> string
+ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
+INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
+ f4 = '<------ 20 -------->', report = 't1 5';
+INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
+ f4 = '<------ 20 -------->', report = 'v1 5';
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+SELECT * FROM v1 order by f1, report;
+#
+# 6. DROP of one base table column
+ALTER TABLE t1 DROP COLUMN f2;
+INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6';
+--error ER_VIEW_INVALID
+INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6';
+DESCRIBE t1;
+--error ER_VIEW_INVALID
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+--error ER_VIEW_INVALID
+SELECT * FROM v1 order by f1, report;
+#
+# 7. Recreation of dropped base table column with the same data type like before
+ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL;
+INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04',
+ f4 = '<------ 20 -------->', report = 't1 7';
+INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04',
+ f4 = '<------ 20 -------->', report = 'v1 7';
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+SELECT * FROM v1 order by f1, report;
+#
+# 8. Recreation of dropped base table column with a different data type
+# like before
+ALTER TABLE t1 DROP COLUMN f2;
+ALTER TABLE t1 ADD COLUMN f2 FLOAT;
+INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
+ f4 = '<------ 20 -------->', report = 't1 8';
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+ f4 = '<------ 20 -------->', report = 'v1 8';
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+SELECT * FROM v1 order by f1, report;
+#
+# 9. Add a column to the base table
+ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2);
+INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
+ f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
+--error ER_BAD_FIELD_ERROR
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+ f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
+INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
+ f4 = '<------ 20 -------->', report = 'v1 9a';
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, report;
+SELECT * FROM v1 order by f1, report;
+#
+# 10. VIEW with numeric function is "victim" of data type change
+DROP TABLE t1;
+DROP VIEW v1;
+eval CREATE TABLE t1 (f1 CHAR(10), f2 BIGINT) ENGINE = $engine_type;
+INSERT INTO t1 SET f1 = 'ABC', f2 = 3;
+CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, f2;
+SELECT * FROM v1 order by 2;
+ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30);
+INSERT INTO t1 SET f1 = 'ABC', f2 = 'DEF';
+DESCRIBE t1;
+DESCRIBE v1;
+SELECT * FROM t1 order by f1, f2;
+SELECT * FROM v1 order by 2;
+# Some statements for comparison
+# - the ugly SQRT('DEF') as constant
+SELECT SQRT('DEF');
+# - Will a VIEW based on the same definition show the same result ?
+CREATE VIEW v2 AS SELECT SQRT('DEF');
+SELECT * FROM v2 order by 1;
+# - Will a VIEW v2 created after the base table column recreation show the same
+# result set like v1 ?
+CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+DESCRIBE v2;
+SELECT * FROM v2 order by 2;
+# - What will be the content of base table created with AS SELECT ?
+CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM t2 order by 2;
+--horizontal_results
+--enable_ps_protocol
+DROP TABLE t2;
+CREATE TABLE t2 AS SELECT * FROM v1;
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM t2 order by 2;
+--horizontal_results
+--enable_ps_protocol
+DROP TABLE t2;
+CREATE TABLE t2 AS SELECT * FROM v2;
+if ($have_bug_32285)
+{
+--disable_ps_protocol
+}
+--vertical_results
+SELECT * FROM t2 order by 2;
+--horizontal_results
+--enable_ps_protocol
+#
+DROP TABLE t1;
+DROP TABLE t2;
+DROP VIEW v1;
+DROP VIEW v2;
+
+
+
+# Clean up
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v1_1;
+DROP VIEW IF EXISTS v1_2;
+DROP VIEW IF EXISTS v1_firstview;
+DROP VIEW IF EXISTS v1_secondview;
+DROP VIEW IF EXISTS v2;
+DROP DATABASE IF EXISTS test2;
+DROP DATABASE IF EXISTS test3;
+--enable_warnings
+
+# FIXME sub testcases, which might be included, if they fit good into
+# the requirements and the completeness of the tests is increased
+# Bug#10970 Views: dependence on temporary table allowed
+# Bug#4663 constant function in WHERE clause evaluated in view definition
+# Bug#6808 Views: CREATE VIEW v ... FROM t AS v fails
+# Bug#10977 Views: no warning if column name is truncated
+# Bug#9505: Views: privilege needed on underlying function
+
+# --source suite/funcs_1/Views/Views_403x406.test
+# --source suite/funcs_1/Views/Views_407.test
+# --source suite/funcs_1/Views/Views_408x411.test
+
+
+